convert method

On this page

convert

Executes conversion chain.

def convert(self):
    ...

Example

from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions

def convert_document():
    # Open the source document
    with Converter("./business-plan.docx") as converter:
        # Define conversion options for PDF output
        pdf_options = PdfConvertOptions()
        # Perform the conversion and save the result
        converter.convert("./business-plan.pdf", pdf_options)

if __name__ == "__main__":
    convert_document()

See Also

On this page