Comparing version 1.0.9 to 1.0.10
@@ -0,1 +1,247 @@ | ||
type PDFDocumentProxy = { | ||
_pdfInfo: any; | ||
_transport: any; | ||
/** | ||
* @type {AnnotationStorage} Storage for annotation data in forms. | ||
*/ | ||
get annotationStorage(): any; | ||
/** | ||
* @type {Object} The filter factory instance. | ||
*/ | ||
get filterFactory(): Object; | ||
/** | ||
* @type {number} Total number of pages in the PDF file. | ||
*/ | ||
get numPages(): number; | ||
/** | ||
* @type {Array<string, string|null>} A (not guaranteed to be) unique ID to | ||
* identify the PDF document. | ||
* NOTE: The first element will always be defined for all PDF documents, | ||
* whereas the second element is only defined for *modified* PDF documents. | ||
*/ | ||
get fingerprints(): string[]; | ||
/** | ||
* @type {boolean} True if only XFA form. | ||
*/ | ||
get isPureXfa(): boolean; | ||
/** | ||
* NOTE: This is (mostly) intended to support printing of XFA forms. | ||
* | ||
* @type {Object | null} An object representing a HTML tree structure | ||
* to render the XFA, or `null` when no XFA form exists. | ||
*/ | ||
get allXfaHtml(): Object | null; | ||
/** | ||
* @param {number} pageNumber - The page number to get. The first page is 1. | ||
* @returns {Promise<PDFPageProxy>} A promise that is resolved with | ||
* a {@link PDFPageProxy} object. | ||
*/ | ||
getPage(pageNumber: number): Promise<any>; | ||
/** | ||
* @param {RefProxy} ref - The page reference. | ||
* @returns {Promise<number>} A promise that is resolved with the page index, | ||
* starting from zero, that is associated with the reference. | ||
*/ | ||
getPageIndex(ref: any): Promise<number>; | ||
/** | ||
* @returns {Promise<Object<string, Array<any>>>} A promise that is resolved | ||
* with a mapping from named destinations to references. | ||
* | ||
* This can be slow for large documents. Use `getDestination` instead. | ||
*/ | ||
getDestinations(): Promise<{ | ||
[x: string]: Array<any>; | ||
}>; | ||
/** | ||
* @param {string} id - The named destination to get. | ||
* @returns {Promise<Array<any> | null>} A promise that is resolved with all | ||
* information of the given named destination, or `null` when the named | ||
* destination is not present in the PDF file. | ||
*/ | ||
getDestination(id: string): Promise<Array<any> | null>; | ||
/** | ||
* @returns {Promise<Array<string> | null>} A promise that is resolved with | ||
* an {Array} containing the page labels that correspond to the page | ||
* indexes, or `null` when no page labels are present in the PDF file. | ||
*/ | ||
getPageLabels(): Promise<Array<string> | null>; | ||
/** | ||
* @returns {Promise<string>} A promise that is resolved with a {string} | ||
* containing the page layout name. | ||
*/ | ||
getPageLayout(): Promise<string>; | ||
/** | ||
* @returns {Promise<string>} A promise that is resolved with a {string} | ||
* containing the page mode name. | ||
*/ | ||
getPageMode(): Promise<string>; | ||
/** | ||
* @returns {Promise<Object | null>} A promise that is resolved with an | ||
* {Object} containing the viewer preferences, or `null` when no viewer | ||
* preferences are present in the PDF file. | ||
*/ | ||
getViewerPreferences(): Promise<Object | null>; | ||
/** | ||
* @returns {Promise<any | null>} A promise that is resolved with an {Array} | ||
* containing the destination, or `null` when no open action is present | ||
* in the PDF. | ||
*/ | ||
getOpenAction(): Promise<any | null>; | ||
/** | ||
* @returns {Promise<any>} A promise that is resolved with a lookup table | ||
* for mapping named attachments to their content. | ||
*/ | ||
getAttachments(): Promise<any>; | ||
/** | ||
* @returns {Promise<Array<string> | null>} A promise that is resolved with | ||
* an {Array} of all the JavaScript strings in the name tree, or `null` | ||
* if no JavaScript exists. | ||
*/ | ||
getJavaScript(): Promise<Array<string> | null>; | ||
/** | ||
* @returns {Promise<Object | null>} A promise that is resolved with | ||
* an {Object} with the JavaScript actions: | ||
* - from the name tree (like getJavaScript); | ||
* - from A or AA entries in the catalog dictionary. | ||
* , or `null` if no JavaScript exists. | ||
*/ | ||
getJSActions(): Promise<Object | null>; | ||
/** | ||
* @typedef {Object} OutlineNode | ||
* @property {string} title | ||
* @property {boolean} bold | ||
* @property {boolean} italic | ||
* @property {Uint8ClampedArray} color - The color in RGB format to use for | ||
* display purposes. | ||
* @property {string | Array<any> | null} dest | ||
* @property {string | null} url | ||
* @property {string | undefined} unsafeUrl | ||
* @property {boolean | undefined} newWindow | ||
* @property {number | undefined} count | ||
* @property {Array<OutlineNode>} items | ||
*/ | ||
/** | ||
* @returns {Promise<Array<OutlineNode>>} A promise that is resolved with an | ||
* {Array} that is a tree outline (if it has one) of the PDF file. | ||
*/ | ||
getOutline(): Promise<{ | ||
title: string; | ||
bold: boolean; | ||
italic: boolean; | ||
/** | ||
* - The color in RGB format to use for | ||
* display purposes. | ||
*/ | ||
color: Uint8ClampedArray; | ||
dest: string | Array<any> | null; | ||
url: string | null; | ||
unsafeUrl: string | undefined; | ||
newWindow: boolean | undefined; | ||
count: number | undefined; | ||
items: any[]; | ||
}[]>; | ||
/** | ||
* @returns {Promise<OptionalContentConfig>} A promise that is resolved with | ||
* an {@link OptionalContentConfig} that contains all the optional content | ||
* groups (assuming that the document has any). | ||
*/ | ||
getOptionalContentConfig(): Promise<any>; | ||
/** | ||
* @returns {Promise<Array<number> | null>} A promise that is resolved with | ||
* an {Array} that contains the permission flags for the PDF document, or | ||
* `null` when no permissions are present in the PDF file. | ||
*/ | ||
getPermissions(): Promise<Array<number> | null>; | ||
/** | ||
* @returns {Promise<{ info: Object, metadata: Metadata }>} A promise that is | ||
* resolved with an {Object} that has `info` and `metadata` properties. | ||
* `info` is an {Object} filled with anything available in the information | ||
* dictionary and similarly `metadata` is a {Metadata} object with | ||
* information from the metadata section of the PDF. | ||
*/ | ||
getMetadata(): Promise<{ | ||
info: Object; | ||
metadata: any; | ||
}>; | ||
/** | ||
* @typedef {Object} MarkInfo | ||
* Properties correspond to Table 321 of the PDF 32000-1:2008 spec. | ||
* @property {boolean} Marked | ||
* @property {boolean} UserProperties | ||
* @property {boolean} Suspects | ||
*/ | ||
/** | ||
* @returns {Promise<MarkInfo | null>} A promise that is resolved with | ||
* a {MarkInfo} object that contains the MarkInfo flags for the PDF | ||
* document, or `null` when no MarkInfo values are present in the PDF file. | ||
*/ | ||
getMarkInfo(): Promise<{ | ||
Marked: boolean; | ||
UserProperties: boolean; | ||
Suspects: boolean; | ||
} | null>; | ||
/** | ||
* @returns {Promise<Uint8Array>} A promise that is resolved with a | ||
* {Uint8Array} containing the raw data of the PDF document. | ||
*/ | ||
getData(): Promise<Uint8Array>; | ||
/** | ||
* @returns {Promise<Uint8Array>} A promise that is resolved with a | ||
* {Uint8Array} containing the full data of the saved document. | ||
*/ | ||
saveDocument(): Promise<Uint8Array>; | ||
/** | ||
* @returns {Promise<{ length: number }>} A promise that is resolved when the | ||
* document's data is loaded. It is resolved with an {Object} that contains | ||
* the `length` property that indicates size of the PDF data in bytes. | ||
*/ | ||
getDownloadInfo(): Promise<{ | ||
length: number; | ||
}>; | ||
/** | ||
* Cleans up resources allocated by the document on both the main and worker | ||
* threads. | ||
* | ||
* NOTE: Do not, under any circumstances, call this method when rendering is | ||
* currently ongoing since that may lead to rendering errors. | ||
* | ||
* @param {boolean} [keepLoadedFonts] - Let fonts remain attached to the DOM. | ||
* NOTE: This will increase persistent memory usage, hence don't use this | ||
* option unless absolutely necessary. The default value is `false`. | ||
* @returns {Promise} A promise that is resolved when clean-up has finished. | ||
*/ | ||
cleanup(keepLoadedFonts?: boolean | undefined): Promise<any>; | ||
/** | ||
* Destroys the current document instance and terminates the worker. | ||
*/ | ||
destroy(): Promise<void>; | ||
/** | ||
* @type {DocumentInitParameters} A subset of the current | ||
* {DocumentInitParameters}, which are needed in the viewer. | ||
*/ | ||
get loadingParams(): any; | ||
/** | ||
* @type {PDFDocumentLoadingTask} The loadingTask for the current document. | ||
*/ | ||
get loadingTask(): any; | ||
/** | ||
* @returns {Promise<Object<string, Array<Object>> | null>} A promise that is | ||
* resolved with an {Object} containing /AcroForm field data for the JS | ||
* sandbox, or `null` when no field data is present in the PDF file. | ||
*/ | ||
getFieldObjects(): Promise<{ | ||
[x: string]: Array<Object>; | ||
} | null>; | ||
/** | ||
* @returns {Promise<boolean>} A promise that is resolved with `true` | ||
* if some /AcroForm fields have JavaScript actions. | ||
*/ | ||
hasJSActions(): Promise<boolean>; | ||
/** | ||
* @returns {Promise<Array<string> | null>} A promise that is resolved with an | ||
* {Array<string>} containing IDs of annotations that have a calculation | ||
* action, or `null` when no such annotations are present in the PDF file. | ||
*/ | ||
getCalculationOrderIds(): Promise<Array<string> | null>; | ||
}; | ||
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{ | ||
@@ -80,2 +326,3 @@ src: { | ||
onPageChange: (page: number) => void; | ||
onPdfInit: (pdf: PDFDocumentProxy) => void; | ||
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ | ||
@@ -160,2 +407,3 @@ src: { | ||
onOnPageChange?: ((page: number) => any) | undefined; | ||
onOnPdfInit?: ((pdf: PDFDocumentProxy) => any) | undefined; | ||
}, { | ||
@@ -162,0 +410,0 @@ src: string | Uint8Array; |
{ | ||
"name": "pdf-vue3", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "vue3 pdf viewer", | ||
@@ -5,0 +5,0 @@ "main": "./dist/pdf-vue3.js", |
@@ -64,2 +64,3 @@ # pdf-vue3 | ||
| `onPageChange` | Listen for page number changes. | `page: number` | | ||
| `onPdfInit` | pdf is init. PDFDocumentProxy: https://mozilla.github.io/pdf.js/api/draft/module-pdfjsLib-PDFDocumentProxy.html | `pdf: PDFDocumentProxy` | | ||
@@ -66,0 +67,0 @@ ### `Slots` |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2019618
16375
73