Install
sudo apt install img2pdf
Check if latest version
img2pdf --version
If you need the latest version, need to install via pip
sudo apt-get remove img2pdfpip3 install --upgrade --force-reinstall img2pdf
If you get the following warning
WARNING: The script img2pdf is installed in '/home/USER/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Edit ~/.bashrc
and add the following
export PATH=~/.local/bin:$PATH
Reload ~/.bashrc
source ~/.bashrc
Usage
img2pdf ~/test.png -o test.pdf
If you get the following error
ERROR:root:error: Invalid rotation (0)
The tool will not accept image with invalid rotation exif, so you need to fix it to proceed.