https://github.com/aditeyabaral/convert2pdf
A Python3 application that converts multiple Office files into their PDF versions automatically thus saving you the hassle of looking for online converters or converting them manually.
https://github.com/aditeyabaral/convert2pdf
comtypes-library pdf-generation python python-3
Last synced: 12 months ago
JSON representation
A Python3 application that converts multiple Office files into their PDF versions automatically thus saving you the hassle of looking for online converters or converting them manually.
- Host: GitHub
- URL: https://github.com/aditeyabaral/convert2pdf
- Owner: aditeyabaral
- Created: 2020-03-31T06:24:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T07:18:19.000Z (almost 6 years ago)
- Last Synced: 2025-04-16T01:50:48.399Z (over 1 year ago)
- Topics: comtypes-library, pdf-generation, python, python-3
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 4
- Watchers: 1
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Convert2PDF
A Python3 application that converts multiple Office files into their PDF versions automatically.
Convert2PDF takes in a file type as input and exports all matching file extensions for that Office format (such as, a word document may have the extension .doc or .docx) and saves them in a separate directory, thus saving you the hassle of converting them all manually or looking for online converters. Made during the COVID-19 outbreak to kill Quarantine Boredom :P
*Since comtypes primarily supports Windows, Convert2PDF will not work on other platforms* :(
# Getting Started
Convert2PDF requires **comtypes** and **img2pdf** to be installed. This can be done using a simple pip command.
```pip install -r requirements.txt```
That's it. You're good to go!
# How to use Convert2PDF
### To convert all files in a directory
You can convert all files in a directory using
```python Convert2PDF.py```
or
```python Convert2PDF.py -f *```
### To convert specific formats
You can also explicitly mention which files you would like to convert. To specify a particular type, pass in the respective format paramter as a command line argument.
##### For all Word Document files
```python Convert2PDF.py -f word```
##### For all Powerpoint files
```python Convert2PDF.py -f ppt```
##### For all Excel Spreadsheets
```python Convert2PDF.py -f excel```
##### For all Image files
```python Convert2PDF.py -f img```
### Missing file formats
A list of various file formats has been declared at the top section of the code. Don't see a file extension you need? You can add it in!