Verifying Report Output on Different Platforms

Managing Fonts in Oracle Reports 9-21 The test results below are based on a Lexmark Optra printer. The fonts and their numbers as well as the control commands are examples and may vary with other printers. Font information The Lexmark has a small menu with the option of printing all available fonts PCL Emulation Fonts. This includes both resident fonts defaults and Flash fonts installed on the printer separately In these examples, there are many more fonts and each font has its own code. OCRB for example has code 4206. This number is important later on. Creating Output When having problems getting the correct font, simplify the report and thereby the output. This can be done by creating a straightforward report using select sysdate from dual as the query and limiting the number of fonts. This will avoid long runs and create much smaller output files. Reading the Output File The resulting PCL-file is a binary file but is reasonably readable in the VI editor. The first small part and the end part is binary, but the middle part is readable and contains data that can be interpreted. Verifying the Output File The only interesting information is in the readable, middle part of the file. Find the text this is the text displayed in the reports output and check out the part preceding the text. It looks like this: ....;SD1,14,2,0,3,10.34,5,0,6,0,7,4099;LB here is your text In the preceding example, the font is selected with code 4099. For the Lexmark printer, this is selecting Courier. Table 9–6 Sample Font Information Font Name Style Weight Example Output R0 Courier ... ESCsymsetESCs0ppitchh0s0b4099T... R39 Courier Bold 3 ... ESCsymsetESCs0ppitchh0s3b4099T... R40 Courier Italic 1 ... ESCsymsetESCs0ppitchh1s0b4099T... R55 Century Schoolbook Roman ... ESCsymsetESCs1ppointv0s0b24703T ... Table 9–7 Sample Flash Font Information Font Name Symbol Set Style Weight Example Output F2 OCR-A 0O ... ESC0OESCs0ppitchh0s0b4200T ... F3 OCR-B 1O 3 ... ESC1OESCs0ppitchh0s0b4206T ... 9-22 Publishing Reports to the Web with Oracle Reports Services In one example, the font OCR-B code 4206 was needed. The font did not come out until that specific code was generated just before the selected text. It looks like this: ....;SD1,14,2,0,3,8.57,5,0,6,0,7,4206;LBThis is OCRB font.... Correcting Printed Font If the output file contains the correct code, but the font does not appear on the printer, the printer probably does not have the font available. This will also occur if the code in the output file deduced from TFM file is not the same as the one the printer is expecting. On the Lexmark printer, the font was replaced by the default font on the printer. If the output file does not contain the code for the font, Oracle Reports did not generate the code to the output file. Check for the HPD and TFM files. Checking Environment Variables DEBUG_SLFIND can help you ascertain which of these files was used. With reference to the fonts, you can find the list of AFMTFM files the application looked at after reading the printer definition file and which font files it read after the aliasing. In this manner, you can also determine whether a font is mapped or not. Usually the order of file reading will be as follows. ■ First read the printer definition file. ■ Read all the associated font files for the font supplied by this printer definition file. ■ Read in the alias file. ■ If there is a mapping of file then read in font information files for those fonts and finally again read the AFM file for the fonts that are used in generating the output. TK_DEBUG_POSTSCRIPT will affect PostScript output. It can be set to any combination of these strings: ■ Functions list each toolkit function called in comments in the PostScript output. ■ Long produces long, slow, intelligible PostScript. ■ Memory displays memory usage at the bottom of each page. Any of the options can appear in the environment variable, abbreviated down to one letter. You can set it to any combination of these, separated by . This variable is case insensitive. For example, FuncLMem would give you all three options. Note that the output that results from using this variable will not be supported by Oracle for customer use. It exists for diagnostics purposes only. Repairing Fonts Not Appearing Correctly in Web Source View Text in the user interface of Oracle Reports Builder, such as the window title, uses fonts taken from the system resource files for the current language. These system resource files are supplied with the Oracle Reports installation. In Oracle Reports, you can map these fonts in the [rwbuilder] section of uifont.ali. If found, the Note: Set the environment variable DEBUG_SLFIND to any file name and run the report. The debug information is written in that particular file. Usage: setenv DEBUG_SLFIND mydebug.txt For more information, see Appendix B, Environment Variables .