Any flutterweb integration sample available?

Hi there,

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

Best regards,
Kevin Kim

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

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

To set scale with code, please follow this guide:

For pageLoad, you may want to use the pageComplete event
https://pdfjs.express/api/Core.DocumentViewer.html#event:pageComplete__anchor
or the documentLoaded event:
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