Skip to content

Commit 2178c5e

Browse files
authored
Merge pull request #42 from SyncfusionExamples/EJ2-380623-exportImport
380623: Sample on Export and Import and Export annotation
2 parents f1c92b7 + 9a1f347 commit 2178c5e

File tree

1 file changed

+14
-0
lines changed
  • How to/Import and Export annotation as object/Pages

1 file changed

+14
-0
lines changed

How to/Import and Export annotation as object/Pages/Index.cshtml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
ViewData["Title"] = "Home page";
55
}
66

7+
<button type="button" onclick="exportAsJson()">Export Annoatation As Json</button>
8+
<button type="button" onclick="exportAsXfdf()">Export Annoatation As Xfdf</button>
79
<button type="button" onclick="exportAnnotation()">Export Annoatation</button>
810
<button type="button" onclick="importAnnotation()">Import Annoatation</button>
911

@@ -20,6 +22,18 @@
2022
<script type ="text/javascript">
2123
2224
var exportObject;
25+
26+
//Export annotation as Json
27+
function exportAsJson(){
28+
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
29+
viewer.exportAnnotation('Json');
30+
}
31+
//Export annotation as Xfdf
32+
function exportAsXfdf(){
33+
var viewer = document.getElementById('pdfviewer').ej2_instances[0];
34+
viewer.exportAnnotation('Xfdf');
35+
}
36+
2337
//Export annotation as object.
2438
function exportAnnotation() {
2539
var viewer = document.getElementById('pdfviewer').ej2_instances[0];

0 commit comments

Comments
 (0)