Supported Print Controls
9.6A
Sunbelt's PDF implementation provides support for the PRTPAGE controls controls as follows:
|
Name |
Support |
|
*ALIGNMENT=<*DECIMAL|*LEFT|*RIGHT> |
Yes |
|
*ALLOFF |
Yes |
|
*ATTACH={svarslit} |
New 9.6A |
|
*BGCOLOR=n |
Yes |
|
*BIN |
Ignored |
|
*BLANKOFF |
Yes |
|
*BLANKON |
Yes |
|
*BOLDOFF |
Yes |
|
*BOLDON |
Yes |
|
*C |
Yes |
|
*CLIPTEXT |
Yes |
|
*COLLATE |
Ignored |
|
*COLOROFF |
Yes |
|
*COLORUSE |
Yes |
|
*COLSPACE |
Yes |
|
*COPIES |
Ignored |
|
*DUPLEX |
Ignored |
|
*ENCRYPT={svarslit} |
New 9.6A |
|
*F |
Yes |
|
*FGCOLOR |
Yes |
|
*FILL |
Yes |
|
*FONT |
Yes |
|
*H |
Yes |
|
*HA |
Yes |
|
*INFO={svarslit} |
New 9.6A |
|
*JC |
Yes |
|
*L |
Yes |
|
*MARGINL |
Yes |
|
*MARGINT |
Yes |
|
*LINE |
Yes |
|
*LL |
Yes |
|
*N |
Yes |
|
*NEWPAGE |
Yes |
|
*ORIENT |
Yes |
|
*OVAL |
Yes |
|
*OVERLAYOFF |
Yes |
|
*OVERLAYON |
Yes |
|
*P |
Yes |
|
*PAPER |
Yes |
|
*PENSIZE |
Yes |
|
*PICT |
Yes |
|
*PICTCLIP |
Yes |
|
*PICTRECT |
Yes |
|
*PICTVIS |
Yes |
|
*PIXELOFF |
Yes |
|
*PIXELON |
Yes |
|
*PL |
Yes |
|
*PLENGTH |
Yes |
|
*PSCALE |
Ignored |
|
*PWIDTH |
Yes |
|
*QUALITY |
Ignored |
|
*RECT |
Yes |
|
*RNDRECT |
Yes |
|
*ROWSPACE |
Yes |
|
*RPTCHAR |
Yes |
|
*RPTDOWN |
Yes |
|
*SL |
Yes |
|
*TAB |
Yes |
|
*ULOFF |
Yes |
|
*ULON |
Yes |
|
*UNITS |
Yes |
|
*V |
Yes |
|
*VA |
Yes |
|
*ZF |
Yes |
|
*ZFOFF |
Yes |
|
*ZFON |
Yes |
|
*ZS |
Yes |
Note:
Several new advanced print controls have been added for the PRTPAGE instruction to provide extended capabilities with regard to the PDF support. The new PDF print controls are defined as follows:
|
Control |
Meaning |
|
|
This advanced print control takes a comma separated list of fields as provided in the {svarslit} data string to include additional user information in the PDF output file. Each field is composed of a field identifier assigned using a '=' character followed by field data. The data <string> field data can be specified with or without double quote characters. Each *INFO data field is optional and is not required when generating a PDF output file.
The following *INFO fields are supported:
Where:
Fields:
Note:
Examples: xInfo INIT "A=Bill,C,K=#"Test Sample Plbwin#",": "P=Plbwin,T=Test" PRTPAGE Prt;*Info="A=Bill,C,K=Plbwin" PRTPAGE Prt;*Info=xInfo
|
|
|
This advanced print control takes a comma separated list of fields as provided in the {svarslit} data string to specify parameters that allow an attachment to be embedded into a PDF output file along with other pertinent information. Each field is composed of a field identifier assigned using a '=' character followed by field data. The data <string> field data can be specified with or without double quote characters. The 'F' field is required while all other *ATTACH data fields are optional when embedding an attachment in a PDF output file.
The following *ATTACH fields are supported:
Where:
Fields:
0 - Paperclip (default if 'I' not used) 1 - Attachment 2 - Graph 3 - Tag
Example: P=5:15:20:35 //Use full position P=5:0:20:0 //Use top/left position
Note:
Examples of *ATTACH: FINDFILE "tpdf.pls",write=moddate PACK EmbedLine: "F=#"tpdf.pls#",": "T=tpdf,": "D=#"PL/B Source Code#",": "M=",moddate ;Static mod date! PRTPAGE Prt; *ATTACH=EmbedLine
PACK EmbedLine: "F=#"tpdf.pls|127.0.0.1#",": "T=tpdf,": "D=#"PL/B Source Code#",": "M" ;Use file mod date! PRTPAGE Prt; *ATTACH=EmbedLine
|
|
|
This advanced print control takes a comma separated list of fields as provided in the {svarslit} data string to specify parameters that allow PDF encryption to be used for the PDF output file. Each field is composed of a field identifier assigned using a '=' character followed by field data. The data <string> field data can be specified with or without double quote characters. The *ENCRYPT fields are optional.
The following *ENCRYPT fields are supported:
Where:
Fields:
Permissions as Bit Mask:
Permissions = D7+D6+D5+D4+D3+D2+D1+D0
D0 - Reserved must be 0 D1 - Reserved must be 0 D2 - Allow document to be printed. Add a value of (4) to enable this permission. D3 - Allow the contents of the PDF document to be modified. Add a value of (8) to enable this permission. D4 - Allow text and graphics to be copied or extracted from the PDF document. Add a value of (16) to enable this permission. D5 - Allow additions and modifications for document text annotations. Also, allow interactive form fields to be filled. In addition, if the D3 permission is enabled, allow form fields to be set, created, or modified. Add a value of (32) enable this permission. D6 - Not used D7 - Not used
Where each 'Dn' represents the corresponding bit in the permissions byte bit mask value. Note:
Example: PRTPAGE Prt;*ENCRYPT="O=sunbelt,P=4,U=Bill"
|
For FONT usage when redirecting the output to a 'pdf:' device, there are some guidelines that should be observed. There are four basic points that must be considered:
There are built-in fonts named 'Times', 'Helvetica', and 'Courier' that can be used. When a PDF reader encounters these fonts in a PDF file, the PDF reader substitutes\uses an appropriate font based on the OS platform being used. When any of these built-in fonts are used, the substituted font is not embedded in the PDF output file.
The PDF implementation only supports TrueType (.ttf) fonts for Advanced Print output to a 'pdf:' device. The TrueType fonts are supported by Windows and Linux OS platforms.
The Sunbelt runtimes support a new configuration section named '[pdffonts]' that exist in the runtime's .ini file. The keywords that are put into the [pdffonts] section allow a PL/B application to define font alias names that can be used in the PRTPAGE *FONT control. The defined font alias names are associated with TrueType (.ttf) font files. The keywords that can be defined in the '[pdffonts]' section are described as follows:
Where:
Examples:
[pdffonts]
Courier_New=/tmp/fonts/cour.ttf
Courier_New_B=/tmp/fonts/courbd.ttf
Courier_New_I=/tmp/fonts/couri.ttf
Courier_New_BI=/tmp/fonts/courbi.ttf
[pdffonts]
Courier_New=c:\temp\fonts/cour.ttf
Courier_New_B=c:\temp\fonts/courbd.ttf
Courier_New_I=/tmp/fonts/couri.ttf
Courier_New_BI=/tmp/fonts/courbi.ttf
Note:
When executing on a Linux system, make sure that the appropriate permissions are being used by the PLB runtime to access the mapped font files.
Example [PDFFONTS] Section Linux 'plb.ini':
[pdffonts]
MS_LineDraw=/home/myfonts/linedraw.ttf
Example Program Code Windows & Linux:
P PFILE
PRTOPEN P,"pdf:", "myfile.pdf"
.
PRTPAGE P;*FONT="Times":
"Something in 'Times'!"
PRTPAGE P;*FONT="MS LineDraw":
"LineDraw is used!"
When using a Linux runtime, a new keyword named 'FONT_PATH={dir}[;{dir1}[;...]]' can be placed in the '[pdffonts]' section of the 'plb.ini' runtime configuration file. The 'FONT_PATH' is one or more directories that contain the TrueType fonts that can be used in the PRTPAGE *FONT control operations. When the 'FONT_PATH' keyword is being used, a Linux OS file named 'fonts.scale' must exist in each specified directory that is an Linux OS font index file that defines the font names, attributes and their associated TrueType (.ttf) files. If the Linux OS font index file does not exist, the Linux command named 'mkfontscale' can create the 'fonts.scale' index file for each directory specified in the 'FONT_PATH' keyword.
See Also: PDF Support, Printer Instructions
![]() |