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 (using our pdf2word plugin), which enhances both performance and accuracy.

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

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_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_to_images(input_file, output_file)Converts the input file pages to images.
convert_to_images(input_file, output_file, save_format)Converts the input file pages to images.
convert_to_images(input_file, output_file, save_options)Converts the input file pages to images.
convert_to_images(input_file, save_format)Converts the input file pages to images.
convert_to_images(input_file, save_options)Converts the input file pages to images.
convert_to_images(input_stream, save_format)Converts the input stream pages to images.
convert_to_images(input_stream, save_options)Converts the input stream pages to images.
convert_to_images(doc, save_format)Converts the document pages to images.
convert_to_images(doc, save_options)Converts the document pages to images.

See Also