Converter class

Converter class

Represents a group of methods intended to convert a variety of different types of documents using a single line of code.

Remarks

The specified input and output files or streams, along with the desired save format, are used to convert the given input document of the one format into the output document of the other specified format.

The convert functionality supports over 35+ different file formats.

The Converter.convert_to_images() group of methods are designed to transform documents into images, with each page being converted into a separate image file. These methods also convert PDF documents directly to fixed-page formats without loading them into the document model, which enhances both performance and accuracy.

With ImageSaveOptions.page_set, you can specify a particular set of pages to convert into images.

Inheritance: ConverterProcessor

Methods

NameDescription
convert(input_file, output_file)Converts the given input document into the output document using specified input output file names and its extensions.
convert(input_file, output_file, save_format)Converts the given input document into the output document using specified input output file names and the final document format.
convert(input_file, output_file, save_options)Converts the given input document into the output document using specified input output file names and save options.
convert(input_file, load_options, output_file, save_options)Converts the given input document into the output document using specified input output file names its load/save options.
convert(input_stream, output_stream, save_format)Converts the given input document into a single output document using specified input and output streams.
convert(input_stream, output_stream, save_options)Converts the given input document into a single output document using specified input and output streams.
convert(input_stream, load_options, output_stream, save_options)Converts the given input document into a single output document using specified input and output streams.
convert_to_images(input_file, output_file)Converts the pages of the specified input file to image files.
convert_to_images(input_file, output_file, save_format)Converts the pages of the specified input file to image files in the specified format.
convert_to_images(input_file, output_file, save_options)Converts the pages of the specified input file to image files using the specified save options.
convert_to_images(input_file, load_options, output_file, save_options)Converts the pages of the specified input file to image files using the provided load and save options.
convert_to_images(input_file, save_format)Converts the pages of the specified input file to images in the specified format and returns an array of streams containing the images.
convert_to_images(input_file, save_options)Converts the pages of the specified input file to images using the specified save options and returns an array of streams containing the images.
convert_to_images(input_stream, save_format)Converts the pages of the specified input stream to images in the specified format and returns an array of streams containing the images.
convert_to_images(input_stream, save_options)Converts the pages of the specified input stream to images using the specified save options and returns an array of streams containing the images.
convert_to_images(input_stream, load_options, save_options)Converts the pages of the specified input stream to images using the provided load and save options, and returns an array of streams containing the images.
convert_to_images(doc, save_format)Converts the pages of the specified document to images in the specified format and returns an array of streams containing the images.
convert_to_images(doc, save_options)Converts the pages of the specified document to images using the specified save options and returns an array of streams containing the images.
create()Creates new instance of the converter processor.
create(context)Creates new instance of the converter processor.
execute()Execute the processor action.
(Inherited from Processor)
from_file(input)Specifies input document for processing.
(Inherited from Processor)
from_file(input, load_options)Specifies input document for processing.
(Inherited from Processor)
from_stream(input)Specifies input document for processing.
(Inherited from Processor)
from_stream(input, load_options)Specifies input document for processing.
(Inherited from Processor)
to_file(output)Specifies output file for the processor.
(Inherited from Processor)
to_file(output, save_options)Specifies output file for the processor.
(Inherited from Processor)
to_file(output, save_format)Specifies output file for the processor.
(Inherited from Processor)
to_stream(output, save_options)Specifies output stream for the processor.
(Inherited from Processor)
to_stream(output, save_format)Specifies output stream for the processor.
(Inherited from Processor)
to_streams(output, save_options)
(Inherited from Processor)
to_streams(output, save_format)
(Inherited from Processor)

See Also