pdftools_sdk.image.document

Classes

Document(handle)

The base class for image documents

class pdftools_sdk.image.document.Document(handle)[source]

Bases: _NativeObject, ABC

The base class for image documents

Image documents are either opened using pdftools_sdk.image.document.Document.open() or the result of an operation, e.g. of PDF to image conversion using pdftools_sdk.pdf2_image.converter.Converter.convert_page() .

static open(stream: IOBase) Document[source]

Open an image document

Documents opened with this method are read-only and cannot be modified.

Parameters:

stream (io.IOBase) – The stream from which the image is read.

Returns:

The newly created document instance

Return type:

pdftools_sdk.image.document.Document

Raises: