Can I somehow change the height of a text selection

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version

Detailed description of issue
We have two types of annotations on the project.
The first one generated by service by analyzing the pdf, and the second one is created on UI (we use quads from textSelected event for new annotation creating). Annotations that created on UI have different sizes than those that created by the service. We want to normalize them. We want to use the same algorithm on service and UI for annotation creation to generate as similar annotation sizes as possible.

And the question:
Can I somehow change the size of text selection?

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:


Hello dbezdushniak,

For the UI, you can create your own custom text Selection tool following this guide: Core Engine for JavaScript PDF Viewer | PDF.js Express SDK

This file may be of relevance in setting the quads:

For text selection outline, you can use the TextSelectionModel class to modify:
and getDimensions method may also be relevant:

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