ZIP Compression |
Start page Previous page Next page |
n2pdf provides an option to compress a PDF file as a ZIP archive after creation. This option allows you to e.g. add a created PDF file to an existing ZIP archive or if you are creating a serial letter, whereby there is one PDF per document. This option allows you to collect all documents in a single ZIP file.
The following options allow the creation of a ZIP file, respectively are options when creating such an archive:
N2PDFOPTION_COMPRESS_OUTPUT_FILEThis option activates the creation of a ZIP archive and the PDF file created by n2pdf is saved as a ZIP archive.
Example: Call N2PDFSetOption ( JobID,_ N2PDFOPTION_COMPRESS_Output_FILE, N2PDFVALUE_True,"" )
N2PDFOPTION_COMPRESS_TARGET_FILENAMEUse this option to define the file name which is used to name the ZIP archive. If a file with this name does not exist a ZIP file is created and the PDF written to it. If an archive with that name exists, then n2pdf will attempt to save the PDF to that archive.
Example: Call N2PDFSetOption ( JobID,_ N2PDFOPTION_COMPRESS_TARGET_FILENAME, "C:\Temp\Daten.zip,"" )
N2PDFOPTION_COMPRESS_PASSWORDThis option allows you to set a password with which the PDF file is encrypted in the ZIP archive.
Example: Call N2PDFSetOption ( JobID,_ N2PDFOPTION_COMPRESS_PASSWORD, "1234","" )
|