0

Is there any way to download pdf with annotation (using adobe embed api) without opening pdf in viewer?

In my application I have download button , if I click on that button then its should start download pdf with annotation.

1 Answers1

1

So, annotations are part of a PDF. If it's in the PDF already, just link to it. If you want to force a download, use the download attribute:

<a href="foo.pdf" download>Download my awesome PDF</a>
Raymond Camden
  • 10,661
  • 3
  • 34
  • 68
  • I'm so confused by your response. :) Does your PDF document have the annotations on them already? If so, they are part of the file, and as I said, you just have to let people download it. – Raymond Camden Jun 30 '22 at 20:15
  • What I am doing is, I have save annotation string in different location & original pdf in different location. Annotation and pdf is not in same file. While loading annotation viewer I am binding the annotation & pdf. So from annotation viewer i can download pdf with annotation. Now my requirement is how do i download pdf with annotation without opening the annotation viewer. – shri Kanchi Jul 15 '22 at 12:25
  • What is the annotation viewer? If you are using PDF Embed, then you can dynamically add annotations to a PDF, and you can force a download. – Raymond Camden Jul 16 '22 at 14:51
  • i am using pdf-embed-api & my code is in angular. How do I force to download pdf ? – shri Kanchi Jul 17 '22 at 09:22
  • I showed that in the answer above. If you want to do it dynamically, you can generate an Anchor DOM element and fire the click event automatically. This is an example: https://stackoverflow.com/a/49917066/52160 – Raymond Camden Jul 18 '22 at 13:53