PDF Page Parameter Reference

The following diagram shows PDF page parameters which can be adjusted during conversion of QAD reports to PDFs via 32 Soft tools.

Parameter syntax used in the configuration file(s)

-t nnn –l nnn –s nnn –f nnn -Charset gb2312 -an "Dotum" -af 8
Where nnn – integer or decimal value
-l  left margin      - (optional) number of points (1/72 inch) default value is 20pt
-t  top margin       - (optional) number of points  default value is 20pt
-s  line spacing     - (optional) space between text lines in point default value is 10 pt
-f  font size        - (optional) as is, default value 10 pt
-z  font compression - (optional) percents from normal
-Charset             - defines character set if other than English (do not use if English only)
-an                  - defines alternative font name - for Chinese, Korean, Japanese languages - will be ignored if English only is used
-af                  - defines alternative font size - for Chinese, Korean, Japanese languages - will be ignored if English only is used
   If you only use English, you can safely remove -Charset, -an and -af parameters from the ini files.
-n  font ID          - (optional) see the table below. You can also use font name (e.g -n "Tahoma").
FontID Description
====== =======================
00     Courier
01     Courier-Bold
02     Courier-Oblique
03     Courier-BoldOblique
04     Times-Roman
05     Times-Bold
06     Times-Italic
07     Times-BoldItalic
08     Helvetica
09     Helvetica-Bold
10     Helvetica-Oblique
11     Helvetica-BoldOblique
12     Symbol
13     ZapfDingbats
14     AvantGarde-Book
15     AvantGarde-BookOblique
16     AvantGarde-Demi
17     AvantGarde-DemiOblique
18     Bookman-Demi
19     Bookman-DemiItalic
20     Bookman-Light
21     Bookman-LightItalic
22     Helvetica-Narrow
23     Helvetica-Narrow-Oblique
24     Helvetica-Narrow-Bold
25     Helvetica-Narrow-BoldOblique
26     NewCenturySchlbk-Roman
27     NewCenturySchlbk-Italic
28     NewCenturySchlbk-Bold
29     NewCenturySchlbk-BoldItalic
30     Palatino-Roman
31     Palatino-Italic
32     Palatino-Bold
33     Palatino-BoldItalic
34     ZapfChancery-MediumItalic
35     Helvetica-Condensed
36     Helvetica-Condensed-Bold
37     Helvetica-Condensed-Oblique
38     Helvetica-Condensed-BoldObl
39     ArialMT
40     ArialItalicMT
41     Arial-BoldMT
42     Arial-BoldItalicMT
43     Lucida Console

Switching Fonts Dynamically

32 Soft PDF converter recognizes ESC commands, which can be embedded into the QAD output file. This allows adding logic to QAD programs and switching fonts (styles) dynamically if required.

The embedded ESC command always overrides PDF parameter settings submitted in the INI file(s).

Parameters types and values

Parameter Description Allowed Values       Notes
========= =========== ==================== ================================================
f         font type   f0 - f43             
s         font size   s0 - s999
l         line size   l0 - l999   
r         rendering   r0 - r2               low value is applicable for small font size
g         font color  g0 0 0 - g100 100 100 g0 0 0       - black, 
                                            g100 100 100 - white color. 
                                            The first number - level of Red, 
                                            second level of Green, 
                                            the last level of Blue
u         upper index u0 - u999             Offset text up from base line
d         down index  d0 - d999             Offset text down from base line
p         position    p1 1 -   p999 999     New text positioning first number right space 
                                            reassign -l command line parameter second number 
                                            top space reassign -t command line parameter

Starting with version 3.20, there's a new parameter to highlight text (needs a space after last digit)
b         highlight   b127 127 127 2        highlight grey with 2 pixels border 
                      b235 235 0 2          highlight in yellow with 2 pixels border
                      b0 0 0 0              turn off highlighting

Examples of good sequences:

f10 g100 20 10        Switch to Helvetica-Oblique font and change font color
l12 s11               Change line size and font size

Examples of bad sequences:

f 10                  should not have space between f and 10
g100 20               too few parameters, must be 3 for this control
s1285                 number should not have more than 3 digits
f18                   number is greater than maximum value

Sample of switching font styles from the progress program

&scoped-def visDevs "terminal,page,page100"
&scoped-def e chr(27)
&scoped-def st1 (if lookup(dev,{&visDevs}) = 0 then
&scoped-def st2 else "")
&scoped-def sNormal  {&st1} {&e} + "s10 " + {&e} + "f43 " + {&e} + "l13 " {&st2}
&scoped-def sHdStyle {&st1} {&e} + "s10 " + {&e} + "f41 " + {&e} + "l11 " {&st2}
...
...
put control {&sHdStyle} "This is Header font style" skip.
...
...
put control {&sNormal}  "This is normal font style" skip.
...
...

Sample of switching font styles in the invoice header form

&scoped-def visDevs "terminal,page,page100"
&scoped-def e chr(27)
&scoped-def st1 (if lookup(cdev,{&visDevs}) = 0 then
&scoped-def st2 else "")
&scoped-def sNormal {&st1} {&e} + "s10 " + {&e} + "f43 " + {&e} + "l13 " {&st2}
&scoped-def sHead1  {&st1} {&e} + "s10 " + {&e} + "f41 " + {&e} + "l11 " {&st2}
&scoped-def sHead2  {&st1} {&e} + "s9 "  + {&e} + "f43 " + {&e} + "l11 " {&st2}
&scoped-def sHead3  {&st1} {&e} + "s10 " + {&e} + "f43 "                 {&st2}
&scoped-def sHead4  {&st1} {&e} + "s10 " + {&e} + "f43 " + {&e} + "l13 " {&st2}
&scoped-def sHead5  {&st1} {&e} + "s9 "  + {&e} + "f2 "  + {&e} + "l13 " {&st2}
&scoped-def sHead6  {&st1} {&e} + "s10 " + {&e} + "f43 " + {&e} + "l13 " {&st2}
&scoped-def sAttn1  {&st1} {&e} + "f41 " + {&e} + "l18 "{&st2}
&scoped-def sAttn2  {&st1} {&e} + "f39 " {&st2}
&scoped-def sDescr  {&st1} {&e} + "f6 "  + {&e} + "s8 " {&st2}
&scoped-def sCorr   {&st1} {&e} + "l18 " + {&e} + "f1 " {&st2}
&scoped-def cf  format "x(60)"
&scoped-def cf2 format "x(80)"
...
...
...
form header skip
   "          " {&sHead1} + company[1] + {&sHead3} {&cf}  skip
   "          " {&sHead2} + company[2] + {&sHead3} {&cf}  skip
   "          " {&sHead2} + company[3] + {&sHead3} {&cf}  skip
   "          " {&sHead2} + company[4] + {&sHead3} {&cf}  skip
   "          " {&sHead2} + company[5] + {&sHead4} {&cf}  skip
   "          "
       {&sHead2} +  fill(" ",43)
     + {&sHead6} +
       "         Invoice: " + ih_inv_nbr + "   Revision: " + string(ih_rev) + " " + {&sNormal} format "x(130)" skip
   "          " {&sHead2} +
       remitto[1] + fill(" ",43 - length(remitto[1]))
      + {&sHead6} +
     "    Invoice Date: " + string(ih_inv_date)  + 
     "     Page: " + string(page-number - pages) + " " + {&sNormal} format "X(130)" skip(0)
   "          " {&sHead2} +
       remitto[2] + fill(" ",43 - length(remitto[2]))
     + {&sHead6} +
     "      Print Date: "  + string(today) + {&sNormal}  format "x(130)"
   skip(1)
       "Bill To:" at 8  ih_bill
       "Ship To:" at 47 ih_ship
   skip(1)
   billto[1]      at 8    soldto[1]      at 47
   billto[2]      at 8    soldto[2]      at 47
   billto[3]      at 8    soldto[3]      at 47
   billto[4]      at 8    soldto[4]      at 47
   billto[5]      at 8    soldto[5]      at 47
   billto[6]      at 8    soldto[6]      at 47
 with frame phead1 page-top width 150 .
...
...
...
view form phead1.
...
...