How Do I Print a PDF File?
    • 20 Jun 2024
    • 2 Minutes to read
    • Contributors
    • PDF

    How Do I Print a PDF File?

    • PDF

    Article summary

    This article provides a solution for printing PDF data stored in JobData or PDF files stored as attachments to JobData using Lasernet Developer 8.

    PDF data stored in JobData can be sent to the Print Output Port as raw data. PDF data can be received by an input port or a module that generates a PDF.

    A list of JobInfos must be defined for the Print Output module to enable printing of PDF data stored in JobData.

    JobInfo

    Description

    Example

    JobData

    Binary PDF Data

    [Binary]

    PrintMimetype

    Mimetype of PDF file

    Application/PDF

    When a PDF file is successfully printed, a log message is displayed next to the Print Output module, showing that the PDF file has been processed and printed.

    PDF Document Included as an Attachment

    PDF files can also be stored as attachments to JobData. In such a scenario, JobData can contain EMF data, and the attachment(s) must contain PDF data.

    Retrieve one or several PDF files via file access in JavaScript, the Database module or File Retriever module (file, FTP, or HTTP) and insert them as print attachments via the required JobInfos.

    A list of JobInfos must be defined for the Print Output module to enable printing of PDF data files attached to JobData.

    JobInfo

    Description

    Example

    PrintAttachment[index]

    Binary PDF Data

    [Binary]

    PrintAttachmentMimetype[index]

    Mimetype of PDF file

    Application/PDF

    Additional Information

    Modules required: Printer Output.

    The solution requires Foxit Reader for printing PDF documents. Foxit Reader be downloaded here: https://www.foxitsoftware.com/pdf-reader/

    It is recommended that you turn off any selected components, additional tasks, and toolbars from the Foxit Reader installer since they are not required for printing PDF documents through Lasernet.

    After installing Foxit Reader, you must copy Foxit Reader.exe, located in the selected destination during installation, to the root of the Lasernet installation folder. In Lasernet 7.2 and newer, the file name FoxitReader.exe is also accepted. This filename is used for newer versions of Foxit Reader.

    You may also run the Foxit Reader application manually and answer the required questions in the pop-up dialogs, before executing the application via the Lasernet Service.

    The solution has been verified with Foxit Reader version 5.4.5.0124 and 7.0.6.1126 on the following operation systems:

    • Windows 7

    • Windows 8.1

    • Windows Server 2008

    • Windows Server 2012 R2

    Printer Profiles are not supported in Lasernet when printing PDF documents via an external application like Foxit Reader.

    Ensure that the Lasernet Service has the required user rights, to allow Foxit Reader to print to the selected Windows print queue, defined in the Printer Output settings.

    Using Foxit Reader for parsing and printing PDF documents in the background by the Lasernet service is an undocumented feature. Formpipe Software is not responsible for a future version of OS, or Foxit Reader can cause the functionality to stop working.


    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.