Please enable JavaScript to view this site.

InterFormNG2 Manual

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:

(Note: A license that includes the Advanced PDF module is required to use this functionality).

 

Please note, that the embedded file is really included in the PDF file and it is not just a link, so the size of the output PDF increases with each embedded file.

 

NG2Embed0001

 

 

You find this icon by clicking the '+' icon to reveal the second row of design elements:

NG2Embed0002

 

 

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:

 

NG2Embedding0008

 

Resource

The file to embed.

 

Description

A mouse-over description of the file.

 

Displayed file name

The name of the file, when it is embedded in the PDF.

 

Size

The size of the paperclip in the output.

 

 

The file to embed

A URL to the file, that you want to embed can be stated as the resource:

 

NG2Embed0003

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:

 

1.One way is to select it as a fixed constant as shown above. This can be stated, when you see the T on the right as above.

2.Another way is to click the T above to switch to expression mode as below. In this mode you can use an Xpath expression to state the URL of the file. You can use the magnifying glass to refer to a path in the sample input XML file or click the <> icon to switch to fixed text mode as above.

 

NG2Embed0004

 

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:

 

NG2Embed0007

 

 

If you have bought and configured the Sharepoint integration module you can even embed files from Sharepoint as covered here.

 

 

Mouse-over description of the embedded file

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:

 

NG2Embed0005

 

Displayed file name

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.

 

NG2Embedding0009

 

 

 

 

The size of the paperclip

The size of the paperclip shown as the link in the PDF file is defined with the size parameter:

 

NG2Embed0006