Settings |
Start page Previous page Next page |
The following settings influence the way attachments are handled. All options are set via the function N2PDFSetOption. You can choose from the following function parameters:
N2PDFOPTION_ATTACHMENT_MODEThis option defines how attachments are handled (also see "general attachment handling" and the description of the function "N2PDFAddAttachment"). <OptionStr> offers the following settings.
Example: Embed attachments in the PDF Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE,_ N2PDFVALUE_ATTACHMENT_EMBED_MODE, "" )
Example: Import attachments to the PDF Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE,_ N2PDFVALUE_ATTACHMENT_IMPORT_MODE, "" )
Example: Attachments are saved externally and a link is to be created in the PDF Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_MODE,_ N2PDFVALUE_ATTACHMENT_LINK_MODE, "" )
N2PDFOPTION_ATTACHMENT_IMAGE_SIZE This option is true only for image attachments and influences the display size when images are imported to a PDF as content.
The value <OptionStr> allows the following options when calling the function:
Example: Image is imported in the original size Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_IMAGE_SIZE,_ N2PDFVALUE_ATTACHMENT_ORIGINAL, "" )
Example: Image is made to fit the page Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_IMAGE_SIZE,_ N2PDFVALUE_ATTACHMENT_FIT, "" )
Example: Image is made to fit the page, but the aspect ratio is maintained Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_IMAGE_SIZE,_ N2PDFVALUE_ATTACHMENT_FIT_ASPECT_RATIO, "" )
N2PDFOPTION_ATTACHMENT_COUNT_PDF_PAGES With these parameters, you can set whether the function N2PDFAddAttachment should return the number of pages for all added PDF files (return value >0). If during a function call you transfer several PDF files, the pages of the PDF files transferred are added together.
N2PDFOPTION_ATTACHMENT_IGNORE_UNKNOWN With these parameters, you can set whether the function N2PDFAddAttachment should return an error code for an unknown file attachment.
N2PDFOPTION_ATTACHMENT_ADD_PASSWORD This option allows the transfer of passwords needed for opening password protected files. The option works with three different types of passwords: Archive formats, office formats and the PDF format.
The value <OptionStr> allows the following password types to be used:
Example: Transfer of the password “ABC” for PDF documents Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_PASSWORD,_ "ABC", N2PDFVALUE_ATTACHMENT_PASSWORD_PDF)
N2PDFOPTION_ATTACHMENT_CLEAR_PASSWORD You can use this option to delete specific passwords or password lists which were set in the option N2PDFOPTION_ATTACHMENT_ADD_PASSWORD .
The value <OptionStr> allows the following password types to be used:
Example: Deleting the password list for PDF documents Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_CLEAR_PASSWORD,_ N2PDFVALUE_ATTACHMENT_PASSWORD_PDF, "")
N2PDFOPTION_ATTACHMENT_EXTENDED_INFO This option allows the addition of a user-defined, supplementary content element to the name of the file attachment. For example, the storage of information in this way makes it possible for an archive system to make a categorization within the archive in dependence on the values found.
The value <OptionStr> allows the following parameters to be used:
Example: Enhance the file information with a uniform structure Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EXTENDED_INFO,_ "<tag>reference number\" & N2PDFVALUE_ATTACHMENT_INFO_FILENAME & "</tag>", "")
N2PDFOPTION_ATTACHMENT_EXPORT_OLE This option allows OLE objects saved in Notes documents to be converted to file attachments. The OLE objects are extracted and the files contained in OLE objects are saved as normal attachments in the PDF document. All options enabled for the further processing of attachments can be applied. The way OLE objects are handled then corresponds to that used for file attachments.
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_EXPORT_OLE, N2PDFVALUE_TRUE, "" )
N2PDFOPTION_ATTACHMENT_ADD_OUTLINE_ENTRY This option allows a separate entry for added file attachments to be made in the outline of the PDF document. The added PDF document is then linked with this entry. If the integrated PDF document is to contain an outline, then all of the entries are inserted below the new entry.
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_OUTLINE_ENTRY, "Attachment1", "") Call N2PDFAddAttachment ( ... ) Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_OUTLINE_ENTRY, "Attachment2", "") Call N2PDFAddFile ( ... )
N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE This option allows creation of a list of file attachments which are to be ignored during conversion.
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE, ".exe", "") Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE, ".dll", "")
N2PDFOPTION_ATTACHMENT_CLEAR_CONV_IGNORE This option deletes the list created under N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE.
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE, "", "")
N2PDFOPTION_ATTACHMENT_ADD_ARC_IGNORE This option allows creation of a list of file attachments (archive formats) which are to be unpacked.
Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE, ".jar", "") Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_ADD_CONV_IGNORE, ".zip", "")
N2PDFOPTION_ATTACHMENT_CLEAR_ARC_IGNORE This option deletes the list created under N2PDFOPTION_ATTACHMENT_ADD_ARC_IGNORE. Call N2PDFSetOption ( JobID, N2PDFOPTION_ATTACHMENT_CLEAR_CONV_IGNORE, "", "")
|