Converting 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_CONVERT_MODE. For conversion of file attachments, you need to install webPDF. Please note the text in the course of the same section.

 

 

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",_

"" )        

 

112

Further options for configuring the webPDF Server can be found in the sections Web service and Signatures.

 

 

N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT_ERR

This 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.

 

N2PDFVALUE_TRUE

Embed the file in the original format in case of an error.

N2PDFVALUE_FALSE

No action

 

Example: Embed file in original position

Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT_ERR,_

N2PDFVALUE_True, "" )

 

 

N2PDFOPTION_CONVERTER_USE_OFFICEBRIDGE

This 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.

 

N2PDFVALUE_TRUE

Activate OfficeBridge conversion

N2PDFVALUE_FALSE

No action

 

Example: Activates conversion via OfficeBridge

Call N2PDFSetOption ( JobID, N2PDFOPTION_CONVERTER_USE_OFFICEBRIDGE,_

N2PDFVALUE_True, "" )

 

 

N2PDFOPTION_ATTACHMENT_ADD_OB_FILESPEC

This 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_FILESPEC

This option resets the selection of the file formates specified with N2PDFOPTION_ATTACHMENT_CLEAR_OB_FILESPEC .

 

 

Example:

Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_CLEAR_OB_FILESPEC, "*", "")