Simple python script for pdf merging and image to pdf conversion.
This happened when I was in the 6th semester of my Bachelor Degree. I prepared answers to an assignment and saved them in separate pdf files. But my professor asked me to submit them in a single pdf 😔. I started working on Word from Microsoft Office. The PDFs were lengthy and I also had to include some pictures. It was a boring task 😅. So, I turned to all-knowing Google to see if there was any tool which merged multiple PDFs into one file. I came across PyPDF2 and img2pdf. With a few lines of code, I merged 25 pages and 5 images to a single pdf file within a few seconds. 😄
- Clone the repo and run
main.py
- Follow on screen instructions.
- PyPDF2 : A Pure-Python library built as a PDF toolkit.
- img2pdf : Lossless conversion of raster images to PDF.
- colorama : Makes ANSI escape character sequences (for producing colored terminal text and cursor positioning) work under MS Windows.
Happy Coding. 👨💻