https://github.com/healeycodes/simple-images-to-pdf
A tiny Python program to create PDF files from multiple images.
https://github.com/healeycodes/simple-images-to-pdf
Last synced: 5 months ago
JSON representation
A tiny Python program to create PDF files from multiple images.
- Host: GitHub
- URL: https://github.com/healeycodes/simple-images-to-pdf
- Owner: healeycodes
- License: mit
- Created: 2018-02-11T18:43:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T09:56:02.000Z (almost 8 years ago)
- Last Synced: 2024-10-05T17:42:01.485Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
### Simple Images-to-PDF
A tiny Python program to create a single PDF file from multiple images (You're welcome, Mum!)
Designed for a computer-illerate user who was losing time while scanning contracts and converting them to PDF.
```
Menu:
1: Create new PDF file
2: Quit
>> 1
Name of new PDF file: test
Path to save location: C:/files/
Path to folder containing images (Ex: "C:/images"): C:/images/
test.pdf created in C:/images/
```
The pages in the PDF output are sorted by the numbers in the image filenames. For example, `"Image01"` comes before `"Image02"`. To be more specific, the filenames are iterated over to see which characters can be converted to integers. These integers are then concatenated and ran through `sort()`.
For example, `"01foobar0" becomes "010"`, `"onetwo3seven" becomes "3"`, `"1.1" becomes "11"`
#### Dependencies:
```
$ pip install Pillow
$ pip install fpdf
```
#### Run
```
python simple-images-to-pdf.py
```
#### License
MIT.