With this workflow component you can merge an input file with a template (both InterFormNG2 and InterFormNG templates) to create the output stream in PDF format. This can later e.g. be sent to a (laser) printer, that supports PDF or as input for e.g. encryption or digitally signing before outputting the PDF file.
The PDF output is stored in the payload of the workflow and can later e.g. be saved to a file, or printed out by sending the payload to a printer.
For normal use you should also consider the workflow component, Create PDF file. This component creates a PDF file and saves it to the file system and keeps the original payload.
The input payload must be an XML or spooled file. A similar component for the intermediate payload is the Create PDF component.
Please notice the hint below for implementation.
To print out the PDF you can use the Set printer component and the To printer component.
Here you can decide which type of PDF file, that you want to create. The default is PDF/A, which is meant for long term archiving. Alternatively you can select PDF/UA-1, which is minimum requirements that make sure documents are compliant with devices that support people with disabilities.
As mentioned above this workflow component overwrites the contents of the payload of the workflow, which normally means, that the initial input file e.g. XML or spooled file is lost. If you however later in the same workflow need the original payload, then you get that in a couple of ways:
One way to avoid the loss of the original payload is use the multi-cast workflow component and here only change the payload in one of the branches and keep the original payload in the other. Here is one example:
The second string of the multi-cast gets the payload from before the multi-cast and the result of the create PDF document
Before you run the Create PDF document component you can save the original payload with the component, Payload to named property e.g. into backupData:
And after the create PDF document you can later retrieve the original payload with the component, Named property to payload:
In the Input type you need to 'tell' the workflow which file type that is retrieved.