@syncfusion/ej2-pdf
Advanced tools
Comparing version 27.2.5 to 28.1.33
/*! | ||
* filename: index.d.ts | ||
* version : 27.2.5 | ||
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved. | ||
* version : 28.1.33 | ||
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. | ||
* Use of this code is subject to the terms of our license. | ||
@@ -6,0 +6,0 @@ * A copy of the current license can be obtained at any time by e-mailing |
{ | ||
"_from": "@syncfusion/ej2-pdf@*", | ||
"_id": "@syncfusion/ej2-pdf@27.2.3", | ||
"_id": "@syncfusion/ej2-pdf@17.9.0", | ||
"_inBundle": false, | ||
"_integrity": "sha512-08BFgQFscw7HfsWQXXLN/IznlxuIKBeAYjbbsalsisApgrrhhQ8SmaZYWUHku6diqTV8yxMJxl0pi2Rk3EQq8g==", | ||
"_integrity": "sha512-EgM5ZeCOyMuoiAYA8BbqgiHrldUgmFxksVQktLMyZcjjhaNGnP+ZWXWvB9KG2/LZeiOs59xLjlqu205pumrITg==", | ||
"_location": "/@syncfusion/ej2-pdf", | ||
@@ -24,6 +24,6 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-27.2.3.tgz", | ||
"_shasum": "20e878c4e4392bda1eefccf7c696f2720b365998", | ||
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-pdf/-/ej2-pdf-17.9.0.tgz", | ||
"_shasum": "a8cacd0a2045d03b6db8a7b0e0978cbb909e0916", | ||
"_spec": "@syncfusion/ej2-pdf@*", | ||
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included", | ||
"_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included", | ||
"author": { | ||
@@ -34,4 +34,4 @@ "name": "Syncfusion Inc." | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~27.2.5", | ||
"@syncfusion/ej2-compression": "~27.2.2" | ||
"@syncfusion/ej2-base": "~28.1.33", | ||
"@syncfusion/ej2-compression": "~28.1.33" | ||
}, | ||
@@ -60,5 +60,5 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "27.2.5", | ||
"version": "28.1.33", | ||
"sideEffects": false, | ||
"homepage": "https://www.syncfusion.com/javascript-ui-controls" | ||
} |
@@ -5,3 +5,3 @@ # EJ2 PDF library | ||
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. | ||
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. | ||
@@ -8,0 +8,0 @@ ## Key Features |
@@ -30,2 +30,8 @@ import { _PdfStream } from './base-stream'; | ||
_prevXRefOffset: number; | ||
_indexes: Array<number>; | ||
_objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>; | ||
_offsets: Array<number>; | ||
_offsetReference: Map<_PdfReference, any>; | ||
_objectStream: _PdfArchievedStream; | ||
_currentLength: number; | ||
constructor(document: PdfDocument, password?: string); | ||
@@ -36,3 +42,3 @@ _setStartXRef(startXRef: number): void; | ||
_fetch(ref: _PdfReference, suppressEncryption?: boolean): any; | ||
_fetchUncompressed(reference: _PdfReference, xrefEntry: _PdfObjectInformation, suppressEncryption: boolean): any; | ||
_fetchUncompressed(reference: _PdfReference, xrefEntry: _PdfObjectInformation, makeFilter?: boolean): any; | ||
_fetchCompressed(ref: _PdfReference, xrefEntry: _PdfObjectInformation): any; | ||
@@ -50,7 +56,14 @@ _readXRef(recoveryMode?: boolean): _PdfDictionary; | ||
_saveAsStream(currentLength: number, buffer: number[]): void; | ||
_updatedDictionary(currentLength: number, key: _PdfReference, buffer: number[], value: any, // eslint-disable-line | ||
cipher?: _CipherTransform): void; | ||
_writeXrefStream(buffer: number[]): void; | ||
_saveAsTable(currentLength: number, buffer: number[]): void; | ||
_writeXref(buffer: number[], tempBuffer: string, newStartXref: number): void; | ||
_writeXrefTable(buffer: number[]): void; | ||
_processString(value: string, length: number): string; | ||
_copyTrailer(newXref: _PdfDictionary): void; | ||
_computeMessageDigest(size: number): string; | ||
_getNextReference(): _PdfReference; | ||
_writeObject(obj: _PdfDictionary | _PdfBaseStream, buffer: Array<number>, reference?: _PdfReference, transform?: _CipherTransform, isCrossReference?: boolean): void; | ||
_writeObject(obj: _PdfDictionary | _PdfBaseStream | any, // eslint-disable-line | ||
buffer: Array<number>, reference?: _PdfReference, transform?: _CipherTransform, isCrossReference?: boolean): void; | ||
_writeDictionary(dictionary: _PdfDictionary, buffer: Array<number>, spaceChar: string, transform?: _CipherTransform, isCrossReference?: boolean): void; | ||
@@ -66,2 +79,8 @@ _writeFontDictionary(dictionary: _PdfDictionary): void; | ||
_destroy(): void; | ||
_writeObjectCollection(objectCollection: Map<_PdfReference, any>, buffer: number[]): void; | ||
_writeArchieveStream(objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>, key: _PdfReference, value: any): void; | ||
_writeObjectToBuffer(key: _PdfReference, value: any, buffer: number[], // eslint-disable-line | ||
objectStreamCollection: Map<_PdfReference, _PdfArchievedStream>): void; | ||
_writeToBuffer(buffer: number[], key: any, value: any, cipher?: _CipherTransform): void; | ||
_getSortedReferences(collection: Map<_PdfReference, any>): Map<_PdfReference, any>; | ||
} | ||
@@ -88,2 +107,15 @@ declare class _PdfObjectInformation { | ||
} | ||
declare class _PdfArchievedStream { | ||
_indexes: string; | ||
_length: number; | ||
_updatedStream: number[]; | ||
_crossReference: _PdfCrossReference; | ||
_reference: _PdfReference; | ||
_archiveXRef: string; | ||
_collection: number[]; | ||
_archiveOffset: number; | ||
constructor(crossReference: _PdfCrossReference); | ||
_writeObject(key: _PdfReference, value: _PdfDictionary): void; | ||
_save(buffer: number[], currentLength: number): void; | ||
} | ||
export {}; |
@@ -19,2 +19,3 @@ import { PdfCrossReferenceType } from './enumerator'; | ||
_crossReferenceType: PdfCrossReferenceType; | ||
_incrementalUpdate: boolean; | ||
/** | ||
@@ -55,2 +56,37 @@ * Gets the cross reference type of the PDF document. | ||
crossReferenceType: PdfCrossReferenceType; | ||
/** | ||
* Gets the boolean flag indicating whether the update is incremental. | ||
* | ||
* @returns { boolean } - Returns true if the PDF document supports incremental updates, otherwise false | ||
* ```typescript | ||
* // Load an existing PDF document | ||
* let document: PdfDocument = new PdfDocument(data, password); | ||
* // Access the internal file structure of the PDF document | ||
* let fileStructure: PdfFileStructure = document.fileStructure; | ||
* // Get the incremental update | ||
* let incrementalUpdate: boolean = fileStructure.isIncrementalUpdate; | ||
* // Save the document | ||
* document.save('output.pdf'); | ||
* // Destroy the document | ||
* document.destroy(); | ||
* ``` | ||
*/ | ||
/** | ||
* Sets the boolean flag indicating whether the update is incremental. | ||
* | ||
* @param {boolean} value - If `true`, enables incremental updates for the PDF document; otherwise, disables it. | ||
* ```typescript | ||
* // Load an existing PDF document | ||
* let document: PdfDocument = new PdfDocument(data, password); | ||
* // Access the internal file structure of the PDF document | ||
* let fileStructure: PdfFileStructure = document.fileStructure; | ||
* // Set the incremental updates | ||
* fileStructure.isIncrementalUpdate = false; | ||
* // Save the document | ||
* document.save('output.pdf'); | ||
* // Destroy the document | ||
* document.destroy(); | ||
* ``` | ||
*/ | ||
isIncrementalUpdate: boolean; | ||
} |
@@ -18,2 +18,3 @@ /** | ||
function PdfFileStructure() { | ||
this._incrementalUpdate = true; | ||
} | ||
@@ -64,4 +65,48 @@ Object.defineProperty(PdfFileStructure.prototype, "crossReferenceType", { | ||
}); | ||
Object.defineProperty(PdfFileStructure.prototype, "isIncrementalUpdate", { | ||
/** | ||
* Gets the boolean flag indicating whether the update is incremental. | ||
* | ||
* @returns { boolean } - Returns true if the PDF document supports incremental updates, otherwise false | ||
* ```typescript | ||
* // Load an existing PDF document | ||
* let document: PdfDocument = new PdfDocument(data, password); | ||
* // Access the internal file structure of the PDF document | ||
* let fileStructure: PdfFileStructure = document.fileStructure; | ||
* // Get the incremental update | ||
* let incrementalUpdate: boolean = fileStructure.isIncrementalUpdate; | ||
* // Save the document | ||
* document.save('output.pdf'); | ||
* // Destroy the document | ||
* document.destroy(); | ||
* ``` | ||
*/ | ||
get: function () { | ||
return this._incrementalUpdate; | ||
}, | ||
/** | ||
* Sets the boolean flag indicating whether the update is incremental. | ||
* | ||
* @param {boolean} value - If `true`, enables incremental updates for the PDF document; otherwise, disables it. | ||
* ```typescript | ||
* // Load an existing PDF document | ||
* let document: PdfDocument = new PdfDocument(data, password); | ||
* // Access the internal file structure of the PDF document | ||
* let fileStructure: PdfFileStructure = document.fileStructure; | ||
* // Set the incremental updates | ||
* fileStructure.isIncrementalUpdate = false; | ||
* // Save the document | ||
* document.save('output.pdf'); | ||
* // Destroy the document | ||
* document.destroy(); | ||
* ``` | ||
*/ | ||
set: function (value) { | ||
this._incrementalUpdate = value; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
return PdfFileStructure; | ||
}()); | ||
export { PdfFileStructure }; |
@@ -39,3 +39,3 @@ import { _PdfName, _PdfDictionary } from './pdf-primitives'; | ||
getObject(cipherTransform?: _CipherTransform): any; | ||
getObject(objectNumber?: number, generationNumber?: number, isCipherTransform?: boolean): any; | ||
getObject(objectNumber?: number, generationNumber?: number | boolean, isCipherTransform?: boolean): any; | ||
findDiscreteDecodeInlineStreamEnd(stream: any): number; | ||
@@ -48,3 +48,3 @@ findDecodeInlineStreamEnd(stream: any): number; | ||
_computeMaxNumber(bytes: Uint8Array): number; | ||
makeStream(dictionary: _PdfDictionary, cipherTransform?: _CipherTransform): any; | ||
makeStream(dictionary: _PdfDictionary, cipherTransform?: _CipherTransform, makeFilter?: boolean): any; | ||
filter(stream: any, dictionary: _PdfDictionary, length: number): any; | ||
@@ -51,0 +51,0 @@ makeFilter(stream: any, name: string, maybeLength: number, params: any): any; |
@@ -498,8 +498,11 @@ import { _PdfCommand, _PdfName, _PdfDictionary, _isCommand, _PdfReference, _isName } from './pdf-primitives'; | ||
case 'BI': | ||
if (typeof arguement1 === 'number') { | ||
if (typeof arguement1 === 'number' && typeof arguement2 === 'number') { | ||
return this.makeInlineImage(arguement1, arguement2, arguement3); | ||
} | ||
else { | ||
else if (arguement1 instanceof _CipherTransform) { | ||
return this.makeInlineImage(arguement1); | ||
} | ||
else { | ||
return this.makeInlineImage(); | ||
} | ||
case '[': | ||
@@ -509,10 +512,13 @@ var array = []; // eslint-disable-line | ||
var entry = void 0; // eslint-disable-line | ||
if (typeof arguement1 === 'number') { | ||
if (typeof arguement1 === 'number' && typeof arguement2 === 'number') { | ||
cipherTransform = this._encryptor._createCipherTransform(arguement1, arguement2); | ||
entry = this.getObject(arguement1, arguement2, arguement3); | ||
} | ||
else { | ||
else if (arguement1 instanceof _CipherTransform) { | ||
cipherTransform = arguement1; | ||
entry = this.getObject(arguement1); | ||
} | ||
else { | ||
entry = this.getObject(arguement1); | ||
} | ||
if (array.length === 0 && _isName(entry, 'Indexed')) { | ||
@@ -549,12 +555,15 @@ this._isColorSpace = true; | ||
} | ||
if (typeof arguement1 === 'number') { | ||
if (typeof arguement1 === 'number' && typeof arguement2 === 'number') { | ||
cipherTransform = this._encryptor._createCipherTransform(arguement1, arguement2); | ||
} | ||
var value = void 0; // eslint-disable-line | ||
if (typeof arguement1 === 'number') { | ||
if (typeof arguement1 === 'number' && typeof arguement2 === 'number') { | ||
value = this.getObject(arguement1, arguement2, arguement3); | ||
} | ||
else { | ||
else if (arguement1 instanceof _CipherTransform) { | ||
value = this.getObject(arguement1); | ||
} | ||
else { | ||
value = this.getObject(); | ||
} | ||
value = _decodeText(value, this._isColorSpace, this._isPassword); | ||
@@ -575,6 +584,11 @@ this._isPassword = false; | ||
} | ||
else if (arguement3) { | ||
else if (arguement3 && typeof arguement2 === 'number') { | ||
cipherTransform = this._encryptor._createCipherTransform(arguement1, arguement2); | ||
} | ||
return this.makeStream(dictionary, cipherTransform); | ||
if (typeof arguement2 === 'boolean' && arguement2) { | ||
return this.makeStream(dictionary, cipherTransform, arguement2); | ||
} | ||
else { | ||
return this.makeStream(dictionary, cipherTransform); | ||
} | ||
} | ||
@@ -604,3 +618,3 @@ else { | ||
} | ||
else if (typeof arguement1 === 'number') { | ||
else if (typeof arguement1 === 'number' && typeof arguement2 === 'number') { | ||
cipherTransform = this._encryptor._createCipherTransform(arguement1, arguement2); | ||
@@ -866,3 +880,4 @@ } | ||
}; | ||
_PdfParser.prototype.makeStream = function (dictionary, cipherTransform) { | ||
_PdfParser.prototype.makeStream = function (dictionary, cipherTransform, makeFilter) { | ||
if (makeFilter === void 0) { makeFilter = false; } | ||
var lexicalOperator = this.lexicalOperator; | ||
@@ -905,6 +920,8 @@ var stream = lexicalOperator.stream; // eslint-disable-line | ||
stream = stream.makeSubStream(startPosition, length, dictionary); | ||
if (cipherTransform) { | ||
stream = cipherTransform.createStream(stream, length); | ||
if (!makeFilter) { | ||
if (cipherTransform) { | ||
stream = cipherTransform.createStream(stream, length); | ||
} | ||
stream = this.filter(stream, dictionary, length); | ||
} | ||
stream = this.filter(stream, dictionary, length); | ||
stream.dictionary = dictionary; | ||
@@ -911,0 +928,0 @@ return stream; |
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
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
28508432
219612
+ Added@syncfusion/ej2-base@28.1.33(transitive)
+ Added@syncfusion/ej2-compression@28.1.33(transitive)
+ Added@syncfusion/ej2-file-utils@28.1.33(transitive)
+ Added@syncfusion/ej2-icons@28.1.33(transitive)
- Removed@syncfusion/ej2-base@27.2.5(transitive)
- Removed@syncfusion/ej2-compression@27.2.2(transitive)
- Removed@syncfusion/ej2-file-utils@27.2.2(transitive)
- Removed@syncfusion/ej2-icons@27.2.2(transitive)