pdftools_sdk.image2_pdf.converter

Classes

Converter()

The class to convert one or more images to a PDF document

class pdftools_sdk.image2_pdf.converter.Converter[source]

Bases: _NativeObject

The class to convert one or more images to a PDF document

__init__()[source]
convert(image: ImageDocument, out_stream: io.IOBase, profile: Profile, out_options: OutputOptions | None = None) → PdfDocument[source]

Convert an image to a PDF document

Parameters:
  • image (ImageDocument) – The input image document containing one or more pages.

  • outStream (io.IOBase) – The stream to which the PDF is written.

  • profile (Profile) –

    The profile defines the properties of the output document and how the images are placed onto the pages.

    For details, see pdftools_sdk.image2_pdf.profiles.profile.Profile.

  • outOptions (Optional[OutputOptions]) – The PDF output options, e.g. to encrypt the output document.

Returns:

The resulting output PDF which can be used as a new input for further processing.

Note that, this object must be disposed before the output stream object (method argument outStream).

Return type:

PdfDocument

Raises:
convert_multiple(images: DocumentList, out_stream: io.IOBase, profile: Profile, out_options: OutputOptions | None = None) → PdfDocument[source]

Convert a list of images to a PDF document

Parameters:
  • images (DocumentList) – The input image document list, each image containing one or more pages.

  • outStream (io.IOBase) – The stream to which the PDF is written.

  • profile (Profile) –

    The profile defines the properties of the output document and how the images are placed onto the pages.

    For details, see pdftools_sdk.image2_pdf.profiles.profile.Profile.

  • outOptions (Optional[OutputOptions]) – The PDF output options, e.g. to encrypt the output document.

Returns:

The resulting output PDF which can be used as a new input for further processing.

Note that, this object must be disposed before the output stream object (method argument outStream).

Return type:

PdfDocument

Raises: