
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
groupdocs-conversion-net
Advanced tools
File converter for the most commonly used formats, including DOCX, PDF, CAD, and many more.
Product Page | Docs | Demos | API Reference | Blog | Search | Free Support | Temporary License
GroupDocs.Conversion for Python via .NET is a document conversion API that lets you easily convert the most popular file formats, including DOCX, XLSX, PPTX, PDF, CAD drawings, and many more. It preserves layout and formatting while offering customization options for each format.
GroupDocs.Conversion supports a wide range of file formats. For a complete list, see the full list of supported formats.
Ensure that Python 3.9 and the .NET 6 runtime (or higher) are installed on your system.
To install the package, run:
pip install groupdocs-conversion-net
If you already have the package installed and want to update to the latest version, run:
pip install --upgrade groupdocs-conversion-net
Here are some common use cases to get started.
The following example demonstrates how to convert a DOCX file to PDF:
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions
def convert_document_to_another_format():
# Instantiate Converter with the input document
with Converter("./business-plan.docx") as converter:
# Instantiate convert options to define the output format
pdf_convert_options = PdfConvertOptions()
# Convert the input document to PDF
converter.convert("./business-plan.pdf", pdf_convert_options)
if __name__ == "__main__":
convert_document_to_another_format()
The following example demonstrates how to convert each slide in a PPTX presentation to a PNG image and save the output images to a specified folder.
from groupdocs.conversion import Converter
from groupdocs.conversion.filetypes import ImageFileType
from groupdocs.conversion.options.convert import ImageConvertOptions
def convert_all_document_pages():
# Instantiate Converter with the input document
with Converter("./basic-presentation.pptx") as converter:
# Instantiate convert options
png_convert_options = ImageConvertOptions()
# Define the output format as PNG
png_convert_options.format = ImageFileType.PNG
# Convert all pages and save to the output folder
converter.convert_by_page("./converted-pages", png_convert_options)
if __name__ == "__main__":
convert_all_document_pages()
The following example demonstrates how to convert each compressed file in ZIP archive to PDF:
from groupdocs.conversion import Converter
from groupdocs.conversion.options.convert import PdfConvertOptions
def convert_files_within_document_container():
# Instantiate Converter with the input document
with Converter("./compressed.zip") as converter:
# Instantiate convert options
pdf_convert_options = PdfConvertOptions()
# Extract, convert and save output files in PDF format
converter.convert_multiple("./converted-files", pdf_convert_options)
if __name__ == "__main__":
convert_files_within_document_container()
Find more details and examples in the GroupDocs.Conversion for Python via .NET documentation.
We also provide GroupDocs.Conversion packages for other platforms:
Product Page | Docs | Demos | API Reference | Blog | Search | Free Support | Temporary License
FAQs
File converter for the most commonly used formats, including DOCX, PDF, CAD, and many more.
We found that groupdocs-conversion-net demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.