TextHighlightAnnotation does not highlight correct text height

Which product are you using?
PDF.js Express Plus

8.7

Detailed description of issue
We are highlighting Text with TextHighlight tool on documents that where scanned and got a full ocr on them. The TextHighlight tool does not highlight the correct text height. Seems to just highlight half of the needed height.
Thats a problem for us, because we are exporting xfdf after annotation has been done and need correct coordinates in the xfdf. Even the coordinates in xfdf just show us half of the needed text height.
Adobe Reader does highlight the correct text height, though.

Expected behaviour
Highlight full text height like Adobe Reader TextHighlight tool does.

Does your issue happen with every document, or just one?
It happens on all scanned documents with ocr in it.

Link to document
(Easyupload.io - Upload files for free and transfer big files easily.

Code snippet
Not in code. Just viewer issue.

Maybe this should be filed as bug also?
Is there a way to set the TextHighlight heigt programatically?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here

Could anyone help with this, please?

Hi tomasz.trillo,

Sincere apologies for the delay, your post was initially removed so there have been no detection in the system.

You can get the quads of the highlight annotation created with the annotation properties:

And then use those quads for the textSelected function for the tool:
https://pdfjs.express/api/Core.Tools.TextHighlightCreateTool.html#TextHighlightCreateTool__anchor

Also I was unable to download the file with the link, can you provide another link to the file?

Best Regards,
Kevin Kim
Web Development Support Engineer
PDFTron Systems, Inc.


Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here