Skip to content

PDF exports seem to be untagged (no /StructTreeRoot, headings, or logical structure) #2178

@Ovgodd

Description

@Ovgodd

I tagged @YousefED here, as recommended by @virgile-dev.

Describe the bug

When exporting a document to PDF through BlockNote’s default PDF pipeline (BlockNote → React-PDF → @react-pdf/pdfkit), the generated PDF seems to contain no Tagged PDF structure.

Based on my tests :

  • “Tagged PDF” appears as No
  • There is no /StructTreeRoot
  • No /H1, /P, /Table, /Figure structure elements
  • No /MCID entries
  • No /RoleMap
  • No logical reading order

This results in a PDF that screen readers cannot interpret and that cannot comply with WCAG / PDF/UA / RGAA accessibility requirements.

React-PDF’s own issue (#3179) also mentions that accessibility is currently not supported, even though @react-pdf/pdfkit internally contains PDFKit’s accessibility APIs.

For more detailed research, please refer to my document:
FR :
EN :


To Reproduce

  1. Create a BlockNote document containing headings, paragraphs, lists, and images.
  2. Use the built-in PDF export.
  3. Open the resulting PDF using
  4. Observe that:
    • Tagged PDF = No
    • The structure tree is empty
    • Screen readers do not announce headings or regions
    • No alternative text is present on images

Expected behavior

When semantic elements (headings, paragraphs, lists, tables, images, etc.) are used in BlockNote, the exported PDF should ideally embed the corresponding structure:

  • /StructTreeRoot
  • /H1, /H2, /H3
  • /P, /Span
  • /Table, /TR, /TH, /TD
  • /Figure with /Alt text
  • /MCID entries for reading order
  • A valid RoleMap mapping custom types to standard PDF roles

These elements are required for proper accessibility and PDF/UA compliance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions