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

(Feature request) Denoting PDF pagination artifacts (i.e. page headers and footers) in HTML output #13857

Closed
provpup opened this issue Aug 3, 2021 · 2 comments

Comments

@provpup
Copy link

provpup commented Aug 3, 2021

Hello,

I am looking to use pdf.js to capture text selections a user makes in a PDF document. If the user were to make a text selection spanning multiple pages, and if the pages have a header or footer, then the header/footer text is also selected. Is there a way to add some ARIA role or equivalent markup to the rendered span elements for the header and footer so that my code can ignore them when computing the user's text selection?

According to Table 330 in Section 14.8.2.2.2 of the PDF spec: https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf (page 575), page headers and footers are specified using /Artifact propertyList, and from this code https://github.com/mozilla/pdf.js/blob/master/web/struct_tree_layer_builder.js, it looks to assign an ARIA role given a PDF element.

Thanks!

@Snuffleupagus
Copy link
Collaborator

Please attach example PDF documents that can be used to reproduce this, since the issue doesn't seem easily actionable otherwise.
(When opening an issue, please remember to provide all of the information requested in the ISSUE_TEMPLATE.)

@brendandahl Is this perhaps something that you'd want to implement as a follow-up/improvement to PR #13171?

@Snuffleupagus
Copy link
Collaborator

Please attach example PDF documents that can be used to reproduce this, since the issue doesn't seem easily actionable otherwise.

Given that no such PDF documents have been provided thus far, closing as INCOMPLETE for now.

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

No branches or pull requests

3 participants