Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147267 | Sep 4,2019 04:20 PM UTC | Apr 7,2020 02:38 PM UTC | ASP.NET Core - EJ 2 | 20 |
![]() |
Tags: PDF Viewer |
API |
Parameter |
Return Type |
Description |
exportAnnotations |
- |
void |
To Export the loaded document annotation object as json file. |
importAnnotations |
importData |
void |
Import the annotation details in loaded document. |
Parameter |
Data Type |
Description |
importData |
any |
Specifies the data for the import annotations it can be json file name or json object |
API |
Parameter |
Return Type |
Descriptions |
deleteAnnotations() |
- |
void |
To delete the annotation collections in the PDF Document. |
<buttn id="delete">Delete Annotations</button>
<ejs-pdfviewer id="pdfViewer" style="height:600px" serviceUrl="/api/PdfViewer" documentPath="PDF Succinctly.pdf"></ejs-pdfviewer>
document.getElementById('delete').addEventListener('click',()=>
{
var viewer = document.getElementById('pdfViewer').ej2_instances[0];
viewer.deleteAnnotations();
})
|
<button onclick="deleteAnnotations();">Delete Annotations</button>
<div class="control-section">
<ejs-pdfviewer id="pdfviewer" serviceUrl="/Index" documentPath="PDF Succinctly.pdf"></ejs-pdfviewer>
</div>
function deleteAnnotations() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.deleteAnnotations();
} |
We use Syncfusion angular PDF viewer and its annotations in a web-based document approval cycle we are trying a use case depending on extracting the coordinates of the rectangle annotations and pass it to other document extraction library to extract the PDF data based on the rectangle (X,Y, Width, height)
We are able to allow the user to use PDF annotation in the angular web viewer and we can get the annotation left,top,width and height attributes however There is a difference between coordinates determined on the document from the web page having the embedded PDF viewer, and the actual rectangular annotations coordinates on the document. In other words, the embedded Synfusion PDF viewer gives the coordinates data based on the web page dimensions instead of the actual document dimensions. Accordingly, the extraction does not work correctly.
Therefore, we need to know if there a way that we access the actual document coordinates of rectangular annotations.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.