You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simply converter from png to pdf and vice versa.
With this script you can choose if create a pdf using a set of images or to split a pdf in pages and save them as images.
The default way to run this script is merging images in one pdf, using -i and -o arguments.
If you want to do che opposite process you must use -p , -o , -r y arguments.
Source and destination args are mandatory. You can also choose if delete the elements from source after the conversion.
Requirements
To use this script you must install the following modules
pdf2image==1.14.0
Pillow==8.0.1
Also, to use pdf2image, you need to download poppler, and add bin folder to PATH.
The script was built to being used from terminal/cmd.
If you want to build a pdf from images, a simple usage is the following:
main.py -i <source> -o <destination>
If you want to split a pdf in images, you have to use this syntax:
main.py -p <source> -o <destination> -r y
The options are:
-i, --image_source_folder 'Source from which to take image'
-p, --pdf_source 'Source from which to take .pdf files'
-o, --destination_folder 'Destination where to save .pdf or images files'
-d, --delete_after_run, 'Choose if delete files after conversion [y/n], DEFAULT: n'
-r, --reverse 'If yes, splits pdf in images, else vice versa [y/n], DEFAULT: "n"'