PDF PRTPLAY Notes
9.6A
The syntax of a PRTPLAY instruction is as follows:
Note the following:
If the {prtname} for the PRTPLAY is specified with the 'pdf:' printer device name, the 'JOBNAME={name}' option can be null or it can contain the fully qualified path and PDF file name where the Advanced Print operations are to be written for the un-spooled actions of the PRTPLAY instruction. If the JOBNAME is not specified or if it is specified as a null variable or literal, a file selection dialog is presented to allow the end-user to specify the output PDF file name. Optionally, an {options} keyword named 'PDFNAME={svarslit}' specifies a PDF output file name. If the PDFNAME keyword parameter is used, the PDFNAME file name is used for the PDF output and the JOBNAME is expected to contain a print job name.
The basic PDF output is written requiring a PDF reader version 1.4 or later.
The PDF support as implemented by the PRTPLAY instruction can allow existing PLB advanced print spool files to be converted to a PDF file as needed by a PLB application.
The internal processing for the PRTPLAY instruction requires the Windows sub-system. Therefore, a PRTPLAY statement executed by a PLBSERVE Application Server is always processed at the PLBCLIENT client workstation. In addition, the PDF output for a PRTPLAY is always generated and located at the PLBCLIENT client workstation.
A new {options} keyword named 'FLAGS={dnumnvar}' has been added for a PRTPLAY instruction that specifies a numeric value that is a bit mask to invoke specialized behaviors for the PDF implementation:
| |
When this bit is turned on, the PDF support detects when a PDF built-in font with a specific name is used in a PRTPAGE and a Windows font is substituted and put into the PDF output file. If this 'PDF_FLAGS_SUB_WINFONTS' flag bit value is not used, the default behavior of the runtimes is the same as when the 'PDF_FLAGS_SUB_GENFONTS' bit value is turned on. See the following table:
| |
When this bit is turned on, the PDF output is set to enable Windows ANSI encoding when national characters with character values greater than 0x7F are used. This Windows ANSI encoding causes PDF readers to properly interpret and present the national characters.
The {options} keyword PDFNAME={svarslit} specifies a fully qualified path and file name used to write the PDF output.
This optional keyword parameter specifies a path and file name to write the PDF output. When the keyword parameter is used, it takes precedence and its file name is used for PDF output instead of the JOBNAME string. The implementation of this keyword is intended to give a PL/B application the flexibility to specify both a JOBNAME and a PDF output file name when using an advanced Print Preview that has both a PRINT and PDF output button available.
The PRTPLAY instruction for PDF output supports the PL/B file name formats including the keyword substitution for Datapoint and '$' macro formats. This enhanced file name support applies to the 'PDFNAME' option and the {jobname} parameter when the {device} is directed to the 'pdf:' output device.
When executing a PRTPLAY instruction using the PL/B Application server (i.e., Plbserve), output local to the server system is not supported. Therefore, the PRTPLAY instruction always renders the {device} output to the PLBCLIENT client workstation.
The PRTPLAY instruction is not supported by the PL/B Web Server runtime. In this case, an U67 error occurs.
Examples of a PRTPLAY to a PDF file:
The PDF file output is generated at the PLBCLIENT client workstation.
The PDF file output is generated at the PLBCLIENT client workstation.
A Print Preview is presented to the end user at the PLBCLIENT client workstation. The Print Preview has a single output button titled 'To PDF'. The PDF output file is located at PLBCLIENT client workstation.
A Print Preview is presented to the end user at the PLBCLIENT client workstation. The Print Preview has a single output button titled 'To PDF'. The PDF output file is located at PLBCLIENT client workstation.
A Print Preview is presented to the end user at the PLBCLIENT client workstation. The Print Preview has two output buttons. One button is titled 'To PDF' and the other button is titled 'PRINT'. If the 'PRINT' button is selected, the printed output is at the PLBCLIENT client workstation. If the PDF output is selected, PDF file is located at PLBCLIENT client workstation.
See Also: PDF Support, Printer Instructions
![]() |