|
Embedding file attachments |
Top Previous Next |
|
Note: 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.
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.
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.
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.
|