Open Bug 1950656 Opened 23 days ago Updated 23 days ago

[a11y] Automatically create outline (table of contents) metadata from page's headings (<h1>, <h2>, etc.) when printing/saving a page to PDF

Categories

(Core :: Printing: Output, enhancement)

Firefox 135
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: nekohayo, Unassigned)

References

(Blocks 1 open bug)

Details

Summary

Both for convenience and accessibility compliance reasons, in addition to the page title being preserved into the PDF title metadata (bug #1939532), when "printing" (saving) a page to PDF, the web browser engine should automatically create the dynamic table of content that gets shown in PDF readers' sidebars, which lists the headings and their corresponding page position (so that the software and the user can easily know the entire document structure and more easily navigate through it.

Here are two examples of pages that can serve as easy testcases, as they make good use of h1/h2/h3 headings:

Info about implementation in Skia

Searching for "pdf heading print" in Chromium's issue tracker, I found https://issues.chromium.org/issues/41387522 where we see mentions of the Skia graphics library where this feature is available, including:

Additional things I found:

See Also: → 1939532, 1322653, 1321689

This would be one aspect of Tagged PDF generation.

(Currently, our PDF output is generated via cairo, not skia; presumably the cairo_tag_{begin,end} APIs could be used to generate this.)

Blocks: 1657973
You need to log in before you can comment on or make changes to this bug.