@vue-pdf-viewer/viewer
Version:
A vue-pdf-viewer component for Vue and Nuxt. Suitable for vue-pdf document.
868 lines (867 loc) • 36.4 kB
TypeScript
import type { PDFDocumentProxy } from 'pdfjs-dist/types/src/display/api';
import type { AnnotationEventPayload, TextLayerLoadedEventPayload, RotateEvent, ToolbarOptions, PdfProperties, PasswordRequiredPayload, XfdfExportOptions, XfdfImportResult } from '@/utils/types';
import { ScrollMode, SelectionMode, ViewMode, ZoomLevel } from '@/utils/enumerators';
import '../style.scss';
import { Localization, AnnotationStrikethroughColors, AnnotationHighlightColors, AnnotationUnderlineColors, type Annotation } from '@vue-pdf-viewer/shared';
declare const _default: {
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
readonly src: {
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
readonly required: true;
};
readonly workerUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly wasmUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly initialPage: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialScale: {
readonly type: import("vue").PropType<number | ZoomLevel>;
readonly default: () => ZoomLevel;
};
readonly scrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (scrollMode: ScrollMode, args: unknown) => boolean;
};
readonly viewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (viewMode: ViewMode, args: unknown) => boolean;
};
readonly initialScrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
};
readonly initialViewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
};
readonly initialRotation: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialThumbnailsVisible: {
readonly type: import("vue").PropType<boolean>;
readonly default: undefined;
};
readonly textLayer: {
readonly type: import("vue").PropType<boolean>;
readonly default: () => boolean;
};
readonly selectionMode: {
readonly type: import("vue").PropType<SelectionMode>;
readonly default: undefined;
};
readonly characterMap: {
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
readonly default: undefined;
};
readonly toolbarOptions: {
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
readonly default: () => ToolbarOptions;
};
readonly localization: {
readonly type: import("vue").PropType<Record<string, Localization>>;
readonly default: () => Record<string, Localization>;
};
readonly initialSearch: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly afterCanvasLoaded: {
readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
readonly default: undefined;
};
readonly textHighlights: {
readonly type: import("vue").PropType<import("@/utils/types").TextHighlight[]>;
readonly default: undefined;
readonly validator: (value: import("@/utils/types").TextHighlight[]) => boolean;
};
readonly downloadFilename: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly plugins: {
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
readonly default: undefined;
};
readonly documentOptions: {
readonly type: import("vue").PropType<import("@/utils/types").PDFDocumentOptions>;
readonly default: undefined;
};
readonly showPasswordModal: {
readonly type: import("vue").PropType<boolean>;
readonly default: true;
};
}>> & Readonly<{
onScroll?: ((scrollEvent: Event) => any) | undefined;
onRotate?: ((rotateEvent: RotateEvent) => any) | undefined;
onAnnotation?: ((data: AnnotationEventPayload) => any) | undefined;
onAnnotationLoaded?: ((annotations: any[]) => any) | undefined;
onTextLoaded?: ((data: TextLayerLoadedEventPayload) => any) | undefined;
onXfaLoaded?: (() => any) | undefined;
onLoaded?: ((properties?: PdfProperties | undefined) => any) | undefined;
onLoadError?: ((error: any) => any) | undefined;
onLoading?: (() => any) | undefined;
onLoadProgress?: ((progress: number) => any) | undefined;
onAfterGoToPage?: ((progress: number) => any) | undefined;
onPageChanged?: ((progress: number) => any) | undefined;
"onUpdate:scrollMode"?: ((scrollMode: ScrollMode) => any) | undefined;
"onUpdate:viewMode"?: ((viewMode: ViewMode) => any) | undefined;
onPasswordRequired?: ((payload: PasswordRequiredPayload) => any) | undefined;
onPasswordError?: (() => any) | undefined;
onPasswordSuccess?: (() => any) | undefined;
}>, {
highlightControl: {
highlight: (args: import("@/utils/types").TextHighlight[]) => Promise<Record<string, import("@/utils/types").MatchHighlightResult[]>>;
clear: () => void;
};
printControl: {
print: (options?: {
visibleDefaultProgress: boolean;
} | undefined) => void;
cancel: () => void;
onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
pageControl: {
goToPage: (pageNumber: number) => void;
totalPages: number;
currentPage: number;
getTextContent: (pageNumber: number) => Promise<import("pdfjs-dist/types/src/display/api").TextContent> | undefined;
rotatePage: (pageNumber: number, degree: 90 | 180 | 270 | -90 | ((currentDegree: number) => 90 | 180 | 270 | -90)) => void;
};
searchControl: {
searchMatches: {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
} | {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
};
searching: boolean;
goToMatch: (index: number) => void;
search: (value: string) => Promise<import("@/utils/types").MatchHighlightResult[]>;
nextSearchMatch: () => void;
prevSearchMatch: () => void;
};
rotateControl: {
rotateClockwise: () => void;
rotateCounterclockwise: () => void;
currentRotation: number;
};
downloadControl: {
download: () => void;
getBlob: () => Promise<{
blob: Blob;
filename: string;
}>;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
zoomControl: {
scale: number;
zoom: (scale: number | ZoomLevel, options?: {
immediate?: boolean | undefined;
origin?: [number, number] | undefined;
} | undefined) => void;
};
passwordControl: {
submitPassword: (password: string) => Promise<boolean>;
};
annotationTextSelectionControl: {
isHighlightActive: boolean;
isUnderlineActive: boolean;
isStrikethroughActive: boolean;
highlightColor: string | null;
underlineColor: string | null;
strikethroughColor: string | null;
toggleHighlight: () => void;
toggleUnderline: () => void;
toggleStrikethrough: () => void;
deactivateAll: () => void;
setHighlightColor: (color: string) => void;
setUnderlineColor: (color: string) => void;
setStrikethroughColor: (color: string) => void;
setHighlightColorPalette: (colors: AnnotationHighlightColors) => void;
setUnderlineColorPalette: (colors: AnnotationUnderlineColors) => void;
setStrikethroughColorPalette: (colors: AnnotationStrikethroughColors) => void;
};
annotationFreeTextControl: {
isActive: boolean;
fontColor: string | null;
fontSize: number | null;
activate: () => void;
deactivate: () => void;
setFontColor: (color: string) => void;
setFontSize: (size: number) => void;
};
annotationXfdfControl: {
exportToXfdf: (options?: XfdfExportOptions) => Promise<string>;
importFromXfdf: (xfdfString: string) => XfdfImportResult;
};
annotationControl: {
getAnnotations: () => Annotation[];
clearAnnotations: () => void;
};
pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
totalPages: import("vue").Ref<number, number>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
annotation: (data: AnnotationEventPayload) => void;
} & {
loaded: (properties?: PdfProperties | undefined) => void;
} & {
loadError: (error: any) => void;
} & {
loading: () => void;
} & {
loadProgress: (progress: number) => void;
} & {
textLoaded: (data: TextLayerLoadedEventPayload) => void;
} & {
annotationLoaded: (annotations: any[]) => void;
} & {
xfaLoaded: () => void;
} & {
rotate: (rotateEvent: RotateEvent) => void;
} & {
scroll: (scrollEvent: Event) => void;
} & {
"update:scrollMode": (scrollMode: ScrollMode) => void;
} & {
"update:viewMode": (viewMode: ViewMode) => void;
} & {
passwordRequired: (payload: PasswordRequiredPayload) => void;
} & {
passwordError: () => void;
} & {
passwordSuccess: () => void;
} & {
afterGoToPage: (progress: number) => void;
} & {
pageChanged: (progress: number) => void;
}, import("vue").PublicProps, {
readonly workerUrl: string;
readonly wasmUrl: string;
readonly initialPage: number;
readonly initialScale: number | ZoomLevel;
readonly initialRotation: number;
readonly initialThumbnailsVisible: boolean;
readonly initialSearch: string;
readonly textLayer: boolean;
readonly selectionMode: SelectionMode;
readonly characterMap: import("@/utils/types").CharacterMap;
readonly toolbarOptions: false | Partial<ToolbarOptions>;
readonly localization: Record<string, Localization>;
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
readonly textHighlights: import("@/utils/types").TextHighlight[];
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
readonly downloadFilename: string;
readonly showPasswordModal: boolean;
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<import("vue").ExtractPropTypes<{
readonly src: {
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
readonly required: true;
};
readonly workerUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly wasmUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly initialPage: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialScale: {
readonly type: import("vue").PropType<number | ZoomLevel>;
readonly default: () => ZoomLevel;
};
readonly scrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (scrollMode: ScrollMode, args: unknown) => boolean;
};
readonly viewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (viewMode: ViewMode, args: unknown) => boolean;
};
readonly initialScrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
};
readonly initialViewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
};
readonly initialRotation: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialThumbnailsVisible: {
readonly type: import("vue").PropType<boolean>;
readonly default: undefined;
};
readonly textLayer: {
readonly type: import("vue").PropType<boolean>;
readonly default: () => boolean;
};
readonly selectionMode: {
readonly type: import("vue").PropType<SelectionMode>;
readonly default: undefined;
};
readonly characterMap: {
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
readonly default: undefined;
};
readonly toolbarOptions: {
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
readonly default: () => ToolbarOptions;
};
readonly localization: {
readonly type: import("vue").PropType<Record<string, Localization>>;
readonly default: () => Record<string, Localization>;
};
readonly initialSearch: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly afterCanvasLoaded: {
readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
readonly default: undefined;
};
readonly textHighlights: {
readonly type: import("vue").PropType<import("@/utils/types").TextHighlight[]>;
readonly default: undefined;
readonly validator: (value: import("@/utils/types").TextHighlight[]) => boolean;
};
readonly downloadFilename: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly plugins: {
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
readonly default: undefined;
};
readonly documentOptions: {
readonly type: import("vue").PropType<import("@/utils/types").PDFDocumentOptions>;
readonly default: undefined;
};
readonly showPasswordModal: {
readonly type: import("vue").PropType<boolean>;
readonly default: true;
};
}>> & Readonly<{
onScroll?: ((scrollEvent: Event) => any) | undefined;
onRotate?: ((rotateEvent: RotateEvent) => any) | undefined;
onAnnotation?: ((data: AnnotationEventPayload) => any) | undefined;
onAnnotationLoaded?: ((annotations: any[]) => any) | undefined;
onTextLoaded?: ((data: TextLayerLoadedEventPayload) => any) | undefined;
onXfaLoaded?: (() => any) | undefined;
onLoaded?: ((properties?: PdfProperties | undefined) => any) | undefined;
onLoadError?: ((error: any) => any) | undefined;
onLoading?: (() => any) | undefined;
onLoadProgress?: ((progress: number) => any) | undefined;
onAfterGoToPage?: ((progress: number) => any) | undefined;
onPageChanged?: ((progress: number) => any) | undefined;
"onUpdate:scrollMode"?: ((scrollMode: ScrollMode) => any) | undefined;
"onUpdate:viewMode"?: ((viewMode: ViewMode) => any) | undefined;
onPasswordRequired?: ((payload: PasswordRequiredPayload) => any) | undefined;
onPasswordError?: (() => any) | undefined;
onPasswordSuccess?: (() => any) | undefined;
}>, {
highlightControl: {
highlight: (args: import("@/utils/types").TextHighlight[]) => Promise<Record<string, import("@/utils/types").MatchHighlightResult[]>>;
clear: () => void;
};
printControl: {
print: (options?: {
visibleDefaultProgress: boolean;
} | undefined) => void;
cancel: () => void;
onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
pageControl: {
goToPage: (pageNumber: number) => void;
totalPages: number;
currentPage: number;
getTextContent: (pageNumber: number) => Promise<import("pdfjs-dist/types/src/display/api").TextContent> | undefined;
rotatePage: (pageNumber: number, degree: 90 | 180 | 270 | -90 | ((currentDegree: number) => 90 | 180 | 270 | -90)) => void;
};
searchControl: {
searchMatches: {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
} | {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
};
searching: boolean;
goToMatch: (index: number) => void;
search: (value: string) => Promise<import("@/utils/types").MatchHighlightResult[]>;
nextSearchMatch: () => void;
prevSearchMatch: () => void;
};
rotateControl: {
rotateClockwise: () => void;
rotateCounterclockwise: () => void;
currentRotation: number;
};
downloadControl: {
download: () => void;
getBlob: () => Promise<{
blob: Blob;
filename: string;
}>;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
zoomControl: {
scale: number;
zoom: (scale: number | ZoomLevel, options?: {
immediate?: boolean | undefined;
origin?: [number, number] | undefined;
} | undefined) => void;
};
passwordControl: {
submitPassword: (password: string) => Promise<boolean>;
};
annotationTextSelectionControl: {
isHighlightActive: boolean;
isUnderlineActive: boolean;
isStrikethroughActive: boolean;
highlightColor: string | null;
underlineColor: string | null;
strikethroughColor: string | null;
toggleHighlight: () => void;
toggleUnderline: () => void;
toggleStrikethrough: () => void;
deactivateAll: () => void;
setHighlightColor: (color: string) => void;
setUnderlineColor: (color: string) => void;
setStrikethroughColor: (color: string) => void;
setHighlightColorPalette: (colors: AnnotationHighlightColors) => void;
setUnderlineColorPalette: (colors: AnnotationUnderlineColors) => void;
setStrikethroughColorPalette: (colors: AnnotationStrikethroughColors) => void;
};
annotationFreeTextControl: {
isActive: boolean;
fontColor: string | null;
fontSize: number | null;
activate: () => void;
deactivate: () => void;
setFontColor: (color: string) => void;
setFontSize: (size: number) => void;
};
annotationXfdfControl: {
exportToXfdf: (options?: XfdfExportOptions) => Promise<string>;
importFromXfdf: (xfdfString: string) => XfdfImportResult;
};
annotationControl: {
getAnnotations: () => Annotation[];
clearAnnotations: () => void;
};
pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
totalPages: import("vue").Ref<number, number>;
}, {}, {}, {}, {
readonly workerUrl: string;
readonly wasmUrl: string;
readonly initialPage: number;
readonly initialScale: number | ZoomLevel;
readonly initialRotation: number;
readonly initialThumbnailsVisible: boolean;
readonly initialSearch: string;
readonly textLayer: boolean;
readonly selectionMode: SelectionMode;
readonly characterMap: import("@/utils/types").CharacterMap;
readonly toolbarOptions: false | Partial<ToolbarOptions>;
readonly localization: Record<string, Localization>;
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
readonly textHighlights: import("@/utils/types").TextHighlight[];
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
readonly downloadFilename: string;
readonly showPasswordModal: boolean;
}>;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
readonly src: {
readonly type: import("vue").PropType<string | import("@/utils/types").VPVSrc>;
readonly required: true;
};
readonly workerUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly wasmUrl: {
readonly type: import("vue").PropType<string>;
readonly default: undefined;
};
readonly initialPage: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialScale: {
readonly type: import("vue").PropType<number | ZoomLevel>;
readonly default: () => ZoomLevel;
};
readonly scrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (scrollMode: ScrollMode, args: unknown) => boolean;
};
readonly viewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (viewMode: ViewMode, args: unknown) => boolean;
};
readonly initialScrollMode: {
readonly type: import("vue").PropType<ScrollMode>;
readonly validator: (initialScrollMode: ScrollMode, args: unknown) => boolean;
};
readonly initialViewMode: {
readonly type: import("vue").PropType<ViewMode>;
readonly validator: (initialViewMode: ViewMode, args: unknown) => boolean;
};
readonly initialRotation: {
readonly type: import("vue").PropType<number>;
readonly default: () => number;
};
readonly initialThumbnailsVisible: {
readonly type: import("vue").PropType<boolean>;
readonly default: undefined;
};
readonly textLayer: {
readonly type: import("vue").PropType<boolean>;
readonly default: () => boolean;
};
readonly selectionMode: {
readonly type: import("vue").PropType<SelectionMode>;
readonly default: undefined;
};
readonly characterMap: {
readonly type: import("vue").PropType<import("@/utils/types").CharacterMap>;
readonly default: undefined;
};
readonly toolbarOptions: {
readonly type: import("vue").PropType<false | Partial<ToolbarOptions>>;
readonly default: () => ToolbarOptions;
};
readonly localization: {
readonly type: import("vue").PropType<Record<string, Localization>>;
readonly default: () => Record<string, Localization>;
};
readonly initialSearch: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly afterCanvasLoaded: {
readonly type: import("vue").PropType<Record<number, import("@/utils/types").CanvasLoadedCallback>>;
readonly default: undefined;
};
readonly textHighlights: {
readonly type: import("vue").PropType<import("@/utils/types").TextHighlight[]>;
readonly default: undefined;
readonly validator: (value: import("@/utils/types").TextHighlight[]) => boolean;
};
readonly downloadFilename: {
readonly type: StringConstructor;
readonly default: undefined;
};
readonly plugins: {
readonly type: import("vue").PropType<import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[]>;
readonly default: undefined;
};
readonly documentOptions: {
readonly type: import("vue").PropType<import("@/utils/types").PDFDocumentOptions>;
readonly default: undefined;
};
readonly showPasswordModal: {
readonly type: import("vue").PropType<boolean>;
readonly default: true;
};
}>> & Readonly<{
onScroll?: ((scrollEvent: Event) => any) | undefined;
onRotate?: ((rotateEvent: RotateEvent) => any) | undefined;
onAnnotation?: ((data: AnnotationEventPayload) => any) | undefined;
onAnnotationLoaded?: ((annotations: any[]) => any) | undefined;
onTextLoaded?: ((data: TextLayerLoadedEventPayload) => any) | undefined;
onXfaLoaded?: (() => any) | undefined;
onLoaded?: ((properties?: PdfProperties | undefined) => any) | undefined;
onLoadError?: ((error: any) => any) | undefined;
onLoading?: (() => any) | undefined;
onLoadProgress?: ((progress: number) => any) | undefined;
onAfterGoToPage?: ((progress: number) => any) | undefined;
onPageChanged?: ((progress: number) => any) | undefined;
"onUpdate:scrollMode"?: ((scrollMode: ScrollMode) => any) | undefined;
"onUpdate:viewMode"?: ((viewMode: ViewMode) => any) | undefined;
onPasswordRequired?: ((payload: PasswordRequiredPayload) => any) | undefined;
onPasswordError?: (() => any) | undefined;
onPasswordSuccess?: (() => any) | undefined;
}>, {
highlightControl: {
highlight: (args: import("@/utils/types").TextHighlight[]) => Promise<Record<string, import("@/utils/types").MatchHighlightResult[]>>;
clear: () => void;
};
printControl: {
print: (options?: {
visibleDefaultProgress: boolean;
} | undefined) => void;
cancel: () => void;
onProgress?: ((progress: import("@/utils/types").PreparePrintProgress) => void) | undefined;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
pageControl: {
goToPage: (pageNumber: number) => void;
totalPages: number;
currentPage: number;
getTextContent: (pageNumber: number) => Promise<import("pdfjs-dist/types/src/display/api").TextContent> | undefined;
rotatePage: (pageNumber: number, degree: 90 | 180 | 270 | -90 | ((currentDegree: number) => 90 | 180 | 270 | -90)) => void;
};
searchControl: {
searchMatches: {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
} | {
totalMatches: number;
matches: {
index: number;
page: number;
}[];
};
searching: boolean;
goToMatch: (index: number) => void;
search: (value: string) => Promise<import("@/utils/types").MatchHighlightResult[]>;
nextSearchMatch: () => void;
prevSearchMatch: () => void;
};
rotateControl: {
rotateClockwise: () => void;
rotateCounterclockwise: () => void;
currentRotation: number;
};
downloadControl: {
download: () => void;
getBlob: () => Promise<{
blob: Blob;
filename: string;
}>;
onError?: ((error: Error) => void) | undefined;
onComplete?: (() => void) | undefined;
};
zoomControl: {
scale: number;
zoom: (scale: number | ZoomLevel, options?: {
immediate?: boolean | undefined;
origin?: [number, number] | undefined;
} | undefined) => void;
};
passwordControl: {
submitPassword: (password: string) => Promise<boolean>;
};
annotationTextSelectionControl: {
isHighlightActive: boolean;
isUnderlineActive: boolean;
isStrikethroughActive: boolean;
highlightColor: string | null;
underlineColor: string | null;
strikethroughColor: string | null;
toggleHighlight: () => void;
toggleUnderline: () => void;
toggleStrikethrough: () => void;
deactivateAll: () => void;
setHighlightColor: (color: string) => void;
setUnderlineColor: (color: string) => void;
setStrikethroughColor: (color: string) => void;
setHighlightColorPalette: (colors: AnnotationHighlightColors) => void;
setUnderlineColorPalette: (colors: AnnotationUnderlineColors) => void;
setStrikethroughColorPalette: (colors: AnnotationStrikethroughColors) => void;
};
annotationFreeTextControl: {
isActive: boolean;
fontColor: string | null;
fontSize: number | null;
activate: () => void;
deactivate: () => void;
setFontColor: (color: string) => void;
setFontSize: (size: number) => void;
};
annotationXfdfControl: {
exportToXfdf: (options?: XfdfExportOptions) => Promise<string>;
importFromXfdf: (xfdfString: string) => XfdfImportResult;
};
annotationControl: {
getAnnotations: () => Annotation[];
clearAnnotations: () => void;
};
pdfDocument: import("vue").ShallowRef<PDFDocumentProxy | undefined, PDFDocumentProxy | undefined>;
totalPages: import("vue").Ref<number, number>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
annotation: (data: AnnotationEventPayload) => void;
} & {
loaded: (properties?: PdfProperties | undefined) => void;
} & {
loadError: (error: any) => void;
} & {
loading: () => void;
} & {
loadProgress: (progress: number) => void;
} & {
textLoaded: (data: TextLayerLoadedEventPayload) => void;
} & {
annotationLoaded: (annotations: any[]) => void;
} & {
xfaLoaded: () => void;
} & {
rotate: (rotateEvent: RotateEvent) => void;
} & {
scroll: (scrollEvent: Event) => void;
} & {
"update:scrollMode": (scrollMode: ScrollMode) => void;
} & {
"update:viewMode": (viewMode: ViewMode) => void;
} & {
passwordRequired: (payload: PasswordRequiredPayload) => void;
} & {
passwordError: () => void;
} & {
passwordSuccess: () => void;
} & {
afterGoToPage: (progress: number) => void;
} & {
pageChanged: (progress: number) => void;
}, string, {
readonly workerUrl: string;
readonly wasmUrl: string;
readonly initialPage: number;
readonly initialScale: number | ZoomLevel;
readonly initialRotation: number;
readonly initialThumbnailsVisible: boolean;
readonly initialSearch: string;
readonly textLayer: boolean;
readonly selectionMode: SelectionMode;
readonly characterMap: import("@/utils/types").CharacterMap;
readonly toolbarOptions: false | Partial<ToolbarOptions>;
readonly localization: Record<string, Localization>;
readonly afterCanvasLoaded: Record<number, import("@/utils/types").CanvasLoadedCallback>;
readonly textHighlights: import("@/utils/types").TextHighlight[];
readonly plugins: import("@vue-pdf-viewer/shared").Plugin<PDFDocumentProxy>[];
readonly documentOptions: import("@/utils/types").PDFDocumentOptions;
readonly downloadFilename: string;
readonly showPasswordModal: boolean;
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
$slots: {
dropFileZone: (_: {
isDark: boolean;
}) => any;
loader: (_: {
progress: number;
loaded: boolean;
}) => any;
loaderImage: (_: {}) => any;
loaderProgress: (_: {
progress: number;
}) => any;
iconSearch: (_: {}) => any;
pageNavigationTool: (_: {
total: number;
current: number;
onNext: () => void;
onPrev: () => void;
onChangePage: (pageNumber: number) => void;
}) => any;
iconPrevPage: (_: {}) => any;
iconNextPage: (_: {}) => any;
zoomTool: (_: {
currentScale: number;
zoom: (nextScale: number | ZoomLevel) => void;
}) => any;
iconZoomOut: (_: {}) => any;
iconZoomIn: (_: {}) => any;
commentPanelTool: (_: {
onClick: () => void;
}) => any;
iconCommentPanel: (_: {}) => any;
themeTool: (_: {
isDark: boolean;
onClick: () => void;
}) => any;
iconThemeDark: (_: {}) => any;
iconThemeLight: (_: {}) => any;
openFileTool: (_: {
onClick: () => void;
}) => any;
iconOpenFile: (_: {}) => any;
downloadTool: (_: {
onClick: () => void;
}) => any;
iconDownload: (_: {}) => any;
printTool: (_: {
onClick: () => ((showProgress?: boolean | undefined) => Promise<void>) & Promise<void>;
}) => any;
iconPrint: (_: {}) => any;
fullScreenTool: (_: {
onClick: () => Promise<void>;
isSupported: boolean;
}) => any;
iconFullScreen: (_: {}) => any;
iconMoreOptions: (_: {}) => any;
iconFirstPage: (_: {}) => any;
iconLastPage: (_: {}) => any;
iconRotateClockwise: (_: {}) => any;
iconRotateCounterClockwise: (_: {}) => any;
iconTextSelection: (_: {}) => any;
iconHandMode: (_: {}) => any;
iconScrollingPage: (_: {}) => any;
iconScrollingVertical: (_: {}) => any;
iconScrollingHorizontal: (_: {}) => any;
iconScrollingWrapped: (_: {}) => any;
iconPageViewSingle: (_: {}) => any;
iconPageViewDual: (_: {}) => any;
iconPageViewDualWithCover: (_: {}) => any;
iconDocProperties: (_: {}) => any;
thumbnailTool: (_: {
onToggle: () => void;
}) => any;
iconThumbnail: (_: {}) => any;
pageOverlay: (_: {
pageIndex: number;
scale: number;
pageElement: HTMLElement | SVGElement | null | undefined;
}) => any;
};
});
export default _default;