img-pdf-convert tool allows you to convert images to PDF files and vice versa on GNU/Linux, macOS and Windows systems.
- Supported OS
- Prerequisites
- Supported image formats for converting to PDF
- Installation
- Available options
- Usage
- Contributing
- License
- GNU/Linux
- Windows
- macOS
- JPEG
- PNG
- WEBP
- TIFF
- BMP
- ICO
- ICNS
- PBM
- PGM
- PPM
1. Clone this repo:
git clone https://github.com/StellarSand/img-pdf-convert.git
2. Move into the project directory:
cd img-pdf-convert
3. Give executable permissions to the script (Not required for Windows):
chmod +x img-pdf-convert
-h, --help Show this help message and exit
-lf, --list-formats Show a list of supported image formats
---Image(s) to PDF---
-i, --image-files Path to the image files
-o, --output-file Output file
---PDF(s) to image(s)---
-p, --pdf-files Path to the PDF files
-d, --directory Output directory for extracted images (optional)
-if, --image-format Output format for extracted images (optional, default: jpeg)
python3 img-pdf-convert -i <image> -o <output file>
python3 img-pdf-convert -p <PDF>
Examples:
python3 img-pdf-convert -i icon.png -o icon.pdf
python3 img-pdf-convert -i icon1.png icon2.jpg -o /home/user/Downloads/new_icon.pdf
python3 img-pdf-convert -p document.pdf
python3 img-pdf-convert -p document1.pdf document2.pdf -d /home/user/Downloads -if png
Convert all images with a specified format to PDF file:
python3 img-pdf-convert -i *.png *.jpg -o icon.pdf
Convert all PDF files to images:
python3 img-pdf-convert -p *.pdf
Pull requests can be submitted here.
This project is licensed under the terms of GPLv3 license.