@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.
17 lines (16 loc) • 1.02 kB
TypeScript
import { PDFDocumentLoadingTask, PDFDocumentProxy } from 'pdf.js/src/display/api';
import { PDFSource, PDFSourceOptions, PDFSourceWithOptions } from '../types';
/**
* Parses a PDF source file and returns a PDFDocumentLoadingTask.
* @param {PDFSource} source - The source of the PDF file.
* @returns {Promise<PDFDocumentLoadingTask>} A promise that resolves to a PDFDocumentLoadingTask.
* @throws {Error} If the source is invalid.
*/
export declare function parseSourceFile(source: PDFSource): Promise<PDFDocumentLoadingTask>;
/**
* Processes a PDF source and returns a PDFDocumentProxy.
* @param {PDFSource | PDFSourceWithOptions} inputSource - The input source of the PDF file.
* @param {PDFSourceOptions} [sourceOptions] - Optional source options.
* @returns {Promise<PDFDocumentProxy | null>} A promise that resolves to a PDFDocumentProxy or null.
*/
export declare function processSource(inputSource: PDFSource | PDFSourceWithOptions, sourceOptions?: PDFSourceOptions): Promise<PDFDocumentProxy | null>;