Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyPDF2.PDFFileReader
#2
You can download the complete PDF spec here: https://www.adobe.com/content/dam/acom/e...0_2008.pdf
download the source code here: https://pypi.python.org/packages/b4/01/6...883d50ee5e

the source code is in the sub directory: PyPDF2

In that document, search for DocumentCatalog to find details.
see addBookmarkDict pdf.py (source code)
GetOutlines method can be found in pdf.py (in the PyPDF2 source code.
Look in that code for node (which looks to be a dictionary, and outlines
node looks to be a dictionary, so you should be able to look at the keys, Values looked for in GetOutline are: "/First" and "/Next",
so I'm guessing that it can be used to iterate over an outline.
outlines is a list, and is fetched with: getOutlines method also in pdf.py

I'm not going to reverse engineer it all, but you should have enough ammunition here to do it yourself.
Reply


Messages In This Thread
PyPDF2.PDFFileReader - by standenman - Jan-31-2018, 03:40 PM
RE: PyPDF2.PDFFileReader - by Larz60+ - Jan-31-2018, 05:09 PM
RE: PyPDF2.PDFFileReader - by standenman - Feb-01-2018, 06:06 PM
RE: PyPDF2.PDFFileReader - by snippsat - Feb-01-2018, 06:39 PM
RE: PyPDF2.PDFFileReader - by standenman - Feb-01-2018, 10:26 PM
RE: PyPDF2.PDFFileReader - by Larz60+ - Feb-01-2018, 11:00 PM
RE: PyPDF2.PDFFileReader - by standenman - Feb-01-2018, 11:38 PM
RE: PyPDF2.PDFFileReader - by Larz60+ - Feb-02-2018, 01:21 AM
RE: PyPDF2.PDFFileReader - by standenman - Feb-02-2018, 04:32 AM
RE: PyPDF2.PDFFileReader - by Larz60+ - Feb-02-2018, 05:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PyPDF2 deprecation problem gowb0w 5 4,558 Sep-21-2023, 12:38 PM
Last Post: Pedroski55
  ModuleNotFoundError: No module named 'PyPDF2' Benitta2525 1 1,655 Aug-07-2023, 05:32 AM
Last Post: DPaul
  Pypdf2 will not find text standenman 2 979 Feb-03-2023, 10:52 PM
Last Post: standenman
  pyPDF2 PDFMerger close pensding file japo85 2 2,500 Jul-28-2022, 09:49 AM
Last Post: japo85
  PyPDF2 processing problem Pavel_47 6 9,889 May-04-2021, 06:58 AM
Last Post: chaitanya
  Problem with installing PyPDF2 Pavel_47 2 6,096 Nov-10-2019, 02:58 PM
Last Post: Pavel_47
  pyPDF2 nautilus columns modification AJBek 1 2,950 Jun-07-2019, 04:17 PM
Last Post: micseydel
  Using Pypdf2 write a string to a pdf file Pedroski55 6 20,569 Apr-11-2019, 11:10 PM
Last Post: snippsat
  Merging pdfs with PyPDF2 Pedroski55 0 3,321 Mar-07-2019, 11:58 PM
Last Post: Pedroski55
  PyPDF2 encrypt Truman 3 5,474 Jan-19-2019, 12:18 AM
Last Post: snippsat

Forum Jump:

User Panel Messages

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