-
Notifications
You must be signed in to change notification settings - Fork 5
Add annotationMode option #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
Public API ChangesRecommendation: @@ line 19: package:pdfjs/src/pdf_page_view.dart @@
+ enum AnnotationMode { disabled, enabled }
// Adding an enum is a minor change. @@ line 19: package:pdfjs/src/pdf_page_view.dart @@
class PDFPageView
- PDFPageView PDFPageView({DivElement container, num id, num scale, PageViewport defaultViewport, PDFPageViewRenderer renderer, IPDFAnnotationLayerFactory annotationLayerFactory, IPDFTextLayerFactory textLayerFactory})
+ PDFPageView PDFPageView({DivElement container, num id, num scale, PageViewport defaultViewport, PDFPageViewRenderer renderer, IPDFAnnotationLayerFactory annotationLayerFactory, IPDFTextLayerFactory textLayerFactory, AnnotationMode annotationMode})
// `annotationMode` was added.
// Adding an optional parameter is a minor change.
Showing results for 44e5476
|
@@ -47,7 +53,8 @@ class PDFPageView { | |||
'renderer': rendererString, | |||
'annotationLayerFactory': annotationLayerFactory?._jsInternal, | |||
'textLayerFactory': textLayerFactory?._jsInternal, | |||
'eventBus': JsObject(PDFJS.versionSafePdfJsViewerContext['EventBus'] as JsFunction), | |||
'eventBus': JsObject(context['pdfjsViewer']['EventBus'] as JsFunction), | |||
'annotationMode': annotationMode == AnnotationMode.disabled ? 0 : 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell, the default value appears to be 2
const AnnotationMode = {
DISABLE: 0,
ENABLE: 1,
ENABLE_FORMS: 2,
ENABLE_STORAGE: 3,
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to check the behavior on if we would pass this option into an older version of pdf.js. Hopefully it would ignore it, but 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smoke tested with older versions of pdf.js (2.5.207), and didn't see any abnormalities in using this
No description provided.