Purpose


This article provides a solution for how to print PDF data stored in JobData or PDF files stored as attachments to JobData.


Resolution


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.


JobInfoDescriptionExample
JobDataBinary PDF Data[Binary]
PrintMimetypeMimetype of PDF fileapplication/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.

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.


JobInfoDescriptionExample
PrintAttachment[index]Binary PDF Data[Binary]
PrintAttachmentMimetype[index]Mimetype of PDF fileapplication/pdf


Additional information


Modules required

  • Printer Output

Furthermore the solution requires Foxit Reader for printing PDF documents. Foxit Reader be downloaded here: http://www.foxitsoftware.com/Secure_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 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 that a future version of OS or Foxit Reader can cause the functionality to stop working.