# Preload signature images from server.

**URL:** <https://community.apryse.com/t/preload-signature-images-from-server/3573>\
**Category:** WebViewer\
**Created:** [February 22, 2020, 10:12am UTC](https://community.apryse.com/t/preload-signature-images-from-server/3573 "2020-02-22T10:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syed\_Ali](https://community.apryse.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@Syed\_Ali](https://community.apryse.com/u/Syed_Ali)\
**Post date:** [February 22, 2020, 10:12am UTC](https://community.apryse.com/t/preload-signature-images-from-server/3573/1 "2020-02-22T10:12:00Z")

</div>

Hi All,

I am pretty new to PDFTron. Currently I am checking WebViewer 6.1.0 for our requirement.  
I would need to preload signature images of current user from server to Signature tool upon loading the WebViewer.  
Could you please help me accomplish this? Is there any api available for this?  
Any help on this would be greatly appreciated.

Thanks,

Syed

---

<div class="post-metadata">

**Author:** ![Andy\_Huang](https://community.apryse.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@Andy\_Huang](https://community.apryse.com/u/Andy_Huang)\
**Post date:** [March 2, 2020, 7:20pm UTC](https://community.apryse.com/t/preload-signature-images-from-server/3573/2 "2020-03-02T19:20:09Z")

</div>

Hi Syed,

It is possible to load the images into the signature tool!

You will have to first fetch the image data and convert it to a base64 string. Next, you should increase the max signature count in WebViewer if you have more than two signatures: [https://www.pdftron.com/api/web/WebViewerInstance.html#setMaxSignaturesCount\_\_anchor](https://www.pdftron.com/api/web/WebViewerInstance.html#setMaxSignaturesCount__anchor). You can then get the signature tool from the document viewer using **docViewer.getTool(‘AnnotationCreateSignature’)** to start adding signatures.

There are two methods to adding signatures as there are two different APIs for this. They are both found on the **SignatureCreateTool** returned by **getTool**. The first and recommended option is to use **importSignatures** which takes an array of strings (base64) or an array of array points: [https://www.pdftron.com/api/web/Tools.SignatureCreateTool.html#importSignatures\_\_anchor](https://www.pdftron.com/api/web/Tools.SignatureCreateTool.html#importSignatures__anchor). I recommend this option as it is more direct. The second option is to create the SignatureAnnotation/FreeHandAnnotation manually and use **saveSignatures** method to add them.

Let me know if this helps!

Andy Huang

Software Developer  
PDFTron Systems Inc.

---

<div class="post-metadata">

**Author:** ![Syed\_Ali](https://community.apryse.com/letter_avatar_proxy/v4/letter/s/bb73d2/32.png) [@Syed\_Ali](https://community.apryse.com/u/Syed_Ali)\
**Post date:** [March 3, 2020, 9:32am UTC](https://community.apryse.com/t/preload-signature-images-from-server/3573/3 "2020-03-03T09:32:23Z")

</div>

Hi Andy,

I will try this options and let you know.
