@@ -3,7 +3,7 @@ cordova.define("pspdfkit-cordova-ios.PSPDFKitPlugin", function(require, exports,
33// PSPDFKit.h
44// PSPDFPlugin for Apache Cordova
55//
6- // Copyright © 2013-2017 PSPDFKit GmbH. All rights reserved.
6+ // Copyright © 2013-2019 PSPDFKit GmbH. All rights reserved.
77//
88// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY AUSTRIAN COPYRIGHT LAW
99// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
@@ -13,7 +13,7 @@ cordova.define("pspdfkit-cordova-ios.PSPDFKitPlugin", function(require, exports,
1313
1414var PSPDFKitPlugin = new function ( ) {
1515
16- //utilities
16+ // Utilities
1717
1818 var self = this ;
1919 function addMethods ( methods ) {
@@ -42,7 +42,7 @@ var PSPDFKitPlugin = new function() {
4242 }
4343 }
4444
45- //events
45+ // Events
4646
4747 var listeners = { } ;
4848
@@ -86,29 +86,31 @@ var PSPDFKitPlugin = new function() {
8686 }
8787 }
8888
89- //license key
89+ // License key
9090
9191 addMethods ( {
9292 setLicenseKey : [ 'key' ] ,
9393 } ) ;
9494
95- //PDF Generation method
95+ // PDF Generation method
9696
9797 addMethods ( {
9898 convertPDFFromHTMLString : [ 'html' , 'fileName' , 'options' , 'callback' ] ,
9999 } ) ;
100100
101- //document methods
101+ // Document methods
102102
103103 addMethods ( {
104104 present : [ 'path' , 'callback' , 'options' ] ,
105+ presentWithXFDF : [ 'path' , 'xfdfPath' , 'callback' , 'options' ] ,
105106 dismiss : [ 'callback' ] ,
106107 reload : [ ] ,
107108 search : [ 'query' , 'animated' , 'headless' ] ,
108109 saveAnnotations : [ 'callback' ] ,
110+ getHasDirtyAnnotations : [ 'callback' ] ,
109111 } ) ;
110112
111- //configuration
113+ // Configuration
112114
113115 addMethods ( {
114116 setOptions : [ 'options' , 'animated' ] ,
@@ -117,7 +119,7 @@ var PSPDFKitPlugin = new function() {
117119 getOption : [ 'name' , 'callback' ] ,
118120 } ) ;
119121
120- //page scrolling
122+ // Page scrolling
121123
122124 addMethods ( {
123125 setPage : [ 'page' , 'animated' ] ,
@@ -128,20 +130,20 @@ var PSPDFKitPlugin = new function() {
128130 scrollToPreviousPage : [ 'animated' ] ,
129131 } ) ;
130132
131- //appearance
133+ // Appearance
132134
133135 addMethods ( {
134136 setAppearanceMode : [ 'appearanceMode' ] ,
135137 } ) ;
136138
137- //cache
139+ // Cache
138140
139141 addMethods ( {
140142 clearCache : [ ] ,
141143 removeCacheForPresentedDocument : [ ] ,
142144 } ) ;
143145
144- //toolbar
146+ // Toolbar
145147
146148 var leftBarButtonItems = [ 'close' ] ;
147149 var rightBarButtonItems = [ 'search' , 'outline' , 'thumbnails' ] ;
@@ -179,13 +181,28 @@ var PSPDFKitPlugin = new function() {
179181 {
180182 callback ( rightBarButtonItems ) ;
181183 }
182-
183- //annotation toolbar
184- addMethods ( {
185- hideAnnotationToolbar : [ ] ,
186- showAnnotationToolbar : [ ] ,
187- toggleAnnotationToolbar : [ ] ,
188- } ) ;
184+
185+ // Annotation toolbar
186+ addMethods ( {
187+ hideAnnotationToolbar : [ ] ,
188+ showAnnotationToolbar : [ ] ,
189+ toggleAnnotationToolbar : [ ] ,
190+ } ) ;
191+
192+ // Instant JSON
193+ addMethods ( {
194+ applyInstantJSON : [ 'jsonValue' , 'callback' ] ,
195+ addAnnotation : [ 'jsonAnnotation' , 'callback' ] ,
196+ removeAnnotation : [ 'jsonAnnotation' , 'callback' ] ,
197+ getAnnotations : [ 'pageIndex' , 'type' , 'callback' ] ,
198+ getAllUnsavedAnnotations : [ 'callback' ]
199+ } ) ;
200+
201+ // Forms
202+ addMethods ( {
203+ setFormFieldValue : [ 'value' , 'fullyQualifiedName' , 'callback' ] ,
204+ getFormFieldValue : [ 'fullyQualifiedName' , 'callback' ] ,
205+ } ) ;
189206} ;
190207module . exports = PSPDFKitPlugin ;
191208
0 commit comments