UNPKG

@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.

61 lines (60 loc) 2.16 kB
import { PDFSourceOptions, PDFSource, PDFSourceWithOptions, PDFInfo } from '../types'; import { PDFDocumentProxy } from 'pdf.js/src/display/api'; import { ToolbarContainerProps } from './ToolbarContainer.vue'; import { SidebarContainerProps } from './SidebarContainer.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; sidebar?: SidebarContainerProps; }; } declare function __VLS_template(): { slots: { loading?(_: {}): any; }; refs: { container: HTMLDivElement; }; attrs: Partial<{}>; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: 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: PDFSource | PDFSourceWithOptions | PDFDocumentProxy; useContainerQuery: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };