PDF Runtime and Data Manager Support


9.6A

Windows Runtimes

  1. The Windows runtimes (PLBWIN & PLBNET) support the PDF implementation. The PRTOPEN, PRTPAGE, PRTCLOSE, PRTPLAY, and GETINFO instructions have been modified to support the PDF implementation.

  2. To invoke PDF output, the {device} in the PRTOPEN can be specified as 'pdf:' or '!pdf:'. The '!' is ignored by PLBWIN\PLBNET and is processed the same as 'pdf:'. The '!' {device} name format is used by an Application Server to cause the PDF processing to be executed at the client workstation where a PLBCLIENT is executed.

  3. When using the PRTPLAY instruction using a {device} specified as 'pdf:', any new or existing spoolfile can create a PDF output.

  4. When executing the PRTPAGE *FONT control on a Windows platform, the runtime first looks to see if a [pdffonts] alias mapping section has been defined in the runtime '.ini' configuration file. If the *FONT control font name is found in the [pdffonts] alias keywords, it is used as declared. If the [pdffonts] alias mapping is not used or the *FONT control font is not found, the runtime looks in the Windows registry to find the *FONT font when it is installed for the Windows. Using this technique allows the PL/B '.ini' [pdffonts] alias mappings to override the Windows installed fonts.

  5. The PLB_TERM screen definition can be modified to direct the default runtime printed output to one of the following settings:

  6.  

    f:name.pdf

     

    In this case, the runtime default print device output is set for PDF output to a PDF file as shown. Please note, that the RELEASE or RELEASEJOB instruction must be used to close the PDF file before it can be accessed by a PDF reader.

     

    pdf:

     

    If the screen definition default printer device is set to the device named 'pdf:', the runtime printer is always redirected for PDF output. However, since there is no PDF file specification, the first PRINT instruction that starts the printing operation causes a PDF Open Dialog to appear for a Windows runtime. If the 'pdf:' is used on an Application Server system, an appropriate error occurs on the first PRINT instruction because a PDF Open Dialog can not be executed a the server system.

Linux Runtimes

  1. The PRTOPEN, PRTPAGE, and PRTCLOSE instructions can be compiled into a program and executed by a Linux runtime only when the printer {device} is specified as 'pdf:'. If a printer {device} other than 'pdf:' is specified, an appropriate error occurs.

  2. The PRTPLAY instruction is not supported when using a Linux runtime.

  3. Print Preview is not supported when using a Linux runtime.

  4. For a PRTOPEN instruction, the only {options} supported for a Linux runtime are specified as follows:

  5.  

    PAGEWIDTH

    PAGEHEIGHT

    PIXELWIDTH

    PIXELHEIGHT

     

    All other {options} are ignored when using a Linux runtime.

  6. The GETINFO instruction is not supported when using a Linux runtime.

  7. When executing the PRTPAGE *FONT control on a Linux OS platform, the new [pdffonts] section must be setup in the PLB runtime '.ini' configuration file to map the expected fonts are used. See the PRTPAGE section description on the *FONT control for details on the [pdffonts] section supported keywords.

Application Server Runtimes

  1. When using the Application Server, a PRTOPEN with a {device} specified as 'pdf:' causes the PDF processing to be directly executed local to the server system. However, a PRTOPEN with a {device} specified as '!pdf:' causes the PDF processing to occur on the client workstation where the PLBCLIENT is executing. When the '!pdf:' {device} is used, the PDF output file is created and written at the client workstation.

  2. PRTPLAY and Print Preview are not supported for local output at the server system for Application Server when a {device} is specified as 'pdf:'. However, if the {device} is specified as '!pdf:', both PRTPLAY and\or Print Preview are processed and executed at the client workstation where PLBCLIENT is executed.

  3. For a PRTOPEN instruction using a {device} specified as 'pdf:', the only {options} supported for server local output are specified as follows:

  4.  

    PAGEWIDTH

    PAGEHEIGHT

    PIXELWIDTH

    PIXELHEIGHT

     

  5. All other {options} are ignored when using the Application Server runtime.

  6. When executing the PRTPAGE *FONT control on a PLBSERVE Application Server with 'pdf:' output being directly written local to the server, the rules for the *FONT font processing are the same as implemented for a Linux platform. See the PDF overview for a Linux platform. If the '!pdf:' output is being redirected to the PLBCLIENT client, the rules for the *FONT font processing are the same as implemented for a Windows runtime. See the PDF overview for a Windows platform. If the [pdffonts] alias section mappings are being used, the [pdffonts] section can be placed in the 'plbserve.ini' or the 'plbclient.ini' depending on whether Linux or Windows font usage rules are being used for the PDF output.

  7. When using the Application Server, by default the PRINT and SPLOPEN direct print output is performed at the client workstation. However, the keyword named 'PLBCS_APSPOOL' forces the output to be at the server system. If the exclamation mark (!) is used, the PDF output occurs at the client workstation no matter what 'PLBCS_APSPOOL' setting is being used.

  8.  

    :f:!name.pdf

     

    In this case, the runtime default print device output is set for PDF output to a PDF file named 'name.pdf' on the client workstation no matter what the 'PLBCS_APSPOOL' keyword setting is being used.

     

    !pdf:

     

    If the default printer device is set to the device name of '!pdf:', the runtime printer is always redirected for PDF output at the client workstation unless the 'PLBCS_APSPOOL' is being used. In this case, the first PRINT instruction that starts the printing operation causes a PDF Open Dialog to appear at a Windows client workstation that is executing the program.

Windows CE Runtimes\Clients

  1. The Advanced Print instructions (PRTOPEN, PRTPAGE, and PRTCLOSE) can be executed using Windows CE runtimes and clients ONLY when the {device} is specified as 'pdf:'.

  2. For the PDF support using Windows CE runtimes\clients, the '[pdffonts]' alias mapping must be used. Otherwise, a S17 error occurs. See the description below for '[pdffonts]' section.

Data Manager Support

  1. PDF support has been implemented to allow a Data Manager to be used for Windows runtimes (PLBWIN\PLBNET), Linux runtimes, and a PLBSERVE runtime with local PDF output at the server. Data Manager support is not available when the PDF output is processed and written at the PLCLIENT client workstation.

  2. When Data Manager support is allowed, the vertical bar '|' appends an IP address or URL to the file name that is specified in the PRTOPEN {jobname} or the 'PDFNAME' keyword. This allows the PDF output to be written directly to a Data Manager.

  3. Example:

    P PFILE

       PRTOPEN P, "pdf:", "pdfout.pdf|127.0.0.1"

     

  4. When Data Manager support is allowed, the attached file name as specified by a PRTPAGE *ATTACH control can have an IP address or URL appended to the file name using the vertical bar '|' character to access the file from a Data Manager.

  5. When Data Manager support is allowed, the font files as specified in the [pdffonts] alias mapping can use the vertical bar '|' character to append an IP address or URL to retrieve the font file from a Data Manager.

  6. The PDF support can be used with any previous version of Data Managers prior to 9.6A. However, only the 9.6A version of the Data Manager can provide current modification date information for a PDF attachment that is retrieved from the Data Manager. Older Data Manager versions cannot provide the PDF modification date information for attachments.

 

 

See Also: PDF Support, Printer Instructions

 



PL/B Language Reference PDF Support Overview Supported Print Controls