I saved $4.99/month by not buying an android app Cam-Scanner just to convert my documents into a pdf file.

Python Logo


Recently i received my offer letter from a tech company in which i got placed.They needed my signature on the offer letter . I took the printout of the letter and signed it and used Cam-Scanner to get the pictures of the signed offer letter and combine them to form a single pdf document.The main problem was the watermark of Cam-Scanner on every single page as i was using free version. Also, i couldn’t use any online pdf converter as document was confidential. Then came an idea to my mind.Being a programmer i can write my own pictures to pdf converter too =D


I simply wrote a python script to load all the images from the directory, with some pre-processing and fpdf library available for python i combined the images to form a pdf document =D.

Job is done !!

PS: Already received the acknowledgement email from the company.

Here is the python Script i wrote to get the job done.

  1. from os import listdir
  2. from fpdf import FPDF
  3. path = “/home/alphaguy4/Downloads/Offer/” # get the path of images
  4. imagelist = listdir(path) # get list of all images
  5. imagelist.sort()
  6. pdf = FPDF(‘P’,‘mm’,‘A4’) # create an A4-size pdf document
  7. x = 0
  8. y = 0
  9. w = 210
  10. h = 297
  11. for image in imagelist:
  12. pdf.add_page()
  13. pdf.image(path+image,x,y,w,h)
  14. pdf.output(“Offer_Letter.pdf”,“F”)

Leave a comment

Your email address will not be published. Required fields are marked *