@tuttarealstep/vue-pdf.js
Version:
A Vue component for displaying PDF files using the standard `pdf.js` viewer. This package provides a simple and powerful integration to embed PDF viewers in Vue applications.
54 lines (53 loc) • 1.86 kB
TypeScript
import { PDFSourceOptions, PDFSource, PDFSourceWithOptions, PDFInfo } from '../types';
import { PDFDocumentProxy } from 'pdf.js/src/display/api';
import { ToolbarContainerProps } from './ToolbarContainer.vue';
import { ViewsManagerProps } from './ViewsManager.vue';
export interface VuePDFjsProps {
/**
* The source of the PDF file.
*/
source?: PDFSource | PDFSourceWithOptions | PDFDocumentProxy;
/**
* The options for the PDF source.
*/
sourceOptions?: PDFSourceOptions;
/**
* If true, the component will use the container query to adjust the viewer height.
*/
useContainerQuery?: boolean;
/**
* The options for the PDF viewer.
*/
options?: {
locale?: {
code: string;
ftl: string;
};
toolbar?: ToolbarContainerProps;
viewsManager?: ViewsManagerProps;
};
}
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<VuePDFjsProps, {
pdfApp: import('vue').ShallowRef<any, any>;
pdfDocument: import('vue').ShallowRef<any, any>;
pdfPages: import('vue').ShallowRef<number, number>;
pdfInfo: import('vue').ShallowRef<{}, {}> | import('vue').ShallowRef<PDFInfo, PDFInfo>;
pdfLoadingTask: import('vue').ShallowRef<any, any>;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
"pdf-app:loaded": () => any;
}, string, import('vue').PublicProps, Readonly<VuePDFjsProps> & Readonly<{
"onPdf-app:loaded"?: (() => any) | undefined;
}>, {
source: any;
useContainerQuery: boolean;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
container: HTMLDivElement;
}, HTMLDivElement>, {
loading?(_: {}): any;
}>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};