Converting a document to another format is a core feature of GroupDocs.Conversion for Python via .NET, enabling seamless transformations between various document types. This documentation section focuses on common use cases for GroupDocs.Conversion and demonstrates how to apply the API effectively.
Converter Class Methods
The Converter class exposes a single conversion entry point plus several helpers for inspecting the loaded document:
convert(file_path, convert_options) — converts the loaded document to the target format specified by convert_options and saves the result to file_path. The same method handles single-document conversion, container / archive conversion (ZIP, RAR, 7Z, OST, PST), and per-page output when combined with options.page_number / options.pages_count. See Convert a Document to Another Format, Convert a Document to Multiple Page Files, and Convert Files Within Document Containers.
get_document_info() — returns a DocumentInfo object with format, page count, author, dimensions, and format-specific metadata without performing a conversion. See Getting Document Information.
get_possible_conversions(), Converter.get_possible_conversions_by_extension(extension), and Converter.get_all_possible_conversions() — discover the set of target formats a given source supports before running a pipeline. See Get Possible Conversions.
is_document_password_protected() — quick check before attempting to open a file that may be encrypted.
Note
Per-page output is driven by the page_number + pages_count attributes on the ConvertOptions class, not by a dedicated method. Loop over pages and call convert(file_path, options) once per page to produce one output file per page.
Convert Options
Each conversion method accepts a ConvertOptions class, which contains configuration parameters specific to the output format. These options allow you to control the conversion process and customize the results.
Below is a list of available ConvertOptions classes and their corresponding output types:
PdfConvertOptions – Options for converting to PDF format.
WordProcessingConvertOptions – Options for converting to Word Processing formats.
SpreadsheetConvertOptions – Options for converting to Spreadsheet formats.
PresentationConvertOptions – Options for converting to Presentation formats.
ImageConvertOptions – Options for converting to Image formats (e.g., PNG, JPEG).
WebConvertOptions – Options for converting to Web formats (e.g., HTML).
PageDescriptionLanguageConvertOptions – Options for converting to Page Description Language formats (e.g., PostScript).
EBookConvertOptions – Options for converting to EBook formats (e.g., EPUB, MOBI).
EmailConvertOptions – Options for converting to Email formats (e.g., EML, MSG).
DiagramConvertOptions – Options for converting to Diagram formats (e.g., VSDX).
CadConvertOptions – Options for converting to CAD formats (e.g., DWG).
ThreeDConvertOptions – Options for converting to 3D formats.
ProjectManagementConvertOptions – Options for converting to Project Management formats (e.g., MPP).
GisConvertOptions – Options for converting to GIS formats.
FontConvertOptions – Options for converting to Font formats (e.g., TTF, OTF).
FinanceConvertOptions – Options for converting to Finance formats (e.g., XBRL).
CompressionConvertOptions – Options for converting to Compression formats (e.g., ZIP).
NoConvertOptions – A special option class that instructs the converter to copy the source document without any modifications.
Specify the appropriate ConvertOptions class as an argument in the convert method to meet your desired output requirements. Selecting the correct ConvertOptions class based on the target format ensures optimal conversion results.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.