betatim / notebook-as-pdf

Save Jupyter Notebooks as PDF
BSD 3-Clause "New" or "Revised" License
367 stars 72 forks source link

PdfFileWriter is deprecated and was removed in PyPDF2 3.0.0. Use PdfWriter instead. #40

Open odeckmyn opened 1 year ago

odeckmyn commented 1 year ago

PyPDF2 is now forcing use of PdfWriter class instead of PdfFileWriter so the library is broken.

Would you please update the code ?

In the meantime, I'm trying to force PyPDF2==2.12.1 in my requirements.

betatim commented 1 year ago

It sounds like you've looked into this issue so if you have the time you could also submit a Pull Request making the changes needed. That would be fantastic and help me out because I've not kept up with PyPDF2 development.

AleksandrTulenkov commented 1 year ago

PyPDF2 is now forcing use of PdfWriter class instead of PdfFileWriter so the library is broken.

Would you please update the code ?

In the meantime, I'm trying to force PyPDF2==2.12.1 in my requirements.

Added pull request with fixes

Illviljan commented 1 year ago

I see that #41 has been merged. Could we get a new release as well?

jjdmol commented 1 year ago

+1 for a new release. Can't install and use notebook-as-pdf without this fix or the workaround mentioned.