# Is possible to set Measurement Calibration Programmatically?

**URL:** <https://pdfjs.community/t/is-possible-to-set-measurement-calibration-programmatically/1216>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [December 3, 2021, 6:32am UTC](https://pdfjs.community/t/is-possible-to-set-measurement-calibration-programmatically/1216 "2021-12-03T06:32:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_onehub](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@dev\_onehub](https://pdfjs.community/u/dev_onehub)\
**Post date:** [December 3, 2021, 6:32am UTC](https://pdfjs.community/t/is-possible-to-set-measurement-calibration-programmatically/1216/1 "2021-12-03T06:32:36Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
8.1.1

**Detailed description of issue**  
Hi,  
Is possible to set measurement calibration programmaticaly ?  
because I don’t see any methods to do it from LineAnnotation API docs.  
 ![Screen Shot 2021-12-03 at 1.17.43 PM](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/52a2a3b600dc8eff2a6e0a1bbd0ba857e6cc73e6.png)

Thanks 😄

**Expected behaviour**  
I want to create my own Calibration modal interface outside the viewer

**Does your issue happen with every document, or just one?**  
{Answer here}

**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
{Provide a relevant code snippet}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [December 3, 2021, 6:32am UTC](https://pdfjs.community/t/is-possible-to-set-measurement-calibration-programmatically/1216/3 "2021-12-03T06:32:40Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

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

Guides:
- [Set up measurement tools](https://pdfjs.express/documentation/measurement/setup)
- [Create custom annotation styles](https://pdfjs.express/documentation/annotation/customizing-default-annotation-styles)
- [Measure tools with PDF.js Express - Get started](https://pdfjs.express/documentation/measurement/overview#get-started)

APIs:
- [Core.Annotations.LineAnnotation - new LineAnnotation( [initializer])](https://pdfjs.express/api/Core.Annotations.LineAnnotation.html#LineAnnotation__anchor)
- [Annotations.LineAnnotation - setRect(rect)](https://pdfjs.express/api/7.0/Annotations.LineAnnotation.html#setRect__anchor)
- [Core.Annotations.LineSelectionModel](https://pdfjs.express/api/Core.Annotations.LineSelectionModel.html#__anchor)

Forums:
- [How to bind ‘area’ field from measurmentOverlay to custom textbox/label](https://pdfjs.community/t/how-to-bind-area-field-from-measurmentoverlay-to-custom-textbox-label/66/2)
- [Rotate StampAnnotation](https://pdfjs.community/t/rotate-stampannotation/180/2)
- [How to add scale and color to the converted annotation](https://pdfjs.community/t/how-to-add-scale-and-color-to-the-converted-annotation/305/2)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [December 6, 2021, 10:07pm UTC](https://pdfjs.community/t/is-possible-to-set-measurement-calibration-programmatically/1216/4 "2021-12-06T22:07:49Z")

</div>

Hey!

See [this guide](https://www.pdftron.com/documentation/web/guides/measurement-tools/#setting-scale-and-precision-programmatically) for information on setting scale programmatically. (This is a PDFTron guide but everything is the exact same.

Let me know if you run into any issues.

Logan
