WebViewer Version: 8.7.0
Do you have an issue with a specific file(s)?
Are you using the WebViewer server?
No, only Viewer
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework?
Is your issue related to annotations?
Please describe your issue and provide steps to reproduce it:
Loading an office document or a pdf directly, produces a watermark.
Loading a jpg/png with the exact same code shows the picture, but without the added watermark (although setWatermark() is called).
Should/can this work?
Thank you for contacting WebViewer forums,
Are you using setWatermark API? PDFTron WebViewer Class: DocumentViewer
Please try using the option shouldDrawOverAnnotations:true for images.
Thanks a lot for your fast response!
Sadly, after implementing this solution, we realized the watermark on the image (and on pdfs with this change) is missing on downloading the image/document.
This defeats the purpose we need the watermark for in the first place.
Is there a possibility of the watermark being displayed everywhere?
So on Images AND Pdfs, in the viewer AND also with the download/save as functionality.
I tried setting the watermark 2 times, once with shouldDrawOverAnnotations: true, once without, but it seems to me the last one just wins.
Thanks for your Help!
Edit: The picture has the watermark on downloading, but only if I download it via “save as” and choose the original image type (on pdf it is not shown).
I did a quick test and found the following:
If we enable 'shouldDrawOverAnnotations: true, ’ :
For documents, this will create a watermark on the Viewer but not on Download/Save As.
For images, this will create a watermark on the Viewer but not on Download/Save As. (Note: if we Save As image, the watermark shows up)
If we do not have 'shouldDrawOverAnnotations: true, ’ :
For documents, this will create a watermark on the Viewer and on Download/Save As.
For images, this will not create a watermark on the Viewer and on Download/Save As.
What you could do is to enable loadAsPdf: true in the loadDocumentOption (PDFTron WebViewer Namespace: Core) when loading an image so the watermark will behave as expected and with this method, you can disregard the 'shouldDrawOverAnnotations: true, ’ option.