Skip to content

easy fixes for PyPDF2 3.0.0 support #22

Description

@cjfp

On my system pdftools is installed at:

/usr/local/lib/python3.8/site-packages/pdftools/pdftools.py

If I edit this file as follows:

s/PdfFileReader/PdfReader/g
s/PdfFileWriter/PdfWriter/g
s/addPage/add_page/g

then the deprecation errors I get from PyPDF2 3.0.0 go away and things work as expected when merging PDFs (so far). There might be other updates required, of course, but hopefully find and replace is sufficient.

Note: there is an open pull request that also includes these fixes, as well as a move from PyPDF2 to pypdf. So the point of this issue is just to document a quick local workaround.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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