Four different ways to handle attachments
Did you already know that n2pdf knows four different ways to handle attachments?
Importing
The content of the attachment is visibly imported directly into the PDF file. This mode is called Import mode.
Converting
All content of the attachment is attached to the end of the PDF file after the conversion. This is called Convert mode.
Linking
The attachment is saved on the file system and a link to the file is inserted in the PDF. This mode is the Link mode.
Embedding
The attachment is embedded in the PDF file and can also be opened there as file. Therefore this mode is the Embed mode.
How are the individual modes activated?
You can control the mode that n2pdf should use to convert your attachments by calling the function N2PDFSetOption, the parameter N2PDFOPTION_ATTACHMENT_MODE and the desired mode in your application. All attachments that you pass after you have made these settings are shown in the desired mode in the future PDF.
Example: Embed attachments in the PDF file
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE, N2PDFVALUE_ATTACHMENT_EMBED_MODE , “” )
Here is a sample of how the functions could be used:
Further options
In addition to the actual activation of the modes you can also take influence on the output and the display of the content itself using various options.
You can show alternative symbols, if you don’t like the icon defined by your operating system, or set the file name for the link to the file system in the text format. Further options can be found in our sample database “n2pdf 3.2. Attachments (R5)”.
Of course, our technical support is available to you anytime and free of charge.