Document Conversion using Python APIs

Convert Microsoft® Office Word, PDF, Images and various other formats using Aspose.Words for Python via .NET.

 Conversion via C# .NET  Conversion via Java  Conversion via C++  Conversion in Android Apps  Conversion in PHP Apps

 

Total Python APIs speeds up developing document automation solutions from scratch or enhancing existing applications to create, edit or convert documents, presentations, emails and 3D files. Python API not only handles Microsoft Office Word and Presentation slides but also handles PDF, HTML, Images and Email files and a lot more. API does not depend on any software and is a full set of document management and manipulation solution.

Convert Microsoft Word to PDF

Total Python API supports multiple conversion of formats such as Microsoft Word to PDF, Images, Markdown and HTML. API makes the process of converting Word document to PDF simple with the quality output as close to the document as of DOC, DOCX file. Process is load the DOC or DOCX file into Document object and just call the save method with target PDF format along with its directory path. It’s so simple. In case there is need to specify PDF standards like PDF 1.7 or 1.5, API provides PdfComplaince enumeration, for setting PdfSaveOptions() .

Python - Word to PDF Conversion

 

Microsoft Word to Images Conversion

Word to Images Conversion is anthor feature of Python API. Besides just conversion, one can easily set various save options such as brightness, contrast, horizontal and vertical resolution etc. Process is, load the document via Document object and then call the save method with the desired image file extion having specified path. To specify various save options, API provides ImageSaveOptions , FixedPageSaveOptions or SaveOptions classes can be used as of the required scenario. Below code sample demonstrates creating a preview of the first document page with applying some additional settings.

Python - Word to Image Conversion

 

Convert Microsoft PowerPoint to Word

Python API supports converting Microsoft PowerPoint PPT / PPTX to Word DOC / DOCX files. Two APIs Aspose.Slides for Python via .NET and Aspose.Words for Python via .NET used to perform this conversion. Load the PPT / PPTX file using Presentation . Get the Words Document class object. Iterate through each slide, generates and inserts slide image and then insert the slide text by iterating through slides shapes.

Python - PowerPoint Slides to Word Conversion

 

Email to Word, PDF, HTML and Images Conversion

For Email files converson to PDF, Word, Images and HTML, Email Python API Aspose.Email for Python via .NET performs the conversion. API load the source file in its object model and invoke the Save method with relevant parameters.

Python - Email Files to Word Conversion