# Any flutterweb integration sample available?

**URL:** <https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921>\
**Category:** Technical Support\
**Created:** [October 31, 2023, 5:45pm UTC](https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921 "2023-10-31T17:45:17Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [December 1, 2023, 7:49pm UTC](https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921/21 "2023-12-01T19:49:39Z")

</div>

Hi there,

This would be the scale input container that is tied to the tool:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/0/083f7eecf59818295ec6c5ce016883c6c7b3db0a.png)

Best regards,  
Kevin Kim

---

<div class="post-metadata">

**Author:** ![sachin](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@sachin](https://pdfjs.community/u/sachin)\
**Post date:** [December 7, 2023, 5:04pm UTC](https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921/22 "2023-12-07T17:04:49Z")

</div>

I am getting this error when i tried to set scale from code  
“Passing a function to tool.setStyles is deprecated, please pass an object instead. The deprecated argument will be removed in 7.0.”

Also please let me know how can i set scale for all from code (distance, area, perimeter, etc)

I would like to know how can I reset all scale to 1pt on page load

Also how can I hide the scale measurement line after setting scale

Thanks

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [December 11, 2023, 8:16pm UTC](https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921/23 "2023-12-11T20:16:48Z")

</div>

Can you share your code snippet that is using to set the scale?

To set scale with code, please follow this guide:

> **[Customize Measurement Tools for PDF.js Express | Documentation](https://pdfjs.express/documentation/measurement/customize)**

For pageLoad, you may want to use the pageComplete event  
[https://pdfjs.express/api/Core.DocumentViewer.html#event:pageComplete\_\_anchor](https://pdfjs.express/api/Core.DocumentViewer.html#event:pageComplete__anchor)  
or the documentLoaded event:  
[https://pdfjs.express/api/namespaces.list.html#event:documentLoaded\_\_anchor](https://pdfjs.express/api/namespaces.list.html#event:documentLoaded__anchor)

To hide the scale measurement line, you can disable/enable them:  
` instance.UI.disableElements(['calibrateButton']);`  
However note that it will disable/enable them entirely.

If you have any additional inquiries regarding PDF.js, please create a separate topic if it is no longer related to the original post.

Best regards,  
Kevin Kim

[Previous page](https://pdfjs.community/t/any-flutterweb-integration-sample-available/2921.md?page=1)
