Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyPDF2 deprecation problem
#2
compare
(Sep-20-2023, 10:42 AM)gowb0w Wrote: for page_num in range(pdfreader.numPages):

with

(Sep-20-2023, 10:42 AM)gowb0w Wrote: for page_num in len(pdfreader.pages):

why do you skip the range part?

That said, there are other depreciated parts. Also iterating over pdfreader.pages allows you to work directly with page, no need to use index to get the page object
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
PyPDF2 deprecation problem - by gowb0w - Sep-20-2023, 10:42 AM
RE: PyPDF2 deprecation problem - by buran - Sep-20-2023, 11:19 AM
RE: PyPDF2 deprecation problem - by Larz60+ - Sep-20-2023, 11:50 AM
RE: PyPDF2 deprecation problem - by Pedroski55 - Sep-20-2023, 12:32 PM
RE: PyPDF2 deprecation problem - by gowb0w - Sep-21-2023, 11:50 AM
RE: PyPDF2 deprecation problem - by Pedroski55 - Sep-21-2023, 12:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to avoid deprecation notice merrittr 5 1,538 Nov-27-2023, 11:12 PM
Last Post: rob101
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,735 Aug-07-2023, 05:32 AM
Last Post: DPaul
  Pypdf2 will not find text standenman 2 1,005 Feb-03-2023, 10:52 PM
Last Post: standenman
  pyPDF2 PDFMerger close pensding file japo85 2 2,536 Jul-28-2022, 09:49 AM
Last Post: japo85
  PyPDF2 processing problem Pavel_47 6 9,934 May-04-2021, 06:58 AM
Last Post: chaitanya
  Problem with installing PyPDF2 Pavel_47 2 6,132 Nov-10-2019, 02:58 PM
Last Post: Pavel_47
  wrap_text with openpyxl. How to use documentation to resolve deprecation warning? curranjohn46 4 14,677 Oct-09-2019, 01:04 PM
Last Post: curranjohn46
  pyPDF2 nautilus columns modification AJBek 1 2,967 Jun-07-2019, 04:17 PM
Last Post: micseydel
  Using Pypdf2 write a string to a pdf file Pedroski55 6 20,714 Apr-11-2019, 11:10 PM
Last Post: snippsat
  Merging pdfs with PyPDF2 Pedroski55 0 3,338 Mar-07-2019, 11:58 PM
Last Post: Pedroski55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020