diff --git a/creating-and-modifying-pdfs/README.md b/creating-and-modifying-pdfs/README.md index d7a4387866..8213c832aa 100644 --- a/creating-and-modifying-pdfs/README.md +++ b/creating-and-modifying-pdfs/README.md @@ -9,4 +9,14 @@ There are two subfolders in this folder: The source code files are organized by section of the tutorial, and the start of each subsection is indicated with comments. +## Requirements + +The code requires Python 3.11 or later. Install the pinned versions of `pypdf` and ReportLab that the tutorial uses with: + +```sh +$ python -m pip install -r requirements.txt +``` + +The tutorial pins `pypdf` to 3.8.1 because the concatenating and merging examples use the `PdfMerger` class, which later `pypdf` releases removed. + The content of the companion tutorial was adapted from the "Creating and Modifying PDF Files" chapter of the book [*Python Basics: A Practical Introduction to Python 3*](https://realpython.com/products/python-basics-book/). If you enjoy this tutorial, check out the full book! diff --git a/creating-and-modifying-pdfs/requirements.txt b/creating-and-modifying-pdfs/requirements.txt new file mode 100644 index 0000000000..be09522e0d --- /dev/null +++ b/creating-and-modifying-pdfs/requirements.txt @@ -0,0 +1,2 @@ +pypdf==3.8.1 +reportlab==5.1.1