Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for PDF outlines #437

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

inthewaves
Copy link
Member

@inthewaves inthewaves commented Jan 4, 2025

Closes #66

PDFs have an ability to hold an outline and pdfjs supports it (see 8.2.2 Document Outline of the PDF 1.7 spec).

The outlines are lazily loaded; they won't be parsed if the user doesn't open the outlines screen. The outlines are first parsed in JavaScript first to resolve page numbers, then a simplified tree is encoded into JSON and passed to JVM code. Finally, the tree is reconstructed and displayed in the UI. Outline parsing is cancellable just in case.

No outlines

outlinestest-1.mp4

Big outline tree

https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf

outlinestest-2.mp4

@thestinger
Copy link
Member

@inthewaves Needs to be rebased.

@inthewaves
Copy link
Member Author

@thestinger Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support document outlines
2 participants