Linking file attachments |
Start page Previous page Next page |
If the option N2PDFVALUE_ATTACHMENT_LINK_MODE is set for the command N2PDFSetOption, then a link is added to the PDF for every attachment. The clickability and presentation of this link can be adjusted by further settings.
Example: Save the attachment to the file system and insert a link to the file in the PDF
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE,_ N2PDFVALUE_ATTACHMENT_LINK_MODE,_
Call N2PDFAddAttachment ( JobID,_ 0,_ N2PDFVALUE_CRLF_BEFORE,_ db.Server,_ db.FilePath,_ doc.UniversalID,_ "File",_ "" )
N2PDFOPTION_ATTACHMENT_TARGET_PATH Path in which file attachments are saved
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_TARGET_PATH,_ "C:\TEMP", "" )
N2PDFOPTION_ATTACHMENT_LINK_WITH_PATH This option defines if the link to the attachment is created including the path or not. If the path is not included, then the attachment and the PDF have to be stored in the same directory. Default: N2PDFVALUE_TRUE
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_LINK_With_PATH,_ N2PDFVALUE_True , "" )
N2PDFOPTION_ATTACHMENT_LINK_UNC_PATH When a path description for the link is used, this parameter defines whether the path is defined in UNC encoding (\\<computer name>\<clearance>) or not.
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_LINK_UNC_PATH,_ N2PDFVALUE_True , "" )
N2PDFOPTION_ATTACHMENT_LINK_ICONThis option defines the form in which the clickable link should appear in the PDF document. This may be the file format's own symbol (as it is registered in Windows) or a simple text link containing the file name.
Example: Represent link with symbol of the file format Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_LINK_ICON,_ N2PDFVALUE_ATTACHMENT_LINK_EXT, "" )
N2PDFOPTION_ATTACHMENT_LINK_SHOW_NAMEThis option defines whether the file name should be displayed below the link symbol or not. This option will only take effect if N2PDFOPTION_ATTACHMENT_LINK_ICON is using the setting N2PDFVALUE_ATTACHMENT_LINK_EXT.
Example: Display the file name below the attachment symbol Call N2PDFSetOption ( JobID, N2PDFVALUE_ATTACHMENT_LINK_EXT,_ N2PDFVALUE_True, "" )
N2PDFOPTION_ATTACHMENT_LINK_AT_POSThis option is used to define whether the link should be displayed at the end of the document or placed in the same place in which the attachment is in the original document.
Example: Embed the file at the original position Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_LINK_AT_POS,_ N2PDFVALUE_True, "" )
|