MIME contents |
Start page Previous page Next page |
n2pdf includes a function for the processing of MIME contents (mime parts) which may be present in Notes documents or individual Rich Text fields. You can control the manner of processing here using various options.
The MIME contents generally occur in e-mail documents which are received via the Internet. The content of these documents is generally stored as HTML code in the MIME contents. Because n2pdf cannot work directly with this HTML content, but only with Rich Text content (based on the Notes CD records), this content must be converted.
This takes place, for example, when a Notes document based on MIME content is opened and saved in the Notes Client. The content is converted to Rich Text content by the Notes Client at this point in time. However, if this conversion has not taken place for a given MIME content, then the display of this document by n2pdf is often not clean.
To attain an improved display quality nonetheless, n2pdf now also offers a direct (automatic) option for conversion of the HTML content to Rich Text. If this conversion is used, then the document does not need to be converted by the Notes Client beforehand.
All the settings are made using the function N2PDFSetOption and must be made before the command for adding the respective content (e.g. N2PDFAddRTContent).
Below you will find a list of all possible settings that can be used in the parameter <OptionID> with N2PDFSetOption. The respective setting values are made using the parameter <OptionStr>. The last parameter is unused and therefore always set as "".
N2PDFOPTION_MIME_MODEThis parameter can be used to specify how MIME content should be converted if it is present in documents. It offers three possible methods:
Sample conversion for export and further processing using webPDF:
‘Activation of the EML export Call N2PDFSetOption ( JobID, N2PDFOPTION_MIME_MODE,N2PDFVALUE_MIME_FILEEXPORT,"")
‘Activation of the EMBED mode Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE, N2PDFVALUE_ATTACHMENT_EMBED_MODE, "" )
‘The exported EML file is converted to PDF by webPDF and is subsequently embedded Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_PDF_CONVERT, N2PDFVALUE_TRUE, "" )
‘File attachments are embedded at the original position of the Note document Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EMBED_AT_POS, N2PDFVALUE_TRUE, "" )
‘Display of the original attachment is prevented Call N2PDFSetOption ( JobID, N2PDFOPTION_EXPORT_HIDE_ATTACHMENT, N2PDFVALUE_TRUE, "" )
‘Transfer of the Notes document with MIME content Call N2PDFAddRTContent ( JobID, N2PDFVALUE_CONTENT_BODY, PageBreak,_ db.Server, db.FilePath, doc.UniversalID, "")
N2PDFOPTION_MIME_EML_FILE_NAME With this parameter you can define a filename which is to be applied when exporting using N2PDFVALUE_MIME_FILEEXPORT . If you do not define a filename, then "Mimepart.eml" is used as the filename.
Call N2PDFSetOption ( JobID, N2PDFOPTION_MIME_EML_FILE_NAME, "filename.eml","")
or, for example:
Call N2PDFSetOption ( JobID, N2PDFOPTION_MIME_EML_FILE_NAME, CStr(doc.Subject(0)),"")
N2PDFOPTION_MIME_DOWNLOAD_IMAGES With this parameter, you can specify whether all of the images from an e-mail or an HTML document which are not stored in the document should be loaded automatically.
Call N2PDFSetOption ( JobID, N2PDFOPTION_MIME_DOWNLOAD_IMAGES, N2PDFVALUE_TRUE, "" )
N2PDFOPTION_MIME_DOWNLOAD_TIMEOUT You can use this parameter to define the time to wait when downloading the external images before the query is aborted. The duration is specified in seconds and only refers to the document to be converted, not to the entire conversion.
|