Socket
Socket
Sign inDemoInstall

pdfjs-dist

Package Overview
Dependencies
Maintainers
3
Versions
1541
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfjs-dist - npm Package Compare versions

Comparing version 4.2.67 to 4.3.136

2

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

@@ -5,0 +5,0 @@ "types": "types/src/pdf.d.ts",

@@ -282,2 +282,6 @@ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;

};
/**
* - The document /Lang attribute.
*/
lang: string | null;
};

@@ -687,3 +691,3 @@ /**

_progressiveDoneListeners: any[];
_readyCapability: PromiseWithResolvers<any>;
_readyCapability: any;
/**

@@ -739,4 +743,4 @@ * @param {function} listener

export class PDFDocumentLoadingTask {
static "__#44@#docId": number;
_capability: PromiseWithResolvers<any>;
static "__#45@#docId": number;
_capability: any;
_transport: any;

@@ -1082,2 +1086,3 @@ _worker: any;

* indexed by font name.
* @property {string | null} lang - The document /Lang attribute.
*/

@@ -1365,3 +1370,3 @@ /**

export class PDFWorker {
static "__#47@#workerPorts": any;
static "__#48@#workerPorts": any;
/**

@@ -1376,3 +1381,3 @@ * @param {PDFWorkerParameters} params - The worker initialization parameters.

static get workerSrc(): string;
static get "__#47@#mainThreadWorkerMessageHandler"(): any;
static get "__#48@#mainThreadWorkerMessageHandler"(): any;
static get _setupFakeWorkerGlobal(): any;

@@ -1387,3 +1392,3 @@ constructor({ name, port, verbosity, }?: {

verbosity: number;
_readyCapability: PromiseWithResolvers<any>;
_readyCapability: any;
_port: any;

@@ -1390,0 +1395,0 @@ _webWorker: Worker | null;

@@ -31,2 +31,4 @@ export class BaseCanvasFactory {

addHCMFilter(fgColor: any, bgColor: any): string;
addAlphaFilter(map: any): string;
addLuminosityFilter(map: any): string;
addHighlightHCMFilter(filterName: any, fgColor: any, bgColor: any, newFgColor: any, newBgColor: any): string;

@@ -33,0 +35,0 @@ destroy(keepHCM?: boolean): void;

@@ -82,2 +82,4 @@ export class CanvasGraphics {

compose(dirtyBox: any): void;
composeSMask(ctx: any, smask: any, layerCtx: any, layerBox: any): void;
genericComposeSMask(maskCtx: any, layerCtx: any, width: any, height: any, subtype: any, backdrop: any, transferMap: any, layerOffsetX: any, layerOffsetY: any, maskOffsetX: any, maskOffsetY: any): void;
save(): void;

@@ -84,0 +86,0 @@ restore(): void;

@@ -94,2 +94,4 @@ export type PageViewportParameters = {

addHCMFilter(fgColor: any, bgColor: any): any;
addAlphaFilter(map: any): any;
addLuminosityFilter(map: any): any;
addHighlightHCMFilter(filterName: any, fgColor: any, bgColor: any, newFgColor: any, newBgColor: any): any;

@@ -117,6 +119,5 @@ #private;

* @param {string} url
* @param {boolean} [onlyStripPath]
* @returns {string}
*/
export function getFilenameFromUrl(url: string, onlyStripPath?: boolean | undefined): string;
export function getFilenameFromUrl(url: string): string;
/**

@@ -123,0 +124,0 @@ * Returns the filename or guessed filename from the url (see issue 3455).

@@ -23,3 +23,3 @@ /** @implements {IPDFStream} */

_contentLength: any;
_headersCapability: PromiseWithResolvers<any>;
_headersCapability: any;
_disableRange: any;

@@ -32,3 +32,3 @@ _rangeChunkSize: any;

onProgress: any;
get headersReady(): Promise<any>;
get headersReady(): any;
get filename(): string | null;

@@ -54,3 +54,3 @@ get contentLength(): any;

_withCredentials: any;
_readCapability: PromiseWithResolvers<any>;
_readCapability: any;
_isStreamingSupported: boolean;

@@ -57,0 +57,0 @@ _abortController: AbortController;

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

@@ -9,3 +8,2 @@ });

disableFontFace: boolean;
ignoreErrors: boolean;
_inspectFont: any;

@@ -12,0 +10,0 @@ createNativeFontFace(): FontFace | null;

@@ -37,3 +37,3 @@ /** @implements {IPDFStream} */

_fullRequestId: any;
_headersReceivedCapability: PromiseWithResolvers<any>;
_headersReceivedCapability: any;
_disableRange: any;

@@ -58,3 +58,3 @@ _contentLength: any;

get contentLength(): any;
get headersReady(): Promise<any>;
get headersReady(): any;
read(): Promise<any>;

@@ -61,0 +61,0 @@ cancel(reason: any): void;

@@ -42,5 +42,5 @@ export class PDFNodeStream {

_readableStream: any;
_readCapability: PromiseWithResolvers<any>;
_headersCapability: PromiseWithResolvers<any>;
get headersReady(): Promise<any>;
_readCapability: any;
_headersCapability: any;
get headersReady(): any;
get filename(): any;

@@ -63,3 +63,3 @@ get contentLength(): any;

_readableStream: any;
_readCapability: PromiseWithResolvers<any>;
_readCapability: any;
_isStreamingSupported: boolean;

@@ -66,0 +66,0 @@ get isStreamingSupported(): boolean;

@@ -15,2 +15,6 @@ export class NodeCanvasFactory extends BaseCanvasFactory {

}
export class NodePackages {
static get promise(): any;
static get(name: any): any;
}
export class NodeStandardFontDataFactory extends BaseStandardFontDataFactory {

@@ -17,0 +21,0 @@ /**

export type PageViewport = import("./display_utils").PageViewport;
export type TextContent = import("./api").TextContent;
/**
* Text layer render parameters.
*/
export type TextLayerRenderParameters = {
export type TextLayerParameters = {
/**

@@ -23,30 +20,5 @@ * - Text content to

viewport: PageViewport;
/**
* - HTML elements that correspond to
* the text items of the textContent input.
* This is output and shall initially be set to an empty array.
*/
textDivs?: HTMLElement[] | undefined;
/**
* - Some properties
* weakly mapped to the HTML elements used to render the text.
*/
textDivProperties?: WeakMap<HTMLElement, Object> | undefined;
/**
* - Strings that correspond to
* the `str` property of the text items of the textContent input.
* This is output and shall initially be set to an empty array.
*/
textContentItemsStr?: string[] | undefined;
};
/**
* Text layer update parameters.
*/
export type TextLayerUpdateParameters = {
/**
* - The DOM node that will contain the text
* runs.
*/
container: HTMLElement;
/**
* - The target viewport to properly layout

@@ -57,85 +29,57 @@ * the text runs.

/**
* - HTML elements that correspond to
* the text items of the textContent input.
* This is output and shall initially be set to an empty array.
* - Callback invoked before the textLayer is
* updated in the DOM.
*/
textDivs?: HTMLElement[] | undefined;
onBefore?: Function | undefined;
};
export function renderTextLayer(...args: any[]): {
promise: Promise<any>;
textDivs: HTMLElement[];
textContentItemsStr: string[];
} | undefined;
export class TextLayer {
static "__#44@#ascentCache": Map<any, any>;
static "__#44@#canvasContexts": Map<any, any>;
static "__#44@#pendingTextLayers": Set<any>;
/**
* - Some properties
* weakly mapped to the HTML elements used to render the text.
* Clean-up global textLayer data.
* @returns {undefined}
*/
textDivProperties?: WeakMap<HTMLElement, Object> | undefined;
static cleanup(): undefined;
static "__#44@#getCtx"(lang?: null): any;
static "__#44@#getAscent"(fontFamily: any, lang: any): any;
/**
* true if the text layer must be rotated.
* @param {TextLayerParameters} options
*/
mustRotate?: boolean | undefined;
constructor({ textContentSource, container, viewport }: TextLayerParameters);
/**
* true if the text layer contents must be
* rescaled.
* Render the textLayer.
* @returns {Promise}
*/
mustRescale?: boolean | undefined;
};
export function cleanupTextLayer(): void;
/**
* @param {TextLayerRenderParameters} params
* @returns {TextLayerRenderTask}
*/
export function renderTextLayer(params: TextLayerRenderParameters): TextLayerRenderTask;
export class TextLayerRenderTask {
constructor({ textContentSource, container, viewport, textDivs, textDivProperties, textContentItemsStr, }: {
textContentSource: any;
container: any;
viewport: any;
textDivs: any;
textDivProperties: any;
textContentItemsStr: any;
});
_textContentSource: any;
_isReadableStream: boolean;
_container: any;
_rootContainer: any;
_textDivs: any;
_textContentItemsStr: any;
_fontInspectorEnabled: boolean;
_reader: any;
_textDivProperties: any;
_canceled: boolean;
_capability: PromiseWithResolvers<any>;
_layoutTextParams: {
prevFontSize: null;
prevFontFamily: null;
div: null;
scale: number;
properties: null;
ctx: any;
};
_transform: any[];
_pageWidth: any;
_pageHeight: any;
render(): Promise<any>;
/**
* Promise for textLayer rendering task completion.
* @type {Promise<void>}
* Update a previously rendered textLayer, if necessary.
* @param {TextLayerUpdateParameters} options
* @returns {undefined}
*/
get promise(): Promise<void>;
update({ viewport, onBefore }: TextLayerUpdateParameters): undefined;
/**
* Cancel rendering of the textLayer.
* @returns {undefined}
*/
cancel(): void;
cancel(): undefined;
/**
* @private
* @type {Array<HTMLElement>} HTML elements that correspond to the text items
* of the textContent input.
* This is output and will initially be set to an empty array.
*/
private _processItems;
get textDivs(): HTMLElement[];
/**
* @private
* @type {Array<string>} Strings that correspond to the `str` property of
* the text items of the textContent input.
* This is output and will initially be set to an empty array
*/
private _layoutText;
/**
* @private
*/
private _render;
get textContentItemsStr(): string[];
#private;
}
/**
* @param {TextLayerUpdateParameters} params
* @returns {undefined}
*/
export function updateTextLayer({ container, viewport, textDivs, textDivProperties, mustRotate, mustRescale, }: TextLayerUpdateParameters): undefined;
export function updateTextLayer(): void;

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

export type PageViewport = import("./display/display_utils").PageViewport;
export type TextLayerRenderTask = import("./display/text_layer").TextLayerRenderTask;
import { AbortException } from "./shared/util.js";

@@ -48,2 +47,3 @@ import { AnnotationEditorLayer } from "./display/editor/annotation_editor_layer.js";

import { shadow } from "./shared/util.js";
import { TextLayer } from "./display/text_layer.js";
import { UnexpectedResponseException } from "./shared/util.js";

@@ -55,2 +55,2 @@ import { updateTextLayer } from "./display/text_layer.js";

import { XfaLayer } from "./display/xfa_layer.js";
export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, build, CMapCompressionType, ColorPicker, createValidAbsoluteUrl, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getXfaPageViewport, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, MissingPDFException, noContextMenu, normalizeUnicode, OPS, Outliner, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, renderTextLayer, setLayerDimensions, shadow, UnexpectedResponseException, updateTextLayer, Util, VerbosityLevel, version, XfaLayer };
export { AbortException, AnnotationEditorLayer, AnnotationEditorParamsType, AnnotationEditorType, AnnotationEditorUIManager, AnnotationLayer, AnnotationMode, build, CMapCompressionType, ColorPicker, createValidAbsoluteUrl, DOMSVGFactory, DrawLayer, FeatureTest, fetchData, getDocument, getFilenameFromUrl, getPdfFilenameFromUrl, getXfaPageViewport, GlobalWorkerOptions, ImageKind, InvalidPDFException, isDataScheme, isPdfFile, MissingPDFException, noContextMenu, normalizeUnicode, OPS, Outliner, PasswordResponses, PDFDataRangeTransport, PDFDateString, PDFWorker, PermissionFlag, PixelsPerInch, RenderingCancelledException, renderTextLayer, setLayerDimensions, shadow, TextLayer, UnexpectedResponseException, updateTextLayer, Util, VerbosityLevel, version, XfaLayer };

@@ -12,12 +12,12 @@ export type IL10n = import("./interfaces").IL10n;

*/
static "__#58@#generateBundles"(defaultLang: string, baseLang: string): AsyncGenerator<any, void, unknown>;
static "__#58@#createBundle"(lang: any, baseURL: any, paths: any): Promise<any>;
static "__#58@#getPaths"(): Promise<{
static "__#59@#generateBundles"(defaultLang: string, baseLang: string): AsyncGenerator<any, void, unknown>;
static "__#59@#createBundle"(lang: any, baseURL: any, paths: any): Promise<any>;
static "__#59@#getPaths"(): Promise<{
baseURL: any;
paths: any;
}>;
static "__#58@#generateBundlesFallback"(lang: any): AsyncGenerator<any, void, unknown>;
static "__#58@#createBundleFallback"(lang: any): Promise<any>;
static "__#59@#generateBundlesFallback"(lang: any): AsyncGenerator<any, void, unknown>;
static "__#59@#createBundleFallback"(lang: any): Promise<any>;
constructor(lang: any);
}
import { L10n } from "./l10n.js";

@@ -10,4 +10,4 @@ export type IL10n = import("./interfaces").IL10n;

export class L10n implements IL10n {
static "__#57@#fixupLangCode"(langCode: any): any;
static "__#57@#isRTL"(lang: any): boolean;
static "__#58@#fixupLangCode"(langCode: any): any;
static "__#58@#isRTL"(lang: any): boolean;
constructor({ lang, isRTL }: {

@@ -14,0 +14,0 @@ lang: any;

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

_resumePageIdx: any;
_firstPageCapability: PromiseWithResolvers<any> | undefined;
_firstPageCapability: any;
_rawQuery: any;
#private;
}

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

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

@@ -54,0 +54,0 @@ * @param {PDFLinkServiceOptions} options

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

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

@@ -202,4 +202,2 @@ export type PDFDocumentProxy = import("../src/display/api").PDFDocumentProxy;

presentationModeState: number;
_onBeforeDraw: ((evt: any) => void) | null;
_onAfterDraw: any;
get pagesCount(): number;

@@ -268,5 +266,5 @@ getPageView(index: any): any;

_pagesRotation: any;
get firstPagePromise(): Promise<any> | null;
get onePageRendered(): Promise<any> | null;
get pagesPromise(): Promise<any> | null;
get firstPagePromise(): any;
get onePageRendered(): any;
get pagesPromise(): any;
get _layerProperties(): any;

@@ -298,5 +296,5 @@ getAllText(): Promise<string | null>;

} | null | undefined;
_firstPageCapability: PromiseWithResolvers<any> | undefined;
_onePageRenderedCapability: PromiseWithResolvers<any> | undefined;
_pagesCapability: PromiseWithResolvers<any> | undefined;
_firstPageCapability: any;
_onePageRenderedCapability: any;
_pagesCapability: any;
_previousScrollMode: any;

@@ -422,11 +420,32 @@ _spreadMode: any;

* @property {number} [steps]
* @property {Array} [origin] x and y coordinates of the scale
* transformation origin.
*/
/**
* Changes the current zoom level by the specified amount.
* @param {ChangeScaleOptions} [options]
*/
updateScale({ drawingDelay, scaleFactor, steps, origin }?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;
/**
* Increase the current zoom level one, or more, times.
* @param {ChangeScaleOptions} [options]
*/
increaseScale({ drawingDelay, scaleFactor, steps }?: {
increaseScale(options?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;

@@ -437,6 +456,11 @@ /**

*/
decreaseScale({ drawingDelay, scaleFactor, steps }?: {
decreaseScale(options?: {
drawingDelay?: number | undefined;
scaleFactor?: number | undefined;
steps?: number | undefined;
/**
* x and y coordinates of the scale
* transformation origin.
*/
origin?: any[] | undefined;
} | undefined): void;

@@ -443,0 +467,0 @@ get containerTopLeft(): number[];

@@ -0,6 +1,7 @@

export type PDFPageProxy = import("../src/display/api").PDFPageProxy;
export type PageViewport = import("../src/display/display_utils").PageViewport;
export type TextContent = import("../src/display/api").TextContent;
export type TextHighlighter = import("./text_highlighter").TextHighlighter;
export type TextAccessibilityManager = import("./text_accessibility.js").TextAccessibilityManager;
export type TextLayerBuilderOptions = {
pdfPage: PDFPageProxy;
/**

@@ -10,3 +11,3 @@ * - Optional object that will handle

*/
highlighter: TextHighlighter;
highlighter?: import("./text_highlighter").TextHighlighter | undefined;
accessibilityManager?: import("./text_accessibility.js").TextAccessibilityManager | undefined;

@@ -17,3 +18,4 @@ onAppend?: Function | undefined;

* @typedef {Object} TextLayerBuilderOptions
* @property {TextHighlighter} highlighter - Optional object that will handle
* @property {PDFPageProxy} pdfPage
* @property {TextHighlighter} [highlighter] - Optional object that will handle
* highlighting text from the find controller.

@@ -29,3 +31,8 @@ * @property {TextAccessibilityManager} [accessibilityManager]

export class TextLayerBuilder {
constructor({ highlighter, accessibilityManager, enablePermissions, onAppend, }: {
static "__#65@#textLayers": Map<any, any>;
static "__#65@#selectionChangeAbortController": null;
static "__#65@#removeGlobalSelectionListener"(textLayerDiv: any): void;
static "__#65@#enableGlobalSelectionListener"(): void;
constructor({ pdfPage, highlighter, accessibilityManager, enablePermissions, onAppend, }: {
pdfPage: any;
highlighter?: null | undefined;

@@ -36,16 +43,12 @@ accessibilityManager?: null | undefined;

});
textContentItemsStr: any[];
renderingDone: boolean;
textDivs: any[];
textDivProperties: WeakMap<WeakKey, any>;
textLayerRenderTask: import("../src/display/text_layer.js").TextLayerRenderTask | null;
pdfPage: any;
highlighter: any;
accessibilityManager: any;
div: HTMLDivElement;
get numTextDivs(): number;
/**
* Renders the text layer.
* @param {PageViewport} viewport
* @param {Object} [textContentParams]
*/
render(viewport: PageViewport): Promise<void>;
render(viewport: PageViewport, textContentParams?: Object | undefined): Promise<void>;
hide(): void;

@@ -57,7 +60,3 @@ show(): void;

cancel(): void;
/**
* @param {ReadableStream | TextContent} source
*/
setTextContentSource(source: ReadableStream | TextContent): 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc