Generate a pdf from all the images present inside a directory.
The script requires imagemagick package to be installed in the Linux system.
Steps to install imagemagick:
- run
sudo apt install imagemagick
- or one can refer to how-to-install-imagemagick-on-ubuntu
- Clone the folder onto your system
- Add images (
jpg
orpng
orjpeg
) to be combined into the folder. (Note: the pages in the final pdf are ordered based on the images sorted by their names) - Optional: Update the image names as per your preferred order in the output pdf (example: naming the images as
1.jpeg
,2.jpeg
will result in1.jpeg
as the first page and2.jpeg
as the second page in the pdf) - Execute the shell script
- Delete the existing images. Add new images to the folder, and repeat the process for generating a new pdf.
./image2pdf.sh final
will generate a final.pdf in the directory
This folder can be used for quickly generating pdf for submissions (such as assignment submissions) from individual images of handwritten pages. Since captured images from devices such as mobile phones are named automatically in serial order, one can directly dump the images into the folder and generate the final pdf for submission.