Skip to main content

Img2pdf GitHub license GitHub stars

This is command line utility to convert images in a directory to PDF file.

This is very simple CLI to convert images in a directory to a PDF file. This use Pillow( PIL ), to achieve this.

Using pip Version

Type the below command to install img2pdf.

pip install imgtopdfeasy

Typing img2pdf in your terminal would give the options available and the Parameters required like below.

usage: img2pdf [-h] -i INPUT -o OUTPUT -ext EXTENSION [--border]
               [--border_size BORDER_SIZE] [--border_color BORDER_COLOR]

Converts Images To Pdf

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input file folder full path. Realtive or abosolute
  -o OUTPUT, --output OUTPUT
                        Output file name,No pdf required
  -ext EXTENSION, --extension EXTENSION
                        File extension of image to add.
  --border              Add border to Images
  --border_size BORDER_SIZE
                        Size of border of Images
  --border_color BORDER_COLOR
                        Colour of Border of Images

Made with ❤ By Naveen

Its that simple. Typing

img2pdf -i <Path-to-folder> -o <Path-to-output-file> -ext <extension-of-image-to-add>

would simply create you required file.

Note: Path to output file doesn't require .pdf to be added at last. Also, border feature would be documented soon.

Using Development Version

To use this go to the directory where you have images. Then type the commands below.

git clone https://github.com/naveen521kk/img2pdf.git

This create a folder called img2pdf. Then go into the folder by

cd img2pdf

After that typing

poetry install

would install necessary Requirements for it to run. The above command requires python-poetry installed.

After that typing

python imgtopdfeasy/img2pdf.py -h

in your terminal would run the program and show the necessary arguments required like below.

usage: img2pdf [-h] -i INPUT -o OUTPUT -ext EXTENSION [--border]
               [--border_size BORDER_SIZE] [--border_color BORDER_COLOR]

Converts Images To Pdf

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input file folder full path. Realtive or abosolute
  -o OUTPUT, --output OUTPUT
                        Output file name,No pdf required
  -ext EXTENSION, --extension EXTENSION
                        File extension of image to add.
  --border              Add border to Images
  --border_size BORDER_SIZE
                        Size of border of Images
  --border_color BORDER_COLOR
                        Colour of Border of Images

Made with ❤ By Naveen

Each of it are self explanatory.

Crafted with 💓 by Naveen.

Release files for imgtopdfeasy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imgtopdfeasy 0.3.0
File Size Uploaded
imgtopdfeasy-0.3.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for imgtopdfeasy 0.3.0
File Interpreter ABI Platform
imgtopdfeasy-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / imgtopdfeasy-0.3.0.tar.gz

Download URL imgtopdfeasy-0.3.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
af887a3bf1d27b5de33712301186bc69a4a892ff7c1fa927fffac3c23b4249b1
BLAKE2b-256 checksum
How to use checksums
c021378b5518b2ed76cfcabf94fa105ea4dcc0009b480a536eaf488ded6077bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Linux/5.8.0-1042-azure

Release files / imgtopdfeasy-0.3.0-py3-none-any.whl

Download URL imgtopdfeasy-0.3.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86173992fd35ee1aadde81eb45bd5d85dc019871e5a3340c4534e777b11ada57
BLAKE2b-256 checksum
How to use checksums
1d54a3e238fbef1a085ebeade4b68cd8c9ff742bc6b77019f32c8e96a4d92c51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.11 CPython/3.8.12 Linux/5.8.0-1042-azure

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page