@amafil/react-native-pdf-toolkit 1.0.11 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -139,6 +139,31 @@ public class PdfManager extends SimpleViewManager<PdfView> implements RNPDFPdfVi
139
139
  pdfView.setEnableDoubleTapZoom(enableDoubleTap);
140
140
  }
141
141
 
142
+ @ReactProp(name = "annotations")
143
+ public void setAnnotations(PdfView pdfView, @Nullable String annotations) {
144
+ pdfView.setAnnotations(annotations);
145
+ }
146
+
147
+ @ReactProp(name = "annotationMode")
148
+ public void setAnnotationMode(PdfView pdfView, boolean annotationMode) {
149
+ pdfView.setAnnotationMode(annotationMode);
150
+ }
151
+
152
+ @ReactProp(name = "annotationTool")
153
+ public void setAnnotationTool(PdfView pdfView, @Nullable String annotationTool) {
154
+ pdfView.setAnnotationTool(annotationTool);
155
+ }
156
+
157
+ @ReactProp(name = "annotationEditable")
158
+ public void setAnnotationEditable(PdfView pdfView, boolean annotationEditable) {
159
+ pdfView.setAnnotationEditable(annotationEditable);
160
+ }
161
+
162
+ @ReactProp(name = "annotationIdMode")
163
+ public void setAnnotationIdMode(PdfView pdfView, @Nullable String annotationIdMode) {
164
+ pdfView.setAnnotationIdMode(annotationIdMode);
165
+ }
166
+
142
167
  @ReactProp(name = "enablePaging")
143
168
  public void setEnablePaging(PdfView pdfView, boolean enablePaging) {
144
169
  pdfView.setEnablePaging(enablePaging);
@@ -184,9 +209,16 @@ public class PdfManager extends SimpleViewManager<PdfView> implements RNPDFPdfVi
184
209
  startNativeAutoScroll(root, args.getDouble(0), args.getDouble(1));
185
210
  } else if ("stopNativeAutoScroll".equals(commandId)) {
186
211
  stopNativeAutoScroll(root);
212
+ } else if ("saveAnnotations".equals(commandId)) {
213
+ saveAnnotations(root);
187
214
  }
188
215
  }
189
216
 
217
+ @Override
218
+ public void saveAnnotations(PdfView view) {
219
+ view.saveAnnotations();
220
+ }
221
+
190
222
  @Override
191
223
  public void onAfterUpdateTransaction(PdfView pdfView) {
192
224
  super.onAfterUpdateTransaction(pdfView);