pdfplumber icon indicating copy to clipboard operation
pdfplumber copied to clipboard

Add Page.table_of_contents property and tests (fixes #1034)

Open AbdullahMehmoodAwan opened this issue 2 months ago • 0 comments

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.

AbdullahMehmoodAwan avatar Oct 26 '25 11:10 AbdullahMehmoodAwan