Skip to content

python 3.12 deprecated PyPDF2 functions #4

@impossibleobject

Description

@impossibleobject

Attached is an update suggestion as txt. Thanks for the great tool I wish I looked for it earlier.

PyPDF2 changes w/ respective lines:
PdfFileReader -> PdfReader 18
reader.getPage(pageNumber) -> reader.pages[page_number] 29, 33, 42
extractText -> extract_text 25
addPage -> add_page 43
reader.numPages -> len(reader.pages) 32, 40

Python3.12 change 26
SyntaxWarning: invalid escape sequence '\s'
https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes
2nd bullet point

pdf_trimmer.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions