Annotation creates the add-on entry.
var createAnnotAddon = new PDFViewCtrl_CreateAnnotAddonModule.CreateAnnotAddon(pdfViewer);
createAnnotAddon.init({
showReplyDialog: function () {
alert(this.getModel().getContent())
},
hideReplyDialog: function () {
},
showPopup: function () {
},
hidePopup: function () {
},
showPropertiesDialog: function () {
},
hidePropertiesDialog: function () {
},
contextMenuIsEnable: function () {
return false;
}
});
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_TEXT);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_HIGHLIGHT);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_STRIKE_OUT);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_UNDERLINE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_SQUIGGLY);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_REPLACE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_CARET);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_FREETEXT_TYPEWRITER);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_FREETEXT_CALLOUT);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_FREETEXT_BOX);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_SQUARE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_CIRCLE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_LINE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_ARROW);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_POLYGON);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_POLYLINE);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_POLYGON_CLOUD);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_CREATE_AREA_HIGHLIGHT);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_PENCIL);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_ERASER);
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_STAMP, {
category, {string} [require] Collection of icons
name, {string} [require] name of icon
url, {string} [require] url
for icon. It supports HTTP,
file, blob url and base64 url.
fileType, {string} [optional=
pdf] Icon
file type.
width, {number} [optional=150] icon's width in PDF coordernary, default:150,
height, {number} [optional=45] icon's height in PDF coordernary, default:45,
showUrl {string} [optional=url] Create the
view that was displayed
before.
});
pdfViewer.getStateHandlerManager().switchTo(PDFViewCtrl.constants.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_FILE_ATTACHMENT);