pdfplumber
pdfplumber copied to clipboard
Add Page.table_of_contents property and tests (fixes #1034)
Summary
Implements Issue #1034 by adding a 'table_of_contents' property to both the 'PDF' and 'Page' classes. This lets users extract outlines/bookmarks from PDFs.
Changes
- Added 'table_of_contents' property in 'pdf.py' and 'page.py'
- Added test file 'tests/test_table_of_contents.py'
- Added sample PDF 'tests/pdfs/toc-sample.pdf'
Testing
All tests pass successfully.