Skip to main content

This package aims to convert Microsoft Office file types to PDF.

Project description

msoffice2pdf

This package aims to convert Microsoft Office file types to PDF. This lib uses the comtypes package which makes it easy to access and implement custom, dispatch-based COM interfaces or LibreOffice software.

For use in Windows environment and soft="msoffice" Microsoft Office must be installed.

For use in Windows environment and soft="libreoffice" you need the latest version of LibreOffice(soffice) installed.

For Ubuntu(linux) environment it is only possible to use soft="libreoffice", that is, LibreOffice(soffice).

Supported files: [".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".txt", ".xml"]

Installation

pip3 install msoffice2pdf

Windons Only

Delete all cache files from the folder below in case there is any error with Microsoft Office conversion: C:\Users<User>\AppData\Local\Programs\Python\Python39\Lib\site-packages\comtypes\gen

Example:

from msoffice2pdf import convert

output = convert(source="C:/Users/<User>/Downloads/file.docx", output_dir="C:/Users/<User>/Downloads", soft="msoffice")

print(output)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msoffice2pdf-0.0.4.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

msoffice2pdf-0.0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file msoffice2pdf-0.0.4.tar.gz.

File metadata

  • Download URL: msoffice2pdf-0.0.4.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for msoffice2pdf-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c68ef44efe69f61f194b8de08298c14c62aba5f63aeb2b6ec148501fd60dea4d
MD5 c53f5104ccf3ed6b04679e63c53153b8
BLAKE2b-256 99d72f4e41d8b328c239acc8325c9aded62e80bb6f1ce1b3f3aaa7d5158bc2dc

See more details on using hashes here.

File details

Details for the file msoffice2pdf-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: msoffice2pdf-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for msoffice2pdf-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e7ae859f240df3850cf594e394338d9d90d6e1c682ae51948226dd18b0bd14a0
MD5 192a40dd1de10ed140194048c2873077
BLAKE2b-256 15efb6add226439062ce0277aa925c12147303e98ca97f235da4b31a4b43d5db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page