ng2-pdf-viewer
ng2-pdf-viewer copied to clipboard
Annotation mode pdfOptions
Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [x ] Feature request
- [ ] Documentation issue or request
Allow the library to more easily customize the pdfViewer options. For example, it missing the annotationMode
Example :
const pdfOptions = { eventBus, container: this.element.nativeElement.querySelector('div'), removePageBorders: !this._showBorders, linkService: this.pdfSinglePageLinkService, textLayerMode: this._renderText ? this._renderTextMode : RenderTextMode.DISABLED, findController: this.pdfSinglePageFindController, renderer: 'canvas', l10n: undefined, annotationMode: this._annotationMode }; this.pdfSinglePageViewer = new PDFJSViewer.PDFSinglePageViewer(pdfOptions);
Latest PDF Viewer Options passed as a parameter of the base viewer option of pdf.js
/**
- @typedef {Object} PDFViewerOptions
- @property {HTMLDivElement} container - The container for the viewer element.
- @property {HTMLDivElement} [viewer] - The viewer element.
- @property {EventBus} eventBus - The application event bus.
- @property {IPDFLinkService} linkService - The navigation/linking service.
- @property {IDownloadManager} [downloadManager] - The download manager
- component.
- @property {PDFFindController} [findController] - The find controller
- component.
- @property {PDFScriptingManager} [scriptingManager] - The scripting manager
- component.
- @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object.
- @property {boolean} [removePageBorders] - Removes the border shadow around
- the pages. The default value is
false. - @property {number} [textLayerMode] - Controls if the text layer used for
- selection and searching is created. The constants from {TextLayerMode}
- should be used. The default value is
TextLayerMode.ENABLE. - @property {number} [annotationMode] - Controls if the annotation layer is
- created, and if interactive form elements or
AnnotationStorage-data are - being rendered. The constants from {@link AnnotationMode} should be used;
- see also {@link RenderParameters} and {@link GetOperatorListParameters}.
- The default value is
AnnotationMode.ENABLE_FORMS. - @property {number} [annotationEditorMode] - Enables the creation and editing
- of new Annotations. The constants from {@link AnnotationEditorType} should
- be used. The default value is
AnnotationEditorType.DISABLE. - @property {string} [imageResourcesPath] - Path for image resources, mainly
- mainly for annotation icons. Include trailing slash.
- @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of
- landscape pages upon printing. The default is
false. - @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default
- value is
false. - @property {number} [maxCanvasPixels] - The maximum supported canvas size in
- total pixels, i.e. width * height. Use -1 for no limit. The default value
- is 4096 * 4096 (16 mega-pixels).
- @property {IL10n} l10n - Localization service.
- @property {boolean} [enablePermissions] - Enables PDF document permissions,
- when they exist. The default value is
false. - @property {Object} [pageColors] - Overwrites background and foreground colors
- with user defined ones in order to improve readability in high contrast
- mode. */
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.