import { PlatformLocation } from '@angular/common'; import { ChangeDetectorRef, ElementRef, InputSignal, ModelSignal, NgZone, OnDestroy, OnInit, Renderer2, TemplateRef } from '@angular/core'; import { FindResultMatchesCount, FindState } from './events/find-result'; import { PageRenderEvent } from './events/page-render-event'; import { PageRenderedEvent } from './events/page-rendered-event'; import { PagesLoadedEvent } from './events/pages-loaded-event'; import { PdfDownloadedEvent } from './events/pdf-downloaded-event'; import { PdfLoadedEvent } from './events/pdf-loaded-event'; import { PdfLoadingStartsEvent } from './events/pdf-loading-starts-event'; import { PdfThumbnailDrawnEvent } from './events/pdf-thumbnail-drawn-event'; import { ProgressBarEvent } from './events/progress-bar-event'; import { TextLayerRenderedEvent } from './events/textlayer-rendered'; import { NgxExtendedPdfViewerService } from './ngx-extended-pdf-viewer.service'; import { PageViewModeType, ScrollModeType } from './options/pdf-viewer'; import { PDFDocumentProxy } from './options/pdf-viewer-application'; import { VerbosityLevel } from './options/verbosity-level'; import { PdfDummyComponentsComponent } from './pdf-dummy-components/pdf-dummy-components.component'; import { PDFNotificationService } from './pdf-notification-service'; import { IOSCanvasOptimizationService } from './services/ios-canvas-optimization.service'; import { AnnotationEditorEvent } from './events/annotation-editor-layer-event'; import { AnnotationEditorLayerRenderedEvent } from './events/annotation-editor-layer-rendered-event'; import { AnnotationEditorEditorModeChangedEvent } from './events/annotation-editor-mode-changed-event'; import { AnnotationLayerRenderedEvent } from './events/annotation-layer-rendered-event'; import { AttachmentLoadedEvent } from './events/attachment-loaded-event'; import { LayersLoadedEvent } from './events/layers-loaded-event'; import { LinkAnnotationsAddedEvent } from './events/link-annotations-added-event'; import { OutlineLoadedEvent } from './events/outline-loaded-event'; import { XfaLayerRenderedEvent } from './events/xfa-layer-rendered-event'; import { NgxHasHeight } from './ngx-has-height'; import { NgxKeyboardManagerService } from './ngx-keyboard-manager.service'; import { PdfSidebarView } from './options/pdf-sidebar-views'; import { SpreadType } from './options/spread-type'; import { ZoomType } from './options/zoom-type'; import { PdfCspPolicyService } from './pdf-csp-policy.service'; import { PDFScriptLoaderService } from './pdf-script-loader.service'; import { ResponsiveVisibility } from './responsive-visibility'; import * as i0 from "@angular/core"; export interface FormDataType { [fieldName: string]: null | string | number | boolean | string[]; } export type PdfSrcType = string | ArrayBuffer | Blob | Uint8Array | URL | { range: any; } | undefined; export type Base64SrcType = (string | null | undefined) & {}; export type PageType = (number | undefined) & {}; export type NamedDestType = (string | undefined) & {}; export type PasswordType = (string | undefined) & {}; export declare function isIOS(): boolean; export declare class NgxExtendedPdfViewerComponent implements OnInit, OnDestroy, NgxHasHeight { private readonly platformId; private readonly notificationService; private readonly elementRef; private readonly platformLocation; cdr: ChangeDetectorRef; service: NgxExtendedPdfViewerService; private readonly renderer; private readonly pdfScriptLoaderService; private readonly keyboardManager; private readonly cspPolicyService; private readonly iosCanvasService; private readonly ngZone; private readonly formSupport; /** #3131 AbortController to unregister all eventBus listeners on destroy. */ private eventBusAbortController; /** * The dummy components are inserted automatically when the user customizes the toolbar * without adding every original toolbar item. Without the dummy components, the * initialization code of pdf.js crashes because it assume that every standard widget is there. */ dummyComponents: import("@angular/core").Signal; root: import("@angular/core").Signal | undefined>; annotationEditorEvent: import("@angular/core").OutputEmitterRef; customFindbarInputArea: InputSignal | undefined>; customToolbar: InputSignal | undefined>; customFindbar: InputSignal | undefined>; customFindbarButtons: InputSignal | undefined>; customPdfViewer: InputSignal | undefined>; customSecondaryToolbar: InputSignal | undefined>; customSidebar: InputSignal | undefined>; customThumbnail: InputSignal | undefined>; customFreeFloatingBar: InputSignal | undefined>; showFreeFloatingBar: InputSignal; enableDragAndDrop: InputSignal; /** * pdf.js 6.1 option: when `false`, hides the download and save buttons AND * disables the download manager entirely — a hard "no saving" lock, stronger * than just hiding the button via `showDownloadButton`. Only applied when the * loaded engine is pdf.js 6.1 or newer; a no-op on older engines. */ supportsDownloading: InputSignal; forceUsingLegacyES5: InputSignal; localizationInitialized: boolean; private resizeObserver; private initialAngularFormData?; formData: InputSignal; private readonly _formDataEffect; disableForms: InputSignal; get formDataChange(): import("@angular/core").EventEmitter; baseHref: string; /** This flag prevents trying to load a file twice if the user uploads it using the file upload dialog or via drag'n'drop */ private srcChangeTriggeredByUser; pageViewMode: ModelSignal; private _previousPageViewMode; private handToolBeforeBookMode; private readonly _pageViewModeEffect; private handleViewMode; private handleInfiniteScrollMode; private handleSinglePageMode; private handleBookMode; private handleMultiplePageMode; private redrawViewer; markForCheck(): void; progress: import("@angular/core").OutputEmitterRef; private readonly secondaryToolbarComponent; private readonly dynamicCSSComponent; private readonly sidebarComponent; src: ModelSignal; private readonly _srcEffect; private _src; /** #3131 Tracks the last _src value that was actually opened, to avoid redundant re-opens when the effect re-fires. */ private _lastOpenedSrc; scrollMode: ModelSignal; private readonly _scrollModeEffect; authorization: InputSignal; httpHeaders: InputSignal; contextMenuAllowed: InputSignal; afterPrint: import("@angular/core").OutputEmitterRef; beforePrint: import("@angular/core").OutputEmitterRef; currentZoomFactor: import("@angular/core").OutputEmitterRef; /** This field stores the previous zoom level if the page is enlarged with a double-tap or double-click */ private previousZoom; enablePrint: InputSignal; enablePrintAutoRotate: InputSignal; private readonly _enablePrintAutoRotateEffect; /** Force reloading of the JavaScript code. Useful for testing and micro-frontends */ forceFullReloadOfJavaScriptCode: InputSignal; showEditorButtons: InputSignal; disableEditorButtons: InputSignal; showTextEditor: InputSignal; disableTextEditor: InputSignal; showStampEditor: InputSignal; disableStampEditor: InputSignal; showCommentEditor: InputSignal; disableCommentEditor: InputSignal; showDrawEditor: InputSignal; disableDrawEditor: InputSignal; showHighlightEditor: InputSignal; disableHighlightEditor: InputSignal; showSignatureEditor: InputSignal; disableSignatureEditor: InputSignal; effectiveShowTextEditor: import("@angular/core").Signal; effectiveShowStampEditor: import("@angular/core").Signal; effectiveShowCommentEditor: import("@angular/core").Signal; effectiveShowDrawEditor: import("@angular/core").Signal; effectiveShowHighlightEditor: import("@angular/core").Signal; effectiveShowSignatureEditor: import("@angular/core").Signal; /** How many log messages should be printed? * Legal values: VerbosityLevel.INFOS (= 5), VerbosityLevel.WARNINGS (= 1), VerbosityLevel.ERRORS (= 0) */ logLevel: InputSignal; /** Use the minified (minifiedJSLibraries="true", which is the default) or the user-readable pdf.js library (minifiedJSLibraries="false") */ minifiedJSLibraries: ModelSignal; private readonly _minifiedJSLibrariesEffect; primaryMenuVisible: boolean; /** option to increase (or reduce) print resolution. Default is 150 (dpi). Sensible values * are 300, 600, and 1200. Note the increase memory consumption, which may even result in a browser crash. */ printResolution: InputSignal; rotation: ModelSignal<0 | 90 | 180 | 270>; annotationLayerRendered: import("@angular/core").OutputEmitterRef; linkAnnotationsAdded: import("@angular/core").OutputEmitterRef; annotationEditorLayerRendered: import("@angular/core").OutputEmitterRef; xfaLayerRendered: import("@angular/core").OutputEmitterRef; outlineLoaded: import("@angular/core").OutputEmitterRef; attachmentsloaded: import("@angular/core").OutputEmitterRef; layersloaded: import("@angular/core").OutputEmitterRef; hasSignature: boolean; base64Src: InputSignal; private readonly base64SrcEffect; /** * The combination of height, minHeight, and autoHeight ensures the PDF height of the PDF viewer is calculated correctly when the height is a percentage. * By default, many CSS frameworks make a div with 100% have a height or zero pixels. checkHeight() fixes this. */ autoHeight: boolean; protected _minHeight?: string | undefined; protected _height: string | undefined; get minHeight(): string | undefined; set minHeight(value: string | undefined); get height(): string | undefined; set height(value: string | undefined); minHeightInput: InputSignal; heightInput: InputSignal; private readonly _heightEffect; backgroundColor: InputSignal; pdfBackgroundColor: InputSignal; private readonly _pdfBackgroundColorEffect; private readonly _readingDirectionEffect; /** Allows the user to define the name of the file after clicking "download" */ filenameForDownload: InputSignal; /** Allows the user to disable the keyboard bindings completely */ ignoreKeyboard: InputSignal; /** Allows the user to disable a list of key bindings. */ ignoreKeys: InputSignal; /** Allows the user to enable a list of key bindings explicitly. If this property is set, every other key binding is ignored. */ acceptKeys: InputSignal; hasTextLayer: boolean; /** Allows the user to put the viewer's svg images into an arbitrary folder */ imageResourcesPath: InputSignal; /** Allows the user to put their locale folder into an arbitrary folder */ localeFolderPath: InputSignal; /** Override the default locale. This must be the complete locale name, such as "es-ES". The string is allowed to be all lowercase. */ language: InputSignal; /** By default, listening to the URL is deactivated because often the anchor tag is used for the Angular router */ listenToURL: InputSignal; /** Navigate to a certain "named destination" */ nameddest: InputSignal; /** allows you to pass a password to read password-protected files */ password: InputSignal; replaceBrowserPrint: InputSignal; private readonly originalPrint; /** Store the original color-scheme value to restore it on destroy */ private originalColorScheme; useInlineScripts: InputSignal; viewerPositionTop: string; /** pdf.js can show signatures, but fails to verify them. So they are switched off by default. * Set "[showUnverifiedSignatures]"="true" to display e-signatures nonetheless. */ showUnverifiedSignatures: InputSignal; startTabindex: InputSignal; showSidebarButton: InputSignal; disableSidebarButton: InputSignal; private readonly _showSidebarButtonEffect; _showSidebarButton: ResponsiveVisibility; sidebarVisible: ModelSignal; private readonly _sidebarVisibleEffect; activeSidebarView: ModelSignal; findbarVisible: ModelSignal; propertiesDialogVisible: ModelSignal; showFindButton: InputSignal; disableFindButton: InputSignal; showFindHighlightAll: InputSignal; showFindMatchCase: InputSignal; showFindMultiple: InputSignal; showFindRegexp: InputSignal; showFindEntireWord: InputSignal; showFindMatchDiacritics: InputSignal; showFindResultsCount: InputSignal; showFindMessages: InputSignal; showMovePageButton: InputSignal; /** Enable page reordering via drag-and-drop in the thumbnail sidebar. * This is read at initialization time only. Changing it after the viewer has loaded * requires destroying and recreating the component. */ enablePageReorderingInput: InputSignal; /** Enable split & merge: copy, cut, delete, and export selected pages via the sidebar manage menu. * This is read at initialization time only. Changing it after the viewer has loaded * requires destroying and recreating the component. */ enableSplitMergeInput: InputSignal; /** Enable merging: adds an "Add file" button to the thumbnail sidebar that lets the user * insert another PDF (or images, as additional pages) into the current document. * Experimental upstream — opt in deliberately. * This is read at initialization time only. Changing it after the viewer has loaded * requires destroying and recreating the component. */ enableMergeInput: InputSignal; disableMovePageButton: InputSignal; showPagingButtons: InputSignal; disablePagingButtons: InputSignal; showFirstAndLastPageButtons: InputSignal; disableFirstAndLastPageButtons: InputSignal; showPreviousAndNextPageButtons: InputSignal; disablePreviousAndNextPageButtons: InputSignal; showPageNumber: InputSignal; disablePageNumber: InputSignal; showPageLabel: InputSignal; showZoomButtons: InputSignal; disableZoomButtons: InputSignal; showZoomDropdown: InputSignal; disableZoomDropdown: InputSignal; showPresentationModeButton: InputSignal; disablePresentationModeButton: InputSignal; showOpenFileButton: InputSignal; disableOpenFileButton: InputSignal; showPrintButton: InputSignal; disablePrintButton: InputSignal; showDownloadButton: InputSignal; disableDownloadButton: InputSignal; theme: InputSignal; showToolbar: InputSignal; showSecondaryToolbarButton: InputSignal; disableSecondaryToolbarButton: InputSignal; showSinglePageModeButton: ModelSignal; showVerticalScrollButton: ModelSignal; showHorizontalScrollButton: ModelSignal; showWrappedScrollButton: ModelSignal; showInfiniteScrollButton: ModelSignal; showBookModeButton: ModelSignal; disableSinglePageModeButton: InputSignal; disableVerticalScrollButton: InputSignal; disableHorizontalScrollButton: InputSignal; disableWrappedScrollButton: InputSignal; disableInfiniteScrollButton: InputSignal; disableBookModeButton: InputSignal; showScrollingButtons: InputSignal; private readonly _showScrollingButtonsEffect; showRotateCwButton: ModelSignal; showRotateCcwButton: ModelSignal; disableRotateCwButton: InputSignal; disableRotateCcwButton: InputSignal; showRotateButton: InputSignal; private readonly _showRotateButtonEffect; handTool: ModelSignal; private readonly _handToolEffect; showHandToolButton: InputSignal; disableHandToolButton: InputSignal; /** * In book mode, dragging normally flips pages. Set this to false to disable * drag-to-flip, allowing text selection and panning instead. Click-based * page flipping is not affected. When true (the default), drag-to-flip is * automatically disabled when zoomed in beyond 100% so the user can pan. */ enableFlipByDrag: InputSignal; private readonly _enableFlipByDragEffect; showPageFlipButton: InputSignal; disablePageFlipButton: InputSignal; /** * In book mode, show or hide the dog-ear fold animation on page corners * when hovering near them. Only relevant when drag-to-flip is enabled. */ showPageCorners: InputSignal; private readonly _showPageCornersEffect; showSpreadButton: InputSignal; disableSpreadButton: InputSignal; showPropertiesButton: InputSignal; disablePropertiesButton: InputSignal; showBorders: InputSignal; spread: ModelSignal; readingDirection: InputSignal<"rtl" | "auto" | "ltr">; thumbnailDrawn: import("@angular/core").OutputEmitterRef; page: ModelSignal; private _pageSetFromScroll; private readonly _pageEffect; private _page; pageLabel: ModelSignal; pagesLoaded: import("@angular/core").OutputEmitterRef; pageRender: import("@angular/core").OutputEmitterRef; pageRendered: import("@angular/core").OutputEmitterRef; pdfDownloaded: import("@angular/core").OutputEmitterRef; pdfLoaded: import("@angular/core").OutputEmitterRef; pdfLoadingStarts: import("@angular/core").OutputEmitterRef; pdfLoadingFailed: import("@angular/core").OutputEmitterRef; textLayer: InputSignal; textLayerRendered: import("@angular/core").OutputEmitterRef; annotationEditorModeChanged: import("@angular/core").OutputEmitterRef; updateFindMatchesCount: import("@angular/core").OutputEmitterRef; updateFindState: import("@angular/core").OutputEmitterRef; /** Legal values: undefined, 'auto', 'page-actual', 'page-fit', 'page-width', or '50' (or any other percentage) */ zoom: ModelSignal; /** * Tracks the last zoom value set from a pdf.js scalechanging event. * Used to break the feedback loop: pdf.js fires scalechanging → Angular updates zoom signal → * effect calls setZoom() → sets currentScaleValue back on pdf.js. During pinch zoom, * the async effect can set an outdated scale value back, causing flicker/jumping. */ private _lastZoomSetByPdfJs; /** * True while pdf.js is actively handling a zoom gesture (pinch or Ctrl+wheel). * During an active gesture, pdf.js uses drawingDelay=400ms to defer page re-rendering * (the page stays blurry and only sharpens after the gesture ends). If Angular's * setZoom() writes currentScaleValue during this window, it bypasses drawingDelay * and triggers an immediate full re-render on every frame, causing stutter on iPad. */ private _isPdfJsZooming; private _pdfJsZoomingTimeout; zoomLevels: InputSignal<(string | number)[]>; maxZoom: InputSignal; minZoom: InputSignal; /** This attribute allows you to increase the size of the UI elements so you can use them on small mobile devices. * This attribute is a string with a percent character at the end (e.g. "150%"). */ _mobileFriendlyZoom: string; mobileFriendlyZoomScale: number; toolbarMarginTop: string; toolbarWidth: string; private toolbar; onToolbarLoaded(toolbarElement: HTMLElement): void; secondaryToolbarTop: string | undefined; sidebarPositionTop: string | undefined; editorParamsToolbarTop: string | undefined; findbarTop: string | undefined; findbarLeft: string | undefined; private initializationPromise; private checkRootElementTimeout; private destroyInitialization; /** * #3216 Per-instance "openPDF() has completed" flag. Set true in openPDF(), reset in * ngOnDestroy(). Distinct from NgxExtendedPdfViewerService.ngxExtendedPdfViewerInitialized, * which is a singleton flag preserved for backward compatibility — see that service for the * distinction and the multi-viewer migration path. */ private initialized; get pdfJsVersion(): string; get majorMinorPdfJsVersion(): string; get enableSignatureEditor(): boolean; get enablePageReordering(): boolean; get enableSplitMerge(): boolean; get enableMerge(): boolean; /** * This attributes allows you to increase the size of the UI elements so you can use them on small mobile devices. * This attribute is a string with a percent character at the end (e.g. "150%"). */ mobileFriendlyZoom: InputSignal; private readonly _mobileFriendlyZoomEffect; private readonly _zoomEffect; private readonly _maxZoomEffect; private readonly _minZoomEffect; private readonly _findbarVisibleEffect; private readonly _propertiesDialogVisibleEffect; private readonly _pageLabelEffect; private readonly _rotationEffect; private readonly _activeSidebarViewEffect; private readonly _filenameForDownloadEffect; private readonly _nameddestEffect; private readonly _spreadEffect; private readonly _secondaryMenuEmptyEffect; private readonly _enableDragAndDropEffect; private readonly _printResolutionEffect; private _keyboardSettingsEffect; private readonly _replaceBrowserPrintEffect; private _disableFormsEffect; private readonly _showBordersEffect; private readonly _showUnverifiedSignaturesEffect; private readonly _enablePrintEffect; private _customComponentsEffect; serverSideRendering: boolean; /** * Checks if the code is running in a browser environment. */ private isBrowser; calcViewerPositionTop(): void; constructor(platformId: Object, notificationService: PDFNotificationService, elementRef: ElementRef, platformLocation: PlatformLocation, cdr: ChangeDetectorRef, service: NgxExtendedPdfViewerService, renderer: Renderer2, pdfScriptLoaderService: PDFScriptLoaderService, keyboardManager: NgxKeyboardManagerService, cspPolicyService: PdfCspPolicyService, iosCanvasService: IOSCanvasOptimizationService, ngZone: NgZone); /** * Detects if the application is running in zoneless mode (Angular 21+) * @returns true if zone.js is not present */ private isZoneless; /** * Wraps an async callback to ensure change detection in zoneless mode. * In zone.js mode: Zero overhead - Zone handles change detection automatically * In zoneless mode: Manually triggers change detection after callback * * @param callback The function to execute * @returns Wrapped function that triggers CD in zoneless mode * * @example * // Instead of: * queueMicrotask(() => this.progress.emit(x)); * * // Use: * queueMicrotask(this.asyncWithCD(() => this.progress.emit(x))); */ private asyncWithCD; private reportSourceChanges; private handleStoredValuesAvailable; ngOnInit(): void; private initialize; private waitForRootElement; private waitUntilOldComponentIsGone; private assignTabindexes; private showElementsRecursively; private collectElementPositions; /** * Collect focusable elements from a popup identified by aria-controls ID * These elements should appear in tab order immediately after the trigger button */ private collectPopupElements; private readonly afterPrintListener; private readonly beforePrintListener; private guessFilenameFromUrl; private doInitPDFViewer; private addTranslationsUnlessProvidedByTheUser; private hideToolbarIfItIsEmpty; /** Notifies every widget that implements onLibraryInit() that the PDF viewer objects are available */ private afterLibraryInit; onSpreadChange(newSpread: 'off' | 'even' | 'odd'): void; private readonly toggleVisibility; private activateTextlayerIfNecessary; private overrideDefaultSettings; private openPDF; private registerEventListeners; openPDF2(): Promise; private selectCursorTool; doReplaceBrowserPrint(useCustomPrintOfPdfJS: boolean): void; ngOnDestroy(): void; private isPrimaryMenuVisible; private closeDocument; private setZoom; initResizeObserver(): void; onResize(): void; onContextMenu(): boolean; private pageHasVisibleSignature; scrollSignatureWarningIntoView(pdf: PDFDocumentProxy): Promise; zoomToPageWidth(event: MouseEvent): Promise; private enableOrDisableForms; closeCommentsSidebar(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }