Undo |
<button type="button" onclick="undoFunction()">Undo</button>
function undoFunction() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.undo();
}
|
redo |
<button type="button" onclick="redoFunction()">Redo</button>
function redoFunction() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.redo();
} |
comment |
<button type="button" onclick="addComment()">Comment</button>
function addComment() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.annotation.setAnnotationMode("Rectangle");
pdfViewer.annotationAdd = function (args) {
pdfViewer.annotationModule.selectAnnotation(pdfViewer.annotationCollection[0].annotationId);
pdfViewer.annotationCollection[0].commentType = "add";
pdfViewer.annotationCollection[0].replyComment = ["add1", "add2", "add3", "add4"];
pdfViewer.annotationCollection[0].note = "annotation";
pdfViewer.annotation.editAnnotation(pdfViewer.annotationCollection[0]);
};
} |
Search Text |
<button type="button" onclick="searchText()">Search</button>
function searchText() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
pdfViewer.textSearch.searchText("Text", false);
} |