diff --git a/AndroidPdfViewer.d.ts b/AndroidPdfViewer.d.ts
index 8b90e5e..f354c0f 100644
--- a/AndroidPdfViewer.d.ts
+++ b/AndroidPdfViewer.d.ts
@@ -37,6 +37,7 @@ declare class Configurator {
load(): void;
defaultPage(pageNumber: number): this;
pages(...pageNumbers: number[]): this;
+ enableAnnotationRendering(enable: boolean): this;
enableDoubletap(enable: boolean): this;
enableSwipe(enable: boolean): this;
fitEachPage(enable: boolean): this;
diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml
index b247f46..1617b2b 100644
--- a/demo/app/main-page.xml
+++ b/demo/app/main-page.xml
@@ -4,6 +4,6 @@
loaded="pageLoaded">
-
+
diff --git a/demo/app/main-view-model.ts b/demo/app/main-view-model.ts
index b403b1b..a70114b 100644
--- a/demo/app/main-view-model.ts
+++ b/demo/app/main-view-model.ts
@@ -23,4 +23,5 @@ export class MainViewModel extends Observable {
}
private current = 0;
+ private enableAnnotationRendering = true;
}
diff --git a/pdf-view.android.ts b/pdf-view.android.ts
index 2f53bec..86d2511 100644
--- a/pdf-view.android.ts
+++ b/pdf-view.android.ts
@@ -60,6 +60,7 @@ export class PDFView extends PDFViewCommon {
.fromUri(uri)
.onLoad(this.onLoadHandler)
.spacing(defaultSpacingDP)
+ .enableAnnotationRendering(this.enableAnnotationRendering)
.fitEachPage(true)
.load();
}
diff --git a/pdf-view.common.d.ts b/pdf-view.common.d.ts
index 0a3e73b..04c5f78 100644
--- a/pdf-view.common.d.ts
+++ b/pdf-view.common.d.ts
@@ -1,7 +1,9 @@
import { Property, View } from 'tns-core-modules/ui/core/view';
export declare abstract class PDFViewCommon extends View {
+ enableAnnotationRendering: boolean;
static loadEvent: string;
src: string;
static notifyOfEvent(eventName: string, pdfViewRef: WeakRef): void;
}
+export declare const enableAnnotationRenderingProperty: Property;
export declare const srcProperty: Property;
diff --git a/pdf-view.common.ts b/pdf-view.common.ts
index bbb83e9..3b47294 100644
--- a/pdf-view.common.ts
+++ b/pdf-view.common.ts
@@ -5,6 +5,11 @@ import * as dialogs from 'tns-core-modules/ui/dialogs';
export abstract class PDFViewCommon extends View {
public static loadEvent = 'load';
+ /**
+ * Render annotations (such as comments, colors or forms) on Android
+ */
+ public enableAnnotationRendering: boolean;
+
/**
* the source url of the PDF to show
*/
@@ -22,6 +27,12 @@ export abstract class PDFViewCommon extends View {
}
}
+export const enableAnnotationRenderingProperty = new Property({
+ name: 'enableAnnotationRendering',
+ defaultValue: false,
+});
+enableAnnotationRenderingProperty.register(PDFViewCommon);
+
export const srcProperty = new Property({
name: 'src',
});