# How to enable SNAP function

**URL:** <https://pdfjs.community/t/how-to-enable-snap-function/301>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [September 28, 2020, 1:46pm UTC](https://pdfjs.community/t/how-to-enable-snap-function/301 "2020-09-28T13:46:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran.patil](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kiran.patil](https://pdfjs.community/u/kiran.patil)\
**Post date:** [September 28, 2020, 1:46pm UTC](https://pdfjs.community/t/how-to-enable-snap-function/301/1 "2020-09-28T13:46:38Z")

</div>

How to enable **snapping** function?. A feature where I can use area, perimeter tool to draw accurately.  
I have referred the documentation - [https://pdfjs.express/api/Tools.AreaMeasurementCreateTool.html#setSnapMode\_\_anchor](https://pdfjs.express/api/Tools.AreaMeasurementCreateTool.html#setSnapMode__anchor)

Here is my small code snippet which I have tried to do.

`tool = this.viewerInstance.docViewer.getTool('AnnotationCreateAreaMeasurement');`  
` tool.setSnapMode(1);`  
`this.viewerInstance.docViewer.setToolMode(tool);`

Another confusion is the `setSnapMode(mode)`. Here mode is a number so what is the exact parameter to pass in setSnapMode. Also will it work with or without `fullAPI`? if no then how to enable `fullAPI` ?  
I have tried this in setting this true in WebViewer({ })  
`fullAPI: true`.  
But getting this error - ` Error: "fullAPI" is not a valid constuctor option for PDF.js Express`

---

<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:** [September 28, 2020, 2:05pm UTC](https://pdfjs.community/t/how-to-enable-snap-function/301/2 "2020-09-28T14:05:18Z")

</div>

Hi there!

Snapping is not supported in PDF.js Express. A lot of our documentation is shared with our sister product, [PDFTron WebViewer](https://www.pdftron.com/webviewer/), and we must have forgot to exclude that API from Express.

Thanks!  
Logan

---

<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:** [September 28, 2020, 2:05pm UTC](https://pdfjs.community/t/how-to-enable-snap-function/301/3 "2020-09-28T14:05:21Z")

</div>

Closed on September 28, 2020, 2:05pm UTC


