How to Draw and Save Rectangle Annotations with Coordinates in ngx-extended-pdf-viewer #2525
Replies: 4 comments 1 reply
-
If you're asking me: I've collected all my knowledge at https://pdfviewer.net/extended-pdf-viewer/export-annotations. It's not much because exporting and importing annotation uses an internal API of pdf.js. It may change at any point in time. You can use it as long as you're aware of this. |
Beta Was this translation helpful? Give feedback.
-
@AshokAnvesa Have you found a solution for # 1 or 2 ? I have a similar need to draw a rectangle on the annotation layer and capture it's coordinates, along with the page that it's annotated on. I looked through the link provided by @stephanrauh but I didn't see anything to suggest a rectangle could be placed on the layer or resized. Presumably, I will have to resort to a custom solution, maybe using canvas and build support for a resizable/moveable rectangle. |
Beta Was this translation helpful? Give feedback.
-
For anyone who is wondering, how to draw a rectangle annotation and export the annotation to pdf. Please follow the below steps
@stephanrauh - You can add it as a feature in your module rectangle-annotation.component.html
rectangle-annotation.component.ts
Using this example you can draw a rectangle box in PDF Annotation editor layer and download the annotations in pdf too. Hope it helps you all. Functions used by PDF.js library to compute this co-ordinates
|
Beta Was this translation helpful? Give feedback.
-
I draw rectengle highlight with set annotation struct of type any and annotationType 9, I set rect and quadPoints and the pdfService of ngx-extended-pdf-viewer succeeded paint it |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have started using the ngx-extended-pdf-viewer and have a specific requirement. I need to:
Could you please guide me on how to achieve this with ngx-extended-pdf-viewer? Any examples or references would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions