How can I download including Watermark?

WebViewer Version:
10.3.0
Do you have an issue with a specific file(s)?
No.
Can you reproduce using one of our samples or online demos?
No.
Are you using the WebViewer server?
No.
Does the issue only happen on certain browsers?
No.
Is your issue related to a front-end framework?
No.
Is your issue related to annotations?
No.

Please give a brief summary of your issue:
(Think of this as an email subject)

How can I download including Watermark?

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

This sample code cannot be downloaded with Watermark included.

private viewerInstance: WebViewerInstance;

webviewer({fullAPI: true, enableRedaction: true, ...})
  .then((instance: WebViewerInstance) => {
      this.viewerInstance = instance;
      const { documentViewer } = instance.Core;

      documentViewer.setWatermark({
        // Draw diagonal watermark in middle of the document
        diagonal: {
          fontSize: 25, // or even smaller size
          fontFamily: 'sans-serif',
          color: 'red',
          opacity: 50, // from 0 to 100
          text: 'Watermark'
        },
      });
}

clickDownload = () => {
  //
  // this download file nothing watermark
 //
  this.viewerInstance.UI.downloadPdf({
    filename: 'test.pdf',
    includeAnnotations: true,
    flatten: true,
    flags: this.viewerInstance.Core.SaveOptions.LINEARIZED,
  });

}

I Checked thiese documents.


Best Regards.

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Thank you for reaching out.

I’m reviewing your request and will get back to you shortly.

1 Like

Hello Okabe,

I was unable to reproduce this issue with your provided code snippet above.

I tested on our v10.3 sample and I was able to download the PDF with the watermark included.

Please provide any missing steps or configurations I may have missed.

Thank you.

Best Regards,
Darian Chen

Hello darian.chen.

Sorry for the delayed response.
Thank you.

We will investigate in detail.
I will contact you when We know the details.

Best Regards.

1 Like

Hello Okabe,

Yes, please let us know when you have more details about the issue.

Thank you,
Darian

1 Like

Hello darian.chen,

I created github.
GitHub - SF-Okabe-Yasufumi/webviewer_watermark_test

This watermark is print OK.

But download is NG.

Best Regards.

1 Like

Hello Okabe,

Thank you for the response and GitHub repo.

I was able to reproduce the issue with the watermark.

There seems to be an issue with the shouldDrawOverAnnotations option in the setWatermark API. Once I removed this line, I was able to download the file with the watermark.

I have add this issue to our backlog to be reviewed by the product team on a later date.

Best Regards,
Darian

2 Likes

Hello darian.chen,

Thank you for reply.
Problem resolved.

I have an additional question regarding Watermark.

from this state…

click print.
image

click Add New Watermark button.

setting watermark and click add button.

click Print button.

The Watermark I set earlier is not reflected.
Is this the specification?

Thank you.
Best Regards,

1 Like

Hello Okabe,

I was able to reproduce this issue. There seems to be a problem with adding a watermark using the UI after adding one programatically. I will add this to our backlog and let the product team know about this as well.

Thank you for reporting these issues.

Best Regards,
Darian

2 Likes