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

Widget Page Reference #695

Merged
merged 1 commit into from
Dec 13, 2020
Merged

Widget Page Reference #695

merged 1 commit into from
Dec 13, 2020

Conversation

btecu
Copy link
Contributor

@btecu btecu commented Dec 9, 2020

Exposing the page reference allows for finding the page a widget is on:

for (let widget of pdfField.getWidgets()) {
  let page = document.getPages().find(x => x.ref === widget.P());
  // Do work with the page
}

Example of PDF file that has widgets with page references:
https://www.irs.gov/pub/irs-pdf/fw4.pdf

Copy link
Owner

@Hopding Hopding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be handy. Thanks @btecu!

@Hopding Hopding merged commit 7488595 into Hopding:master Dec 13, 2020
@btecu btecu deleted the page branch December 23, 2020 15:37
Hopding pushed a commit that referenced this pull request Aug 30, 2021
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.

2 participants