This is a simple Python program that can convert a collection of image files into a single PDF file.
- Python
- img2pdf library
pip install img2pdf- Put all the image files you want to convert into a single folder.
- Open a terminal or command prompt and navigate to the folder where the Python script is saved.
- Run the following command to convert the image files to a PDF:
python img2pdf.pyThe PDF file will be saved as Output.pdf in the same folder as the script.
- The allowed file types for image files are
.jpg,.jpeg,.png, and.gif. - The image file names should be in alphabetical order or numerically ascending order to ensure that they are arranged in the correct order in the output PDF.