Working with PDFs adds more value when you can create them from scratch programmatically. Let's see how we can create our own PDF files in this section.
We will continue to use the
PyPDF2 module for this recipe and will deal with its
PdfFileMerger classes. We will also use another module,
fpdf, to demonstrate adding content to PDF files. We will talk about this later in the recipe.
Exercise.pdf. The following screenshot shows the contents of this file. It contains two pages; the first page is a technical exercise ...