PDF properties guide


Here is an overview of settings for the $BSE/java/PDF.properties and <WebUI/LNUI>/WEB-INF/lib/PDF.properties file:

left-margin     : the left margin in cm (default 2.0).
right-margin    : the right margin in cm (default 2.0).
top-margin      : the top margin in cm (default 1.5).
bottom-margin   : the bottom margin in cm (default 1.5).

line-color-r    : the red rgb value for the line color (default 192).
line-color-g    : the green rgb value for the line color (default 192).
line-color-b    : the blue rgb value for the line color (default 192).

debug           : draw rectangles around cells to see the calculated spaces for text blocks (default no).
debug.show.properties :if debug is active show a first page displaying all the current properties (default no).

page-width	: the default page width in cm (default 21.0).
page-height	: the default page height in cm (default 29.7).

ttf-font-path   : the directory where arialuni.ttf and cour.ttf are present (default is OS-dependant).

<fontname>      : the full path to the ttf-file or otf-file to be used for the texts with this font. The fontname 
                  is the font used in the report stripped of its spaces.
                  (Example 1: UserFont2=C:\\windows\\fonts\\micr.ttf)

                  this can also be the full path to a directory containing a specific font. This directory probably
                  exists of multiple ttf- and otf-files. Please make sure this directory does not contain multiple
                  different fonts, but only the different internationalized files for a single font.
                  (Example 2: UserFont2=C:\\fonts\\notosans\\)

default-proportional-font : the full path to a ttf- or otf-file containing the default proportional font to use. This can also 
                            be the full path to a directory containing a specific font. This directory probably
                            exists of multiple ttf- and otf-files. Please make sure this directory does not contain multiple
                            different fonts, but only the different internationalized files for a single font.
default-monospaced-font   : the full path to a ttf- or otf-file containing the default monospaced font to use. This can also 
                            be the full path to a directory containing a specific font. This directory probably
                            exists of multiple ttf- and otf-files. Please make sure this directory does not contain multiple
                            different fonts, but only the different internationalized files for a single font.

spaces-per-tab  : the tabs in texts are defaulted to 8 spaces. This can be changed with the spaces-per-tab property.

font-size-factor: the factor that is used to multiply the font size with. The font being used is depending on the number 
                  of characters on a line. The space available per character is multiplied with the font size factor to
                  get the point size of the font.
                          
                      1.3  : smaller font
                      1.5  : somewhat smaller font
                      1.67 : normal font (default)
                      1.8  : somewhat bigger font
                      2.0  : bigger font
                   
                  Since using a bigger font can result in overlapping texts, the converter uses a dynamic layouting
                  approach from a factor 1.6 or higher. If texts still overlap the converter will automatically
                  downsize the font. For the different layouting strategies see layout-strategy.

                  This setting can also be supplied by DOM. If it is supplied by DOM the setting in the PDF.properties
                  is ignored.
                  
layout-strategy : if the font is downsized in the above scenario, there are 3 layout strategies:
                      
                      1 : calculate the optimal layout across all pages in the report and use this layout on every
                          page. There will be no difference in layout and font sizes on different pages. (default)
                      2 : layout every single page in the report by itself. This will result in slightly differently 
                          layouted pages with slightly different font sizes on different pages. On a single page the
                          font sizes will not be different. In general the font will be bigger than the font used in
                          the first layout strategy.
                      3 : adjust the layout on the fly. Most pages will have the same layout and font size.
                  
dynamic-factor  : the font-size-factor that is used to differentiate between using dynamic layout or not (default 1.6).

landscape       : the minimal number of characters on a line to print to landscape. If the number is less
                  the PDF is in portrait (default 150).

extend-barcodes : normally barcodes will be as high in lines as indicated. They can be enlarged a bit by setting
                  this property to yes. In that case the barcode will cover a quarter of the previous line and 
                  a quarter of the next line. (default no).

stretch-text    : Stretch text blocks from left margin to right margin, i.e. text blocks do not use the pwidth of the 
                  report (default yes). If the value is no, text blocks will always use the report width. This property
                  does nothing for exact positioned reports.
                  
simulate-bold   : Simulate bold fonts by drawing the normal font a bit thicker (default no). If set to no, the converter
                  will try to find the ttf file that contains the bold font.
                  
never-utf8-hint : Never generate QR codes with the UTF-8 hint. Some hand scanners will see this UTF-8 hint as \000026 value
                  (default no). Be aware that setting this to yes, the generated QR will not pass the Swiss QR billing
                  validation if the QR code contains umlauts.

All these properties can also be applied for certain reports only, if the report id is in front of the property.
For example the setting "ttams140111000.font-size-factor=2.1" will only adjust the font-size-factor for report ttams140111000. 
All other reports will use the value as set for font-size-factor.

Latest Java component are installed with the latest Portingset or can separately be found under KB 1105242.

For printing-to-display it is necessary to change the PDF.properties on the WebUI webserver in WEB-INF/lib and not the one on 
the LN backend. That one is used if one prints to a PDF device (XML-PDF).