Socket
Socket
Sign inDemoInstall

pdfjs-dist

Package Overview
Dependencies
66
Maintainers
3
Versions
1538
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.392 to 4.2.67

4

package.json
{
"name": "pdfjs-dist",
"version": "4.1.392",
"version": "4.2.67",
"main": "build/pdf.mjs",

@@ -17,3 +17,3 @@ "types": "types/src/pdf.d.ts",

"canvas": "^2.11.2",
"path2d": "^0.1.2"
"path2d": "^0.2.0"
},

@@ -20,0 +20,0 @@ "browser": {

@@ -6,2 +6,3 @@ export type PDFPageProxy = import("./api").PDFPageProxy;

export type IPDFLinkService = import("../../web/interfaces").IPDFLinkService;
export type AnnotationEditorUIManager = any;
export type AnnotationElementParameters = {

@@ -52,2 +53,3 @@ data: Object;

accessibilityManager?: import("../../web/text_accessibility.js").TextAccessibilityManager | undefined;
annotationEditorUIManager?: any;
};

@@ -72,2 +74,3 @@ /**

* @property {TextAccessibilityManager} [accessibilityManager]
* @property {AnnotationEditorUIManager} [annotationEditorUIManager]
*/

@@ -78,6 +81,7 @@ /**

export class AnnotationLayer {
constructor({ div, accessibilityManager, annotationCanvasMap, page, viewport, }: {
constructor({ div, accessibilityManager, annotationCanvasMap, annotationEditorUIManager, page, viewport, }: {
div: any;
accessibilityManager: any;
annotationCanvasMap: any;
annotationEditorUIManager: any;
page: any;

@@ -90,2 +94,3 @@ viewport: any;

zIndex: number;
_annotationEditorUIManager: any;
popupShow: any[] | undefined;

@@ -158,2 +163,4 @@ /**

get hasPopupData(): boolean;
updateEdited(params: any): void;
resetEdited(): void;
/**

@@ -160,0 +167,0 @@ * Create an empty container for the annotation's HTML element.

@@ -129,4 +129,4 @@ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;

* - Determines if we can evaluate strings
* as JavaScript. Primarily used to improve performance of font rendering, and
* when parsing PDF functions. The default value is `true`.
* as JavaScript. Primarily used to improve performance of PDF functions.
* The default value is `true`.
*/

@@ -600,4 +600,4 @@ isEvalSupported?: boolean | undefined;

* @property {boolean} [isEvalSupported] - Determines if we can evaluate strings
* as JavaScript. Primarily used to improve performance of font rendering, and
* when parsing PDF functions. The default value is `true`.
* as JavaScript. Primarily used to improve performance of PDF functions.
* The default value is `true`.
* @property {boolean} [isOffscreenCanvasSupported] - Determines if we can use

@@ -1016,2 +1016,7 @@ * `OffscreenCanvas` in the worker. Primarily used to improve performance of

/**
* @param {RefProxy} ref - The page reference.
* @returns {number | null} The page number, if it's cached.
*/
cachedPageNumber(ref: RefProxy): number | null;
/**
* @type {DocumentInitParameters} A subset of the current

@@ -1454,3 +1459,2 @@ * {DocumentInitParameters}, which are needed in the viewer.

import { AnnotationStorage } from "./annotation_storage.js";
import { info } from "../shared/util.js";
import { Metadata } from "./metadata.js";

@@ -1457,0 +1461,0 @@ import { StatTimer } from "./display_utils.js";

@@ -315,2 +315,8 @@ export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;

/**
* Check if an existing annotation associated with this editor has been
* modified.
* @returns {boolean}
*/
get hasBeenModified(): boolean;
/**
* Remove this editor.

@@ -407,2 +413,9 @@ * It's used on ctrl+backspace action.

disable(): void;
/**
* Render an annotation in the annotation layer.
* @param {Object} annotation
* @returns {HTMLElement}
*/
renderAnnotationElement(annotation: Object): HTMLElement;
resetAnnotationElement(annotation: any): void;
#private;

@@ -409,0 +422,0 @@ }

@@ -66,4 +66,6 @@ export type AnnotationEditorLayer = import("./annotation_editor_layer.js").AnnotationEditorLayer;

} | null;
/** @inheritdoc */
renderAnnotationElement(annotation: any): HTMLElement;
#private;
}
import { AnnotationEditor } from "./editor.js";

@@ -281,2 +281,10 @@ export type AnnotationEditor = import("./editor.js").AnnotationEditor;

}[] | null;
addChangedExistingAnnotation({ annotationElementId, id }: {
annotationElementId: any;
id: any;
}): void;
removeChangedExistingAnnotation({ annotationElementId }: {
annotationElementId: any;
}): void;
renderAnnotationElement(annotation: any): void;
#private;

@@ -283,0 +291,0 @@ }

export class FontFaceObject {
constructor(translatedData: any, { isEvalSupported, disableFontFace, ignoreErrors, inspectFont, }: {
isEvalSupported?: boolean | undefined;
constructor(translatedData: any, { disableFontFace, ignoreErrors, inspectFont }: {
disableFontFace?: boolean | undefined;

@@ -9,3 +8,2 @@ ignoreErrors?: boolean | undefined;

compiledGlyphs: any;
isEvalSupported: boolean;
disableFontFace: boolean;

@@ -12,0 +10,0 @@ ignoreErrors: boolean;

@@ -171,2 +171,13 @@ declare const AbortException_base: any;

export const FONT_IDENTITY_MATRIX: number[];
export namespace FontRenderOps {
let BEZIER_CURVE_TO: number;
let MOVE_TO: number;
let LINE_TO: number;
let QUADRATIC_CURVE_TO: number;
let RESTORE: number;
let SAVE: number;
let SCALE: number;
let TRANSFORM: number;
let TRANSLATE: number;
}
declare const FormatError_base: any;

@@ -329,3 +340,4 @@ /**

export { PRINT_2 as PRINT };
export let SAVE: number;
let SAVE_1: number;
export { SAVE_1 as SAVE };
export let ANNOTATIONS_FORMS: number;

@@ -332,0 +344,0 @@ export let ANNOTATIONS_STORAGE: number;

@@ -35,3 +35,3 @@ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;

accessibilityManager: import("./text_accessibility.js").TextAccessibilityManager | undefined;
l10n: any;
l10n: import("./interfaces").IL10n | GenericL10n | undefined;
annotationEditorLayer: AnnotationEditorLayer | null;

@@ -50,2 +50,3 @@ div: HTMLDivElement | null;

}
import { GenericL10n } from "./genericl10n";
import { AnnotationEditorLayer } from "../src/pdf";

@@ -7,2 +7,3 @@ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;

export type TextAccessibilityManager = import("./text_accessibility.js").TextAccessibilityManager;
export type AnnotationEditorUIManager = import("../src/display/editor/tools.js").AnnotationEditorUIManager;
export type AnnotationLayerBuilderOptions = {

@@ -26,2 +27,3 @@ pdfPage: PDFPageProxy;

accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;
annotationEditorUIManager?: import("../src/pdf").AnnotationEditorUIManager | undefined;
onAppend?: Function | undefined;

@@ -44,2 +46,3 @@ };

* @property {TextAccessibilityManager} [accessibilityManager]
* @property {AnnotationEditorUIManager} [annotationEditorUIManager]
* @property {function} [onAppend]

@@ -51,3 +54,3 @@ */

*/
constructor({ pdfPage, linkService, downloadManager, annotationStorage, imageResourcesPath, renderForms, enableScripting, hasJSActionsPromise, fieldObjectsPromise, annotationCanvasMap, accessibilityManager, onAppend, }: AnnotationLayerBuilderOptions);
constructor({ pdfPage, linkService, downloadManager, annotationStorage, imageResourcesPath, renderForms, enableScripting, hasJSActionsPromise, fieldObjectsPromise, annotationCanvasMap, accessibilityManager, annotationEditorUIManager, onAppend, }: AnnotationLayerBuilderOptions);
pdfPage: import("../src/display/api").PDFPageProxy;

@@ -66,2 +69,3 @@ linkService: import("./interfaces").IPDFLinkService;

_accessibilityManager: import("./text_accessibility.js").TextAccessibilityManager;
_annotationEditorUIManager: import("../src/pdf").AnnotationEditorUIManager;
annotationLayer: AnnotationLayer | null;

@@ -68,0 +72,0 @@ div: HTMLDivElement | null;

@@ -147,7 +147,2 @@ export type PDFPageProxy = import("../src/display/api").PDFPageProxy;

executeSetOCGState(action: Object): void;
/**
* @param {number} pageNum - page number.
* @param {Object} pageRef - reference to the page.
*/
cachePageRef(pageNum: number, pageRef: Object): void;
}

@@ -154,0 +149,0 @@ /**

@@ -54,11 +54,2 @@ export type PDFHistoryOptions = {

_fingerprint: string;
_boundEvents: {
updateViewarea: ({ location }: {
location: any;
}) => void;
popState: ({ state }: {
state: any;
}) => void;
pageHide: () => void;
} | null;
_isPagesLoaded: boolean;

@@ -125,46 +116,3 @@ /**

get initialRotation(): any;
/**
* @private
*/
private _pushOrReplaceState;
/**
* @private
*/
private _tryPushCurrentPosition;
/**
* @private
*/
private _isValidPage;
/**
* @private
*/
private _isValidState;
/**
* @private
*/
private _updateInternalState;
/**
* @private
*/
private _parseCurrentHash;
/**
* @private
*/
private _updateViewarea;
/**
* @private
*/
private _popState;
/**
* @private
*/
private _pageHide;
/**
* @private
*/
private _bindEvents;
/**
* @private
*/
private _unbindEvents;
#private;
}

@@ -1,28 +0,1 @@

export type ExternalLinkParameters = {
/**
* - An absolute URL.
*/
url: string;
/**
* - The link target. The default value is
* `LinkTarget.NONE`.
*/
target?: {
NONE: number;
SELF: number;
BLANK: number;
PARENT: number;
TOP: number;
} | undefined;
/**
* - The link relationship. The default value is
* `DEFAULT_LINK_REL`.
*/
rel?: string | undefined;
/**
* - Whether the link should be enabled. The
* default value is true.
*/
enabled?: boolean | undefined;
};
export type EventBus = import("./event_utils").EventBus;

@@ -78,3 +51,3 @@ export type IPDFLinkService = import("./interfaces").IPDFLinkService;

export class PDFLinkService implements IPDFLinkService {
static "__#54@#isValidExplicitDestination"(dest: any): boolean;
static "__#54@#isValidExplicitDest"(dest: any): boolean;
/**

@@ -84,6 +57,6 @@ * @param {PDFLinkServiceOptions} options

constructor({ eventBus, externalLinkTarget, externalLinkRel, ignoreDestinationZoom, }?: PDFLinkServiceOptions);
externalLinkEnabled: boolean;
eventBus: import("./event_utils").EventBus;
externalLinkTarget: number;
externalLinkRel: string;
externalLinkEnabled: boolean;
_ignoreDestinationZoom: boolean;

@@ -134,3 +107,3 @@ baseUrl: any;

/**
* Wrapper around the `addLinkAttributes` helper function.
* Adds various attributes (href, title, target, rel) to hyperlinks.
* @param {HTMLAnchorElement} link

@@ -165,12 +138,2 @@ * @param {string} url

executeSetOCGState(action: Object): Promise<void>;
/**
* @param {number} pageNum - page number.
* @param {Object} pageRef - reference to the page.
*/
cachePageRef(pageNum: number, pageRef: Object): void;
/**
* @ignore
*/
_cachedPageNumber(pageRef: any): any;
#private;
}

@@ -180,69 +143,3 @@ /**

*/
export class SimpleLinkService implements IPDFLinkService {
externalLinkEnabled: boolean;
/**
* @type {number}
*/
get pagesCount(): number;
/**
* @param {number} value
*/
set page(value: number);
/**
* @type {number}
*/
get page(): number;
/**
* @param {number} value
*/
set rotation(value: number);
/**
* @type {number}
*/
get rotation(): number;
/**
* @type {boolean}
*/
get isInPresentationMode(): boolean;
/**
* @param {string|Array} dest - The named, or explicit, PDF destination.
*/
goToDestination(dest: string | any[]): Promise<void>;
/**
* @param {number|string} val - The page number, or page label.
*/
goToPage(val: number | string): void;
/**
* @param {HTMLAnchorElement} link
* @param {string} url
* @param {boolean} [newWindow]
*/
addLinkAttributes(link: HTMLAnchorElement, url: string, newWindow?: boolean | undefined): void;
/**
* @param dest - The PDF destination object.
* @returns {string} The hyperlink to the PDF object.
*/
getDestinationHash(dest: any): string;
/**
* @param hash - The PDF parameters/hash.
* @returns {string} The hyperlink to the PDF object.
*/
getAnchorUrl(hash: any): string;
/**
* @param {string} hash
*/
setHash(hash: string): void;
/**
* @param {string} action
*/
executeNamedAction(action: string): void;
/**
* @param {Object} action
*/
executeSetOCGState(action: Object): void;
/**
* @param {number} pageNum - page number.
* @param {Object} pageRef - reference to the page.
*/
cachePageRef(pageNum: number, pageRef: Object): void;
export class SimpleLinkService extends PDFLinkService implements IPDFLinkService {
}

@@ -101,3 +101,3 @@ export type PageViewport = import("../src/display/display_utils").PageViewport;

renderingQueue: import("./pdf_rendering_queue").PDFRenderingQueue | undefined;
l10n: any;
l10n: import("./interfaces").IL10n | GenericL10n | undefined;
renderTask: any;

@@ -196,2 +196,3 @@ resume: (() => void) | null;

}
import { GenericL10n } from "./genericl10n";
import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";

@@ -198,0 +199,0 @@ import { AnnotationEditorLayerBuilder } from "./annotation_editor_layer_builder.js";

@@ -51,6 +51,2 @@ export type EventBus = import("./event_utils").EventBus;

*/
private get _internalEvents();
/**
* @private
*/
private get _pageOpenPending();

@@ -57,0 +53,0 @@ /**

@@ -109,5 +109,5 @@ export type OptionalContentConfig = import("../src/display/optional_content_config").OptionalContentConfig;

export class TempImageFactory {
static "__#66@#tempCanvas": null;
static "__#68@#tempCanvas": null;
static getCanvas(width: any, height: any): (HTMLCanvasElement | CanvasRenderingContext2D | null)[];
static destroyCanvas(): void;
}

@@ -190,3 +190,3 @@ export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;

maxCanvasPixels: number | undefined;
l10n: any;
l10n: import("./interfaces").IL10n | GenericL10n | undefined;
pageColors: Object | null;

@@ -486,1 +486,2 @@ defaultRenderingQueue: boolean;

import { SimpleLinkService } from "./pdf_link_service.js";
import { GenericL10n } from "./genericl10n";

@@ -35,3 +35,2 @@ export type EventBus = import("./event_utils").EventBus;

pageIdx: number;
_onUpdateTextLayerMatches: ((evt: any) => void) | null;
textDivs: Node[] | null;

@@ -64,2 +63,3 @@ textContentItemsStr: string[] | null;

_updateMatches(reset?: boolean): void;
#private;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc