This article provides a solution for how to print PDF data stored in JobData or PDF files stored as attachments to JobData.
PDF data stored in JobData can be send to the Print Output Port as raw data. PDF data can be received by an input port or a module which generates PDF.
A list of JobInfos must be defined for the Print Output Module to enable printing of PDF data stored in JobData.
|JobData||Binary PDF Data||[Binary]|
|PrintMimetype||Mimetype of PDF file||application/pdf|
When a PDF file is successfully printed a log message will be created, by 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 attachment to JobData. In such scenario JobData can contain EMF data and the attachment(s) must contain PDF data.
A list of JobInfos must be defined for the Print Output Module to enable printing of PDF data files attached to JobData.
|PrintAttachment[index]||Binary PDF Data||[Binary]|
|PrintAttachmentMimetype[index]||Mimetype of PDF file||application/pdf|
- Printer Output
Furthermore the solution requires Foxit Reader for printing PDF documents. Foxit Reader be downloaded here: https://www.foxitsoftware.com/pdf-reader/
It is recommended to turn off any selected components, additional tasks and toolbars from the installer of Foxit Reader, since they are not required for printing PDF documents through Lasernet.
After installing Foxit Reader you must copy Foxit Reader.exe, located in selected destination during installation, to root of the Lasernet installation folder. In Lasernet 7.2 and newer the file name FoxitReader.exe is also accepted. This file name 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 22.214.171.1246 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 that a future version of OS or Foxit Reader can cause the functionality to stop working.
This solution applies to Lasernet 8 and previous. Lasernet 9 has PDF Printing built in. Please refer to the Lasernet Developer manual for further info on the function in Lasernet 9.