Jan-31-2018, 05:09 PM
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.
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.