You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-pdf

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-pdf - npm Package Compare versions

Comparing version

to
29.1.33

src/pdf/core/layers/index.d.ts

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 28.2.11
* version : 29.1.33
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-pdf@*",
"_id": "@syncfusion/ej2-pdf@28.2.9",
"_id": "@syncfusion/ej2-pdf@17.9.0",
"_inBundle": false,
"_integrity": "sha512-SyTtkHQobFzSPDSsVIu5K7uzq4nX3Inq0DBflS2iyrD5t2jm2gC+l2AST3ybm0n16N5vkJij9gP+b+A4cFKeVA==",
"_integrity": "sha512-aQT4v0t10PmOLUbWS0mrYz734lDRw1y9ZD3kWXlWVjdVuqFr7bjGcChuNkmH8Bg0+8aUhDq1ubNY+DP2rc5TZw==",
"_location": "/@syncfusion/ej2-pdf",

@@ -24,6 +24,6 @@ "_phantomChildren": {},

],
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-28.2.9.tgz",
"_shasum": "27993d0842babf3615efafcd11ec303c033a3c16",
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-pdf/-/ej2-pdf-17.9.0.tgz",
"_shasum": "88e40f43a52a412003dbd713807346bee5e69b79",
"_spec": "@syncfusion/ej2-pdf@*",
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
"_where": "/jenkins/workspace/elease-automation_release_29.1.1/packages/included",
"author": {

@@ -34,4 +34,4 @@ "name": "Syncfusion Inc."

"dependencies": {
"@syncfusion/ej2-base": "~28.2.9",
"@syncfusion/ej2-compression": "~28.2.3"
"@syncfusion/ej2-base": "~29.1.33",
"@syncfusion/ej2-compression": "~29.1.33"
},

@@ -60,5 +60,5 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "28.2.11",
"version": "29.1.33",
"sideEffects": false,
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
}

@@ -5,3 +5,3 @@ # EJ2 PDF library

The Essential<sup>®</sup> JavaScript PDF library is a feature-rich and high-performance non-UI PDF library that is written natively in JavaScript. It enables you to seamlessly incorporate robust PDF functionalities into your JavaScript applications. The library allows users to read and manipulate PDF documents without requiring Adobe Acrobat.
The Essential JavaScript PDF library is a feature-rich and high-performance non-UI PDF library that is written natively in JavaScript. It enables you to seamlessly incorporate robust PDF functionalities into your JavaScript applications. The library allows users to read and manipulate PDF documents without requiring Adobe Acrobat.

@@ -8,0 +8,0 @@ ## Key Features

@@ -14,2 +14,3 @@ export * from './pdf/core/base-stream';

export * from './pdf/core/pdf-page';
export * from './pdf/core/pdf-section';
export * from './pdf/core/pdf-outline';

@@ -61,1 +62,3 @@ export * from './pdf/core/pdf-parser';

export * from './pdf/core/list/pdf-list-item';
export * from './pdf/core/layers/layer-collection';
export * from './pdf/core/layers/layer';

@@ -14,2 +14,3 @@ export * from './pdf/core/base-stream';

export * from './pdf/core/pdf-page';
export * from './pdf/core/pdf-section';
export * from './pdf/core/pdf-outline';

@@ -61,1 +62,3 @@ export * from './pdf/core/pdf-parser';

export * from './pdf/core/list/pdf-list-item';
export * from './pdf/core/layers/layer-collection';
export * from './pdf/core/layers/layer';

@@ -20,2 +20,3 @@ import { _TokenType } from './enumerator';

_offset: number;
_text: string[];
constructor(data: Uint8Array | number[]);

@@ -38,3 +39,4 @@ _getNextToken(): _TokenType;

_operands: string[];
_splittedText: string[];
constructor(operator: string, operands: string[]);
}

@@ -55,2 +55,3 @@ import { _TokenType } from './enumerator';

var record = new _PdfRecord(operand, this._operands);
record._splittedText = this._lexer._text;
this._recordCollection.push(record);

@@ -70,2 +71,3 @@ };

this._offset = 0;
this._text = [];
this._data = data instanceof Uint8Array ? data : new Uint8Array(data);

@@ -194,2 +196,5 @@ }

var flag = true;
var index = 0;
var char = '';
this._text = [];
while (flag) {

@@ -205,6 +210,14 @@ if (beginChar === '(') {

if (value === '(') {
if (char !== '') {
this._text[Number.parseInt(index.toString(), 10)] = char.slice(0, -1);
char = '';
index++;
}
value = this._consumeValue();
literal = this._getLiteralStringValue(value);
this._text[Number.parseInt(index.toString(), 10)] = '(' + literal;
index++;
this._operatorParams += literal;
value = this._getNextChar();
char += value;
continue;

@@ -217,3 +230,16 @@ }

}
else if (value === '>') {
this._text[Number.parseInt(index.toString(), 10)] = '<' + char;
index++;
char = '';
}
else if (value === '<') {
if (char !== '') {
this._text[Number.parseInt(index.toString(), 10)] = char.slice(0, -1);
index++;
}
char = '';
}
value = this._consumeValue();
char += value;
}

@@ -220,0 +246,0 @@ }

@@ -1924,1 +1924,32 @@ /**

}
/**
* Public enum to define a print state of layer
* ```typescript
* // Load an existing PDF document
* let document: PdfDocument = new PdfDocument(data);
* // Access the collection of layers in the document
* let layers: PdfLayerCollection = document.layers;
* // Retrieve the first layer from the layers collection
* let layer: PdfLayer = layers.at(0);
* // Retrieve the print state of the layer
* let printState: PdfPrintState = layer.printState;
* // Save the document
* document.save('output.pdf');
* // Destroy the document
* document.destroy();
* ````
*/
export declare enum PdfPrintState {
/**
* The PDF layers always get print
*/
alwaysPrint = 0,
/**
* The PDF layers never get print
*/
neverPrint = 1,
/**
* The visible PDF layers get print
*/
printWhenVisible = 2
}

@@ -13,2 +13,3 @@ import { PdfPage } from './../pdf-page';

import { PdfImage } from './images/pdf-image';
import { PdfLayer } from '../layers/layer';
/**

@@ -62,2 +63,4 @@ * Represents a graphics from a PDF page.

_isItalic: boolean;
_isEmptyLayer: boolean;
_layer: PdfLayer;
/**

@@ -564,2 +567,4 @@ * Initializes a new instance of the `PdfGraphics` class.

drawArc(x: number, y: number, width: number, height: number, startAngle: number, sweepAngle: number, pen: PdfPen): void;
private _beginMarkContent;
private _endMarkContent;
/**

@@ -566,0 +571,0 @@ * Draws an image on the page graphics.

@@ -77,3 +77,3 @@ import { _PdfStream } from './base-stream';

_writeObjectCollection(objectCollection: Map<_PdfReference, any>, buffer: number[]): void;
_writeArchieveStream(objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>, key: _PdfReference, value: any): void;
_writeArchiveStream(objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>, key: _PdfReference, value: any): void;
_writeObjectToBuffer(key: _PdfReference, value: any, buffer: number[], // eslint-disable-line

@@ -80,0 +80,0 @@ objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>): void;

@@ -260,2 +260,3 @@ import { _PdfCrossReference } from './pdf-cross-reference';

_combineIntoSingleArray(arrays: Uint8Array[]): Uint8Array;
_combineContent(): Uint8Array;
}

@@ -262,0 +263,0 @@ /**

@@ -665,27 +665,4 @@ import { _PdfDictionary, _PdfReference, _PdfName } from './pdf-primitives';

get: function () {
this._loadContents();
this._fetchResources();
var array;
var list = [];
var count = this._contents.length;
list.push(new Uint8Array([32, 113, 32, 10]));
for (var i = 0; i < count; i++) {
var reference = this._contents[Number.parseInt(i.toString(), 10)];
var base = this._crossReference._fetch(reference); // eslint-disable-line
if (base) {
if (base instanceof _PdfContentStream) {
array = new Uint8Array(base._bytes);
}
else if (base instanceof _PdfBaseStream) {
array = base.getBytes();
}
if (array) {
list.push(array);
list.push(new Uint8Array([13, 10]));
}
}
}
list.push(new Uint8Array([32, 81, 32, 10]));
list.push(new Uint8Array([13, 10]));
var targetArray = this._combineIntoSingleArray(list);
var targetArray = this._combineContent();
var targetStream = new _PdfContentStream(Array.from(targetArray));

@@ -721,2 +698,29 @@ var template = new PdfTemplate(targetStream, this._crossReference);

};
PdfPage.prototype._combineContent = function () {
var list = [];
var array;
this._loadContents();
var count = this._contents.length;
list.push(new Uint8Array([32, 113, 32, 10]));
for (var i = 0; i < count; i++) {
var reference = this._contents[Number.parseInt(i.toString(), 10)];
var base = this._crossReference._fetch(reference); // eslint-disable-line
if (base) {
if (base instanceof _PdfContentStream) {
array = new Uint8Array(base._bytes);
}
else if (base instanceof _PdfBaseStream) {
array = base.getBytes();
}
if (array) {
list.push(array);
list.push(new Uint8Array([13, 10]));
}
}
}
list.push(new Uint8Array([32, 81, 32, 10]));
list.push(new Uint8Array([13, 10]));
var targetArray = this._combineIntoSingleArray(list);
return targetArray;
};
return PdfPage;

@@ -723,0 +727,0 @@ }());

@@ -6,3 +6,3 @@ import { _PdfName, _PdfDictionary } from './pdf-primitives';

export declare class _PdfLexicalOperator {
stream: _PdfStream;
stream: any;
stringBuffer: Array<string>;

@@ -12,3 +12,3 @@ _hexStringNumber: number;

currentChar: number;
constructor(stream: _PdfStream);
constructor(stream: any);
nextChar(): number;

@@ -15,0 +15,0 @@ peekChar(): number;

import { _PdfDictionary, _PdfName, _PdfReference } from './pdf-primitives';
import { PdfDestination, PdfPage } from './pdf-page';
import { PdfFormFieldVisibility, PdfAnnotationFlag, PdfCheckBoxStyle, PdfHighlightMode, PdfBorderStyle, PdfBorderEffectStyle, PdfLineEndingStyle, _PdfCheckFieldState, PdfMeasurementUnit, _PdfGraphicsUnit, PdfTextMarkupAnnotationType, PdfAnnotationState, PdfAnnotationStateModel, PdfPopupIcon, PdfRubberStampAnnotationIcon, PdfAttachmentIcon, PdfAnnotationIntent, PdfBlendMode, PdfNumberStyle } from './enumerator';
import { PdfDocument } from './pdf-document';
import { PdfDocument, PdfPageSettings } from './pdf-document';
import { _PdfBaseStream } from './base-stream';

@@ -815,2 +815,24 @@ import { PdfStateItem, PdfComment, PdfWidgetAnnotation, PdfAnnotation } from './annotations/annotation';

/**
* Compare two arrays of numbers to determine if they are equal.
*
* This function checks if two arrays have the same length and
* identical elements in the same order.
*
* @param {number[]} arr1 - The first array to compare.
* @param {number[]} arr2 - The second array to compare.
* @returns {boolean} 'true' if the arrays are equal, otherwise 'false'.
*/
export declare function _isArrayEqual(arr1: number[], arr2: number[]): boolean;
/**
* Defines a property on an object with specific attributes.
*
* @param {Object} obj - The target object on which the property will be defined.
* @param {string} prop - The name of the property to define.
* @param {any} value - The value to assign to the property.
* @param {boolean} [serializable = false] - If true, the property will not be enumerable.
* @returns {any} The value of the property that was defined.
*
*/
export declare function _defineProperty(obj: any, prop: string, value: any, serializable?: boolean): any;
/**
* Compresses the content of a PDFBaseStream

@@ -829,6 +851,22 @@ *

*/
export declare function _isRTLCharacters(input: string): boolean;
export declare function _isRightToLeftCharacters(input: string): boolean;
/**
* Updates the page count value in the dictionary
*
* @param {_PdfDictionary} dictionary - Dictionary to update page count.
* @param {number} valueToIncrement - Page count.
* @returns {void} Nothing.
*/
export declare function _updatePageCount(dictionary: _PdfDictionary, valueToIncrement: number): void;
/**
* Updates the page settings in the dictionary
*
* @param {_PdfDictionary} dictionary - Dictionary to update page settings.
* @param {PdfPageSettings} settings - PDF page settings.
* @returns {void} Nothing.
*/
export declare function _updatePageSettings(dictionary: _PdfDictionary, settings: PdfPageSettings): void;
/**
* Base64 encoded string representing an empty PDF document.
*/
export declare const _emptyPdfData: string;

@@ -14,2 +14,3 @@ export * from './core/base-stream';

export * from './core/pdf-page';
export * from './core/pdf-section';
export * from './core/pdf-outline';

@@ -61,1 +62,3 @@ export * from './core/pdf-parser';

export * from './core/list/pdf-list-item';
export * from './core/layers/layer-collection';
export * from './core/layers/layer';

@@ -14,2 +14,3 @@ export * from './core/base-stream';

export * from './core/pdf-page';
export * from './core/pdf-section';
export * from './core/pdf-outline';

@@ -61,1 +62,3 @@ export * from './core/pdf-parser';

export * from './core/list/pdf-list-item';
export * from './core/layers/layer-collection';
export * from './core/layers/layer';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display