Repository navigation
Sync creating-and-modifying-pdfs with the updated tutorial - #953
Open
realpython-bot wants to merge 1 commit into
Open
realpython-bot wants to merge 1 commit into
realpython-bot wants to merge 1 commit into
Conversation
…e and Modify PDF Files in Python Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintenance update of Create and Modify PDF Files in Python. The article now pins its install commands to
pypdf==3.8.1andreportlab==5.1.1, so the folder gets a matchingrequirements.txtand a short Requirements section in the README.pypdfstays at 3.8.1 because the concatenating and merging examples usePdfMerger, whichpypdf5.0.0 removed.ReportLab moves from 4.0.0 to 5.1.1. ReportLab 5.1.1 needs Pillow 13, which needs Python 3.11 or later, so the README states that floor.
No code changes were needed. The scripts already match the article's blocks, and the two code fixes in the article (a missing
PdfWriterimport and anoutput_filetypo) are in exercise solutions that this folder doesn't ship.Article draft (update clone): https://realpython.com/pbjt/blog/post/2720/change/
Maintenance card: https://trello.com/c/cpfwDlr0
Verification: installed
requirements.txtinto fresh venvs on Python 3.11.18 and 3.15.2 (pypdf 3.8.1, reportlab 5.1.1, pillow 13.0.0) and ran all six scripts againstpractice_files/. Scripts 01 to 04 and 06 complete. Script 05 stops at its deliberateFileNotDecryptedErrordemo (# Raises FileNotDecryptedError), as before.ruff@0.14.1 format --checkandruff@0.14.1 checkboth pass on the folder.🤖 Generated with Claude Code