A how-to-guide for generating PDF files from a bunch of images using Python.
I had received the transcripts of my Bachelor's degree around a month ago. I always visualized transcripts as one document consisting of marksheets of all the semesters, but, when I received my transcript, I had four sheets. That was annoying for me, as now I had to do multiple scans to upload my transcript somewhere. To make such an upload easier, I can scan all my sheets one time and create a PDF file from images of those sheets. That will make my life easy with transcript uploads, won't that?
So, for creating a PDF file from a bunch of images, I know of two ways.
I, a lover of programming and scripting, am inclined to do the latter way. Let's use Python for the task, shall we?
Using Python for this task will help when we have to do such conversion for hundreds of images, as uploading such a number of images manually is cumbersome and will take forever.
For this task, let's use fpdf library of Python.
from fpdf import FPDF
pdf = FPDF()
pdf.set_auto_page_break(0) sets auto page break to False. Setting auto page break to False is important, otherwise, we might have a blank page after each transcript sheet in the PDF.
Guide to Python Programming Language
This article will explore how to generate QR code in Python and some useful creation features from pyqrcode library. QR codes recently became more popular than ever before, yet few people know that the first iterations of QR codes were created back in 1990s in Japan for the automotive industry.
Python is an interpreted, high-level, powerful general-purpose programming language. You may ask, Python’s a snake right? and Why is this programming language named after it?
Python Hello World Program - Your first step towards Python world. Learn how to create the Hello World Python program in PyCharm.
Python Programming Tutorials For Beginners