pdftools_sdk.pdf.output_options

Classes

OutputOptions()

The parameters for document-level features of output PDFs

class pdftools_sdk.pdf.output_options.OutputOptions[source]

Bases: _NativeObject

The parameters for document-level features of output PDFs

Output options are used in many operations that create PDF documents.

__init__()[source]
property encryption: Encryption | None

The parameters to encrypt output PDFs

If None, no encryption is used.

Encryption is not allowed by the PDF/A ISO standards. For that reason, it is recommended to use None when processing PDF/A documents. Otherwise, most operations will remove PDF/A conformance from the output document. More details can be found in the documentation of the operation.

Default is None, no encryption is used.

Returns:

Optional[pdftools_sdk.pdf.encryption.Encryption]

property metadata_settings: MetadataSettings | None

Default is None, metadata are copied to the output document.

Returns:

Optional[pdftools_sdk.pdf.metadata_settings.MetadataSettings]

property linearize: bool

Whether to linearize the output document

If True, the output document is written in a linearized form (“Fast Web View”), so that a conforming viewer can display the first page before the entire file has been loaded.

Note: This property is applied by operations that write the output PDF, such as pdftools_sdk.document_assembly.document_assembler.DocumentAssembler.assemble() , pdftools_sdk.optimization.optimizer.Optimizer.optimize_document() and pdftools_sdk.pdf_a.conversion.converter.Converter.convert() . The signing operations of pdftools_sdk.sign.signer.Signer apply it where supported, but not when existing signatures must be preserved: such documents are signed using an incremental update, which is incompatible with linearization. The property has no effect for other operations, such as image-to-PDF conversion (pdftools_sdk.image2_pdf.converter.Converter ) and optical character recognition (pdftools_sdk.ocr.processor.Processor ).

Default is False

Returns:

bool