Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

easy fixes for PyPDF2 3.0.0 support #22

Open
cjfp opened this issue Sep 22, 2023 · 0 comments
Open

easy fixes for PyPDF2 3.0.0 support #22

cjfp opened this issue Sep 22, 2023 · 0 comments

Comments

@cjfp
Copy link

cjfp commented Sep 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant