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

Fix running error due to PyPDF2 upgrade #1

Open
panando opened this issue Sep 9, 2024 · 0 comments
Open

Fix running error due to PyPDF2 upgrade #1

panando opened this issue Sep 9, 2024 · 0 comments

Comments

@panando
Copy link

panando commented Sep 9, 2024

Some methods in PyPDF2 (version > 1.2.8)library have deprecated, the current version of pdfsm will raise a running error with PyPDF2 > 1.2.8.
I changed the codes to make it runable with PyPDF2 > 1.2.8.
pdf_split_merge.py was modified.

PdfFileWriter --> PdfWriter
PdfFileReader --> PdfReader
pdf.getPage(p) --> pdf.pages[p]
pdf.addPage(p) --> pdf.add_page(p)
pdf.getNumPages()--> len(pdf.pages)

https://github.com/panando/Pdf-Split-Merge/blob/master/pdfsm/pdf_split_merge.py

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