Embedding file attachments

Start page  Previous page  Next page

 

112

The following options only take effect if N2PDFOPTION_ATTACHMENT_MODE has been set to N2PDFVALUE_ATTACHMENT_EMBED_MODE.

 

If the option N2PDFVALUE_ATTACHMENT_EMBED_MODE is set with command N2PDFSetOption, the attachment is embedded in the PDF file. The original file is attached to the PDF. How this attachment is displayed may be controlled via additional settings.

 

Example: Embed an attachment in the PDF

 

Call N2PDFSetOption ( JobID,_

N2PDFOPTION_ATTACHMENT_MODE,_

N2PDFVALUE_ATTACHMENT_EMBED_MODE ,_

""  )

 

Call N2PDFAddAttachment ( JobID,_

0,_

N2PDFVALUE_CRLF_BEFORE,_

db.Server,_

db.FilePath,_

doc.UniversalID,_

"File",_

"" )        

 

 

N2PDFOPTION_ATTACHMENT_EMBED_ICON

This option defines which symbol is to be used in the PDF to show an embedded file. This may be the file formats own symbol (as it is registered in Windows) or one of the pre-defined symbols of the PDF format.

 

N2PDFVALUE_ATTACHMENT_EMBED_ICON_EXT

Symbol of the file format

N2PDFVALUE_ATTACHMENT_EMBED_ICON_PAPER

Paper clip

N2PDFVALUE_ATTACHMENT_EMBED_ICON_GRAPH

Chart

N2PDFVALUE_ATTACHMENT_EMBED_ICON_TAG

Tag

N2PDFVALUE_ATTACHMENT_EMBED_ICON_PIN

Pin

 

Example: Create an attachment with a pin

Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_ICON,_

N2PDFVALUE_ATTACHMENT_EMBED_ICON_PIN, "" )

 

 

N2PDFOPTION_ATTACHMENT_EMBED_SHOW_NAME

This option defines if the file name of the embedded file is shown below the embedded file. This option will only show an effect if N2PDFOPTION_ATTACHMENT_EMBED_ICON is using the setting N2PDFVALUE_ATTACHMENT_EMBED_ICON_EXT.

 

N2PDFVALUE_TRUE

Display file name

N2PDFVALUE_FALSE

Do not display file name

 

Example: Display the file name below the attachment symbol

Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_SHOW_NAME,_

N2PDFVALUE_True, "" )

 

N2PDFOPTION_ATTACHMENT_EMBED_AT_POS

This option is used to define if the embedded file is displayed at the end of the document or placed in the same place it is shown in, in the original document.

 

N2PDFVALUE_TRUE

Embed file in original position

N2PDFVALUE_FALSE

Embed file at the end of the document

 

Example: Embed file in original position

Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_AT_POS,_

N2PDFVALUE_True, "" )

 

 

N2PDFOPTION_ATTACHMENT_EMBED_OBJ_AUTHOR

This option enables a title (Author Field) to be set for embedded PDF objects in a PDF document. This information is stored in the document as a "Hint Message" and does not appear until the mouse cursor (Tooltip) is positioned over an embedded PDF object in the PDF file.

 

 

N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT

This option automatically converts file attachments to PDF format so that the attachments can be embedded in the PDF document. This option can be used for the functions N2PDFAddAttachment and N2PDFAddFile. Storage in the original format is carried out automatically in the event that conversion to the PDF format is not possible. For this option, the same settings apply that were set for the CONVERT mode.

 

This option must be enabled if you wish to embed file attachments and later convert the PDF document to PDF/A-2 or PDF/A-3.

 

N2PDFVALUE_TRUE

Converts the file attachment and embeds the converted PDF file

N2PDFVALUE_FALSE

No action

 

 

112

If the option N2PDFOPTION_PDF_PDFA_MODE is also set for a PDF/A mode, then the attachments are not only merely converted to PDF before embedding, but are converted directly to PDF/A (as per the setting).

 

112

In contrast to the rest of the EMBED_MODE options, the option N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT requires an installation of webPDF.