[Question] Why size of Stamp is changed after upload?

Hey,

I have one question related to Stamps uploading.

  1. I add a stamp using instance.setToolMode("AnnotationCreateStamp")
  2. Upload dialod opens and I select one .jpg file (~10 MB)
  3. I check newly added stamp using instance.docViewer.on("annotationChanged", ...) => I check size of xfdf (which contains base64 of newly added image)
  4. Using DOMParser I extract base64 string
  5. Check → it weights significantly more then original size (~10 MB). It is more then 70MB

Is there a way to convert it to base64 without this size rise?
Thanks :wink:

Hello, I’m Ron, an automated tech support bot :robot:

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

Guides:APIs:Forums:

We’re looking at this issue.

Hi,

Do you face the issue with other. jpg files? I just tested and looks like the size should just increase ~30% after uploading. Also, could you provide the file you had issue with?

Thanks.

Wanbo

Did you try with large image?
Try with sth like that: sample-jpg-file-for-testing.jpg - Google Drive

I have just tried with the file you provided, but the size of XFDF is ~13MB. I was trying with our online sample here - JavaScript PDF Viewer Demo. Also I was using this blank PDF file as attachedblank.pdf (8.5 KB)
.

Wanbo

I forget to say, that I am using @pdftron/webviewer - v.7.2.0
Could you check how it works for this version?

Hi,

Since looks like it’s working in our latest version, we’d suggest you upgrading the WebViewer version you’re using. Thanks.

Wanbo