Skip to content

[FEATURE] Add support for Tagged PDFs #2046

Open
@wbittlehsl

Description

Is your feature request related to a problem? Please describe.

I want to produce a tagged PDF document. A tagged PDF document is a document who contains "tags", also called bookmarks, which is an accessibility feature (see image below). When the PDF is read in a compliant reader, there's a UI that allows the user to jump to the tagged locations in the PDF.

Describe the solution you'd like

A solution that supports what the native Skia library supports. I tried to review the Skia code and found the following commit from 2018. It contains a test as well that describes the usage of the feature.
In particular, the PDFTag, SkPDF::Metadata.fStructureElementTreeRoot and SkPDF::SetNodeId were the key pieces. I think an identical structure in SkiaSharp would be a great starting point.

On top of the basic functionality, it would be amazing if there was an option to auto-generate the tags based on the document links already provided in the document rather than manually building it.

Describe alternatives you've considered

I didn't see a way to do this with the current APIs so I do not believe there's a work around. You can build document links and generate a TOC for example, but if you want links to all elements of a large PDF, the TOC becomes huge. It would be better to have a high-level TOC and a fully linked bookmark tree.

Additional context

For example:

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions