Interaction with tags from the PDF

Product: Pdftron webviewer

Product Version: 8.0.1

Question 1: Does PDFExpress also supports identifying tagged PDFs same like PDFTron? Or we need to go with PDFTron itself?

Referred link: https://www.pdftron.com/documentation/samples/js/LogicalStructureTest

Question 2: Can we add event listener on Tag selection? Or Is there any option in header like annotations, shapes, view?

Scenario is, We have tagged PDF. User should select the tag and we need to focus the associated text field outside webviewer iframe. Next, user can type in the text box which will update the tag content.

So basically we do not want to prefer PDF interaction with annotations where text box fields like a form. We have text fields in separate sibling Vue component,with which we need interaction between tags and associated text/ any other html element from the outside component.

Can someone suggest best suitable approach?

Hello,

Thank you for contacting PDFTron Support.

Question 1: Does PDFExpress also supports identifying tagged PDFs same like PDFTron? Or we need to go with PDFTron itself?
PDFTron WebViewer uses PDFNet to identify tags in tagged PDFs, however, PDFJS Express uses the PDF.js open-source rendering engine behind the scenes. So unfortunately, only PDFTron WebViewer supports tagged PDFs.

Question 2: Can we add event listener on Tag selection? Or Is there any option in header like annotations, shapes, view?

I am not really sure what you are trying to achieve, so I would like to ask a few clarifying questions.

User should select the tag and we need to focus the associated text field outside webviewer iframe.

Please correct me if I am wrong, my understanding for this is that user should select the tag (which locates on the outside of webviewer iframe?), then we need to focus the associated text field outside webviewer iframe.

Next, user can type in the text box which will update the tag content.
The “tag content” is referring to the tag itself? or its tagged content?

Thank you for your information, and we look forward to hearing from you.

Best Regards,
Jason Hu
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com

Hello Jason,

Thanks for the response.
Here are the few more details about the requirement.

Step 1: I created one sample Tagged PDF. Displaying it using PDFTron webviewer.

Step 2: There are few fields on UI like address, date, etc of type textbox. (Outside iframe, like any other fields on form)

Step 3: We need to map this fields with tags on agreement one to one.

Step 4. So that either user can type in a text field, this will update the respective tagged content. User can also select the tag on PDF, which will focus the mapped textfield to type.

Answer to: The “tag content” is referring to the tag itself? or its tagged content?,

Referring to Tagged content.

Hello,

Sorry that we are still quite foggy about what you are trying to achieve here. Are you looking for the tags functionalities like in Adobe PDF? Could you send us some visualization files like images to help us understand so that we can better assist you?

Best Regards,
Jason Hu
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com