It is possible to attach extra, embedded files to the output PDF file. You define this with the embed element, which is inserted by pressing this icon in the designer:
You find this icon by clicking the '+' icon to reveal the second row of design elements:
In the output PDF file you will see a paperclip (size and position is specified in the embed element). In other outputs the embed element is ignored.
You see the properties of the embed element, when you create a new element, and if you double click on an existing embed element in the element tree.
The properties are:
The size of the paperclip in the output.
A URL to the file, that you want to embed can be stated as the resource:
If you want to link to a local file, then you can do that with a URL like this:
file:/C:/Users/myuser/Pictures/Myfile.jpg
If there is a space in the path, then you need to replace the spaces with %20. You can do that in this way with an XPath expression:
replace('file:/C:/Users/myuser/Pictures/My File.jpg',' ','%20')
If you want to embed a file from another server while running on the IBM i platform, then you can refer to the file via QNTC like so:
file:/QNTC/MyServer/Share/file.pdf
For accessing files via QNTC you need to ensure, that the user under which the InterFormNG2 service is running is defined on the other server with the same password as on the IBM i.
The file can be selected in two ways:
Instead of a URL to an external resource you can also refer to local resources. In the example below we refer to a file called ZUGFeRD-invoice.xml, which has been created (or uploaded) to the resource type, Others in the Library:
If you have bought and configured the Sharepoint integration module you can even embed files from Sharepoint as covered here.
It is possible to state a text to be shown in the PDF file, when the receiver of the PDF hovers the mouse over the embed paperclip. You specify that as the description as below:
The displayed file name sets the name of the file, when it is embedded in the PDF file. With the settings shown on the top of this section the file name will be file.png as shown below. Like almost any other field this can of course also be set as an XPath expression e.g. to set a dynamic name that reflect the name of the embedded file.
The size of the paperclip shown as the link in the PDF file is defined with the size parameter: