Converting file attachments |
Start page Previous page Next page |
If the option N2PDFVALUE_ATTACHMENT_CONVERT_MODE is set with command N2PDFSetOption, the Notes attachment is converted into a standalone PDF file and this is then attached to the new PDF file created by the N2PDFProcess. In this case, no n2pdf operations can be carried out on the content of the Notes attachment. If a Notes attachment is attached to the "new" PDF by this means, this occurs in the sequence of the function calls of N2PDFAddAttachment or N2PDFAddFile.
Example: Convert the attachment and amend as additional page(s) at the end of the PDF
Call N2PDFSetOption ( JobID,_ N2PDFOPTION_ATTACHMENT_MODE,_ N2PDFVALUE_ATTACHMENT_CONVERT_MODE,_ "" )
Call N2PDFAddAttachment ( JobID,_ 0,_ N2PDFVALUE_CRLF_BEFORE,_ db.Server,_ db.FilePath,_ doc.UniversalID,_ "File",_ "" )
N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT_ERRThis option makes automatic embedding of file attachments possible in the original format if it was not possible to successfully complete the conversion via webPDF. This option can be used for the functions N2PDFAddAttachment and N2PDFAddFile.
Example: Embed file in original position Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT_ERR,_ N2PDFVALUE_True, "" )
N2PDFOPTION_CONVERTER_USE_OFFICEBRIDGEThis option allows you to enable OfficeBridge by webPDF to convert attachments with the original application. This option can be used for the functions N2PDFAddAttachment and N2PDFAddFile.
Example: Activates conversion via OfficeBridge Call N2PDFSetOption ( JobID, N2PDFOPTION_CONVERTER_USE_OFFICEBRIDGE,_ N2PDFVALUE_True, "" )
N2PDFOPTION_ATTACHMENT_ADD_OB_FILESPECThis option allows the explicit selection of file formats for converting attachments. To do so, OfficeBridge uses a local installation of Microsoft Office. This option can be used for the functions N2PDFAddAttachment and N2PDFAddFile.
Example: Selection of the attachments to be converted via OfficeBridge Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_OB_FILESPEC,"*.doc", "") Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_OB_FILESPEC,"*.ppt", "")
N2PDFOPTION_ATTACHMENT_CLEAR_OB_FILESPECThis option resets the selection of the file formates specified with N2PDFOPTION_ATTACHMENT_CLEAR_OB_FILESPEC .
Example: Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_CLEAR_OB_FILESPEC, "*", "") |