From 289f2e2df59aeb4f9e74afefb73def45e5e86f6a Mon Sep 17 00:00:00 2001 From: Dmitriy-Xawstov Date: Fri, 4 Jul 2025 02:12:48 +0300 Subject: [PATCH 1/2] PDFCLOUD-5009: added snippets rotate-resize-xrop --- UsesCases/ChangeLayout/changeLayoutHelper.js | 158 ++++++++++++++++++ UsesCases/ChangeLayout/changeLayoutLaunch.js | 26 +++ UsesCases/ChangeLayout/cropPage.js | 30 ++++ .../ChangeLayout/resizeDocumentAllPages.js | 50 ++++++ UsesCases/ChangeLayout/rotatePageStdAngle.js | 22 +++ 5 files changed, 286 insertions(+) create mode 100644 UsesCases/ChangeLayout/changeLayoutHelper.js create mode 100644 UsesCases/ChangeLayout/changeLayoutLaunch.js create mode 100644 UsesCases/ChangeLayout/cropPage.js create mode 100644 UsesCases/ChangeLayout/resizeDocumentAllPages.js create mode 100644 UsesCases/ChangeLayout/rotatePageStdAngle.js diff --git a/UsesCases/ChangeLayout/changeLayoutHelper.js b/UsesCases/ChangeLayout/changeLayoutHelper.js new file mode 100644 index 00000000..687c6e27 --- /dev/null +++ b/UsesCases/ChangeLayout/changeLayoutHelper.js @@ -0,0 +1,158 @@ +import credentials from "../../../Credentials/credentials.json" with { type: "json" }; // json-file in this format: { "id": "*****", "key": "*******" } +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { PdfApi } from "../../src/api/api.js"; +import { Rotation } from "../../src/models/rotation.js"; +import { DocumentConfig } from "../../src/models/documentConfig.js" +import { DocumentProperties } from "../../src/models/documentProperties.js" +import { DocumentProperty } from "../../src/models/documentProperty.js" +import { DisplayProperties } from "../../src/models/displayProperties.js" +import { DefaultPageConfig } from "../../src/models/defaultPageConfig.js" +import { ImageStamp } from "../../src/models/imageStamp.js" +import { HorizontalAlignment } from "../../src/models/horizontalAlignment.js" +import { VerticalAlignment } from "../../src/models/verticalAlignment.js" +import { HtmlDocumentType } from "../../src/models/htmlDocumentType.js"; +import { OutputFormat } from "../../src/models/outputFormat.js" + +export { configParams, pdfApi, PdfChangeLayoutHelper }; + +const configParams = { + LOCAL_FOLDER: "C:\\Samples\\", + PDF_DOCUMENT_NAME: "sample.pdf", + TEMP_FOLDER: 'TempPdfCloud', + + ROTATE_ANGLE: Rotation.on90, + ROTATE_PAGES: "1-3", + + CROP_PAGE_TEMP_FILE: "sammple_temp_file.png", + CROP_LOCAL_RESULT_DOCUMENT_NAME: "output_sample.pdf", + CROP_PAGE_NUMBER: 3, + CROP_PAGE_WIDTH: 0, + CROP_PAGE_HEIGHT: 0, + CROP_HEIGHT: 400, + CROP_WIDTH: 300, + CROP_LLX: 100, + CROP_LLY: 200, + + RESIZE_PDF_HTML_FILE: "sammple_temp_file.html", + RESIZE_RESULT_DOCUMENT_NAME:"output_sample.pdf", + RESIZE_PAGE_NUMBER: 2, + RESIZE_NEW_PAGE_WIDTH: 1000, + RESIZE_NEW_PAGE_HEIGHT: 3000, + +}; + +const pdfApi = new PdfApi(credentials.id, credentials.key); + +const PdfChangeLayoutHelper = { + async uploadFile (fileName, localFolder, tempFolder) { + const fileNamePath = path.join(localFolder, fileName); + const fileData = await fs.readFile(fileNamePath); + const storagePath = path.join(tempFolder, fileName); + await pdfApi.uploadFile(storagePath, fileData) + .then(() => console.log("File: '" + fileName +"' successfully uploaded.")); + }, + + async uploadDocument(document, localFolder, tempFolder) { + await this.uploadFile(document, localFolder, tempFolder) + }, + + async downloadResult(document, localFolder, tempFolder, prefix) { + const fileName = path.join(tempFolder, document); + const changedPdfData = await pdfApi.downloadFile(fileName); + const filePath = path.join(localFolder, prefix + document); + await fs.writeFile(filePath, changedPdfData.body); + console.log("Downloaded: " + filePath); + }, + + async getPageInfo (document, pageNumber, tempFolder) { + const resultPages = await pdfApi.getPage( document, pageNumber, { folder: tempFolder } ); + + if (resultPages.body.code == 200 && resultPages.body.page) { + this.showPages( [ resultPages.body.page ], "page"); + configParams.PAGE_HEIGHT = resultPages.body.page.rectangle.uRY - resultPages.body.page.rectangle.lLY; + configParams.PAGE_WIDTH = resultPages.body.page.rectangle.uRX - resultPages.body.page.rectangle.lLX; + return { + "width": configParams.PAGE_WIDTH, + "height": configParams.PAGE_HEIGHT + } + } + else { + console.error("Unexpected error : can't get pages!!!"); + return null; + } + }, + + showPages (pages, prefix) { + if (Array.isArray(pages) && pages.length > 0) + { + pages.forEach(function(page) { + console.log(prefix +" => id: '" + page.id + "', lLx: '" + page.rectangle.lLX + "', lLY: '" + page.rectangle.lLY + "', uRX: '" + page.rectangle.uRX + "', uRY: '" + page.rectangle.uRY + "'"); + }); + } + else + console.error("showPages() error: array of pages is empty!") + }, + + async extractPdfPage(document, pageNumber, width, height, localFolder, tempFolder) { + const response = await pdfApi.getPageConvertToPng(document, pageNumber, Math.trunc(width), Math.trunc(height), tempFolder); + if (response.response.status != 200) + { + console.error("extractPdfPage(): Faild to convert page to image!"); + return null; + } + const filePath = path.join(localFolder, document + ".png"); + await fs.writeFile(filePath, response.body); + + const imageFile = document + ".png"; + const imagePath = localFolder; + + await this.uploadFile(imageFile, localFolder, tempFolder); + + console.log("Page #" + pageNumber + " extracted as image."); + return imageFile; + }, + + async createPdfDocument(document, width, height, tempFolder) { + const pdfConfig = new DocumentConfig(); + pdfConfig.pagesCount = 1; + + pdfConfig.displayProperties = new DisplayProperties(); + pdfConfig.displayProperties.centerWindow = true; + pdfConfig.displayProperties.hideMenuBar = true; + + pdfConfig.documentProperties = new DocumentProperties(); + const docProperty = new DocumentProperty(); + docProperty.builtIn = false; + docProperty.name = "prop1"; + docProperty.value = "Val1"; + + pdfConfig.documentProperties.list = [ docProperty ]; + + pdfConfig.defaultPageConfig = new DefaultPageConfig(); + pdfConfig.defaultPageConfig.height = height; + pdfConfig.defaultPageConfig.width = width; + + const response = await pdfApi.postCreateDocument(document, pdfConfig, null, tempFolder); + console.log("Document #" + document + " created.") + return response; + }, + + async insertPageAsImage(document, imageFileValue, llx, lly, tempFolder) { + const stamp = new ImageStamp(); + stamp.background = true; + stamp.horizontalAlignment = HorizontalAlignment.None; + stamp.verticalAlignment = VerticalAlignment.None; + stamp.opacity = 1; + stamp.rotate = Rotation.None; + stamp.rotateAngle = 0; + stamp.xIndent = -llx; + stamp.yIndent = -lly; + stamp.zoom = 1; + stamp.fileName = configParams.TEMP_FOLDER + '/' + imageFileValue; + + const response = await pdfApi.postPageImageStamps(document, 1, [stamp], null, tempFolder); + console.log("Image iserted into '" + document + "document on page #1"); + return response; + }, +}; \ No newline at end of file diff --git a/UsesCases/ChangeLayout/changeLayoutLaunch.js b/UsesCases/ChangeLayout/changeLayoutLaunch.js new file mode 100644 index 00000000..01c173df --- /dev/null +++ b/UsesCases/ChangeLayout/changeLayoutLaunch.js @@ -0,0 +1,26 @@ +import { configParams } from "./changeLayoutHelper.js"; +import { PdfRotatePages } from "./rotatePageStdAngle.js" +import { PdfCropPage } from "./cropPage.js"; +import { PdfResizePages } from "./resizeDocumentAllPages.js"; + +async function main() { + try { + + await PdfRotatePages.rotate(configParams.PDF_DOCUMENT_NAME, + configParams.ROTATE_ANGLE, configParams.ROTATE_PAGES, + configParams.LOCAL_FOLDER, configParams.TEMP_FOLDER); + + await PdfCropPage.cropPage(configParams.PDF_DOCUMENT_NAME, + configParams.CROP_PAGE_NUMBER, configParams.CROP_LLX, configParams.CROP_LLY, configParams.CROP_WIDTH, configParams.CROP_HEIGHT, configParams.CROP_LOCAL_RESULT_DOCUMENT_NAME, + configParams.LOCAL_FOLDER, configParams.TEMP_FOLDER); + + await PdfResizePages.resizeAllPages(configParams.PDF_DOCUMENT_NAME, + configParams.RESIZE_PDF_HTML_FILE, configParams.RESIZE_NEW_PAGE_WIDTH, configParams.RESIZE_NEW_PAGE_HEIGHT, configParams.RESIZE_RESULT_DOCUMENT_NAME, + configParams.LOCAL_FOLDER, configParams.TEMP_FOLDER); + + } catch (error) { + console.error("Error:", error.message); + } +} + +await main(); \ No newline at end of file diff --git a/UsesCases/ChangeLayout/cropPage.js b/UsesCases/ChangeLayout/cropPage.js new file mode 100644 index 00000000..421bf040 --- /dev/null +++ b/UsesCases/ChangeLayout/cropPage.js @@ -0,0 +1,30 @@ +import { PdfChangeLayoutHelper, pdfApi } from "./changeLayoutHelper.js"; + +export { PdfCropPage }; + +const PdfCropPage = { + async cropPage(document, pageNumber, llx, lly, width, height, outputDocument, localFolder, tempFolder) { + if ( pdfApi ) { + await PdfChangeLayoutHelper.uploadDocument(document, localFolder, tempFolder); + + var pageSie = await PdfChangeLayoutHelper.getPageInfo(document, pageNumber, tempFolder); + + const imageFile = await PdfChangeLayoutHelper.extractPdfPage(document, pageNumber, pageSie.width, pageSie.height, localFolder, tempFolder); + const newPdf = await PdfChangeLayoutHelper.createPdfDocument(outputDocument, width, height, tempFolder); + if (newPdf.body.code != 200) { + console.error("cropPage(): Failed to create new PDF document!"); + return; + } + + const response = await PdfChangeLayoutHelper.insertPageAsImage(outputDocument, imageFile, llx, lly, tempFolder); + + if (response.body.code == 200) { + console.log("cropPage(): Page successfully cropped."); + await PdfChangeLayoutHelper.downloadResult(outputDocument, localFolder, tempFolder, "cropped_") + } + else + console.error("cropPage(): Can't crop pdf document page!") + } + + }, +}; \ No newline at end of file diff --git a/UsesCases/ChangeLayout/resizeDocumentAllPages.js b/UsesCases/ChangeLayout/resizeDocumentAllPages.js new file mode 100644 index 00000000..3bafb11b --- /dev/null +++ b/UsesCases/ChangeLayout/resizeDocumentAllPages.js @@ -0,0 +1,50 @@ +import { PdfChangeLayoutHelper, pdfApi } from "./changeLayoutHelper.js"; +import path from 'node:path'; +import { HtmlDocumentType } from "../../src/models/htmlDocumentType.js"; +import { OutputFormat } from "../../src/models/outputFormat.js" + +export { PdfResizePages } + +const PdfResizePages = { + async resizeAllPages(document, htmlTempDoc, width, height, outputDocument, localFolder, tempFolder) { + await PdfChangeLayoutHelper.uploadDocument(document, localFolder, tempFolder) + + const htmlTempPath = path.join(tempFolder, htmlTempDoc); + + const html_response = await pdfApi.putPdfInStorageToHtml( + document, + htmlTempPath, + null, null, null, null, + HtmlDocumentType.Xhtml, + null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, + tempFolder, + null, null, + OutputFormat.Folder); + + if (html_response.body.code != 200) { + console.error("resizePages(): Can't convert pdf to html!"); + return; + } + else + console.log("resizePages(): temporary file '" + htmlTempDoc + "' succesfully creaated.") + + const response = await pdfApi.putHtmlInStorageToPdf( + outputDocument, + htmlTempPath, + htmlTempDoc, + height, + width, + null, null, null, null, null, + tempFolder, + null); + + if (response.body.code == 200) { + console.log("resizePages(): Pages successfully resized."); + await PdfChangeLayoutHelper.downloadResult(outputDocument, localFolder, tempFolder, "resized_doc_"); + } + else + console.log("resizePages(): Can't convert html to pdf!") + + }, + +}; \ No newline at end of file diff --git a/UsesCases/ChangeLayout/rotatePageStdAngle.js b/UsesCases/ChangeLayout/rotatePageStdAngle.js new file mode 100644 index 00000000..64a0229b --- /dev/null +++ b/UsesCases/ChangeLayout/rotatePageStdAngle.js @@ -0,0 +1,22 @@ +import { PdfChangeLayoutHelper, pdfApi } from "./changeLayoutHelper.js"; + +export { PdfRotatePages }; + +const PdfRotatePages = { + async rotate(document, angle, pages, localFolder, tempFolder) { + if ( pdfApi) { + await PdfChangeLayoutHelper.uploadDocument(document, localFolder, tempFolder); + + const response = await pdfApi.postDocumentPagesRotate( + document, angle, pages, null, tempFolder); + + if (response.body.code == 200) { + console.log("rotatePages(): Page successfully rotated."); + await PdfChangeLayoutHelper.downloadResult(document, localFolder, tempFolder, "rotated_output_"); + } + else + console.error("rotatePages(): Can't rotate pdf document pages!") + } + + }, +}; \ No newline at end of file From f888b3ed0b3e19d98e44d8cc84123bb00875903e Mon Sep 17 00:00:00 2001 From: Kirill Novinskiy Date: Tue, 22 Jul 2025 14:58:12 +0000 Subject: [PATCH 2/2] update to 25.7.0 --- README.md | 7 +++- docs/SignatureCustomAppearance.md | 7 +++- docs/SignatureSubjectNameElements.md | 16 ++++++++ package-lock.json | 4 +- package.json | 2 +- src/api/api.ts | 1 + src/models/signatureCustomAppearance.ts | 48 ++++++++++++++++++++++ src/models/signatureSubjectNameElements.ts | 30 ++++++++++++++ src/objectSerializer.ts | 2 + src/requestHelper.ts | 2 +- 10 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 docs/SignatureSubjectNameElements.md create mode 100644 src/models/signatureSubjectNameElements.ts diff --git a/README.md b/README.md index c18b33f4..0fb0db98 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,13 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text ## Read PDF Formats MHT, PCL, PS, XSLFO, MD -## Enhancements in Version 25.6 -- Develop Rotate Document Pages method. +## Enhancements in Version 25.7 +- Add possibility to hide subject field in signature appearance. - A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET. +## Bugs fixed in Version 25.7 +- PostDeleteStamps removing stamps from PDF page is incorrect. + ## Installation ### NPM diff --git a/docs/SignatureCustomAppearance.md b/docs/SignatureCustomAppearance.md index baad3f44..c189b421 100644 --- a/docs/SignatureCustomAppearance.md +++ b/docs/SignatureCustomAppearance.md @@ -5,7 +5,8 @@ An abstract class which represents signature custom appearance object. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **fontFamilyName** | **string** | Gets/sets font family name. It should be existed in the document. Default value: Arial. | [optional] -**fontSize** | **number** | Gets/sets font size. Default value: 10. | +**fontSize** | **number** | Gets/sets font size. Default value: 10. | [optional] +**rotation** | [**Rotation**](Rotation.md) | Gets or sets signature rotation. | **showContactInfo** | **boolean** | Gets/sets contact info visibility. Default value: true. | **showReason** | **boolean** | Gets/sets reason visibility. Default value: true. | **showLocation** | **boolean** | Gets/sets location visibility. Default value: true. | @@ -16,6 +17,10 @@ Name | Type | Description | Notes **dateSignedAtLabel** | **string** | Gets/sets date signed label. Default value: "Date". | [optional] **dateTimeLocalFormat** | **string** | Gets/sets datetime local format. Default value: "yyyy.MM.dd HH:mm:ss zzz". | [optional] **dateTimeFormat** | **string** | Gets/sets datetime format. Default value: "yyyy.MM.dd HH:mm:ss". | [optional] +**backgroundColor** | [**Color**](Color.md) | Gets/sets background color. | [optional] +**foregroundColor** | [**Color**](Color.md) | Gets/sets foreground color. | [optional] +**useDigitalSubjectFormat** | **boolean** | Gets/sets subject format usage. | +**digitalSubjectFormat** | [**Array<SignatureSubjectNameElements>**](SignatureSubjectNameElements.md) | Gets/sets subject format. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[View Source]](../src/models/signatureCustomAppearance.ts) diff --git a/docs/SignatureSubjectNameElements.md b/docs/SignatureSubjectNameElements.md new file mode 100644 index 00000000..9e58469f --- /dev/null +++ b/docs/SignatureSubjectNameElements.md @@ -0,0 +1,16 @@ +# SignatureSubjectNameElements +Represents an enumeration of available SubjectNameElements. + +## Enum +Name | Type | Value | Description +------------ | ------------- | ------------- | ------------- +**C** | **string** | 'C' | Common Name. +**CN** | **string** | 'CN' | Common Name. +**E** | **string** | 'E' | Email. +**L** | **string** | 'L' | Locality. +**O** | **string** | 'O' | Organization. +**OU** | **string** | 'OU' | Organizational Unit. +**S** | **string** | 'S' | State or Province Name. + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[View Source]](../src/models/signatureSubjectNameElements.ts) + diff --git a/package-lock.json b/package-lock.json index c016e22e..3b444d87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "asposepdfcloud", - "version": "25.6.0", + "version": "25.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "asposepdfcloud", - "version": "25.6.0", + "version": "25.7.0", "license": "MIT", "dependencies": { "@types/bluebird": "*", diff --git a/package.json b/package.json index 6eb536c3..8fca2e2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "asposepdfcloud", - "version": "25.6.0", + "version": "25.7.0", "description": "Aspose.PDF Cloud is a REST API for creating and editing PDF files. Most popular features proposed by Aspose.PDF Cloud: PDF to Word, Convert PDF to Image, Merge PDF, Split PDF, Add Images to PDF, Rotate PDF. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.PDF Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.PDF Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.", "homepage": "https://products.aspose.cloud/pdf/cloud", "author": { diff --git a/src/api/api.ts b/src/api/api.ts index 2928d0b3..948f40c6 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -111,6 +111,7 @@ import { Segment } from "../models/segment"; import { ShapeType } from "../models/shapeType"; import { Signature } from "../models/signature"; import { SignatureCustomAppearance } from "../models/signatureCustomAppearance"; +import { SignatureSubjectNameElements } from "../models/signatureSubjectNameElements"; import { SignatureType } from "../models/signatureType"; import { SoundEncoding } from "../models/soundEncoding"; import { SoundIcon } from "../models/soundIcon"; diff --git a/src/models/signatureCustomAppearance.ts b/src/models/signatureCustomAppearance.ts index 4bdb9873..3e33a67e 100644 --- a/src/models/signatureCustomAppearance.ts +++ b/src/models/signatureCustomAppearance.ts @@ -19,6 +19,9 @@ * */ +import { SignatureSubjectNameElements } from "./signatureSubjectNameElements"; +import { Color } from "./color"; +import { Rotation } from "./rotation"; /** * An abstract class which represents signature custom appearance object. @@ -33,6 +36,10 @@ export class SignatureCustomAppearance { */ 'fontSize': number; /** + * Gets or sets signature rotation. + */ + 'rotation': Rotation; + /** * Gets/sets contact info visibility. Default value: true. */ 'showContactInfo': boolean; @@ -72,6 +79,22 @@ export class SignatureCustomAppearance { * Gets/sets datetime format. Default value: \"yyyy.MM.dd HH:mm:ss\". */ 'dateTimeFormat': string; + /** + * Gets/sets background color. + */ + 'backgroundColor': Color; + /** + * Gets/sets foreground color. + */ + 'foregroundColor': Color; + /** + * Gets/sets subject format usage. + */ + 'useDigitalSubjectFormat': boolean; + /** + * Gets/sets subject format. + */ + 'digitalSubjectFormat': Array; static discriminator = undefined; @@ -86,6 +109,11 @@ export class SignatureCustomAppearance { "baseName": "FontSize", "type": "number" }, + { + "name": "rotation", + "baseName": "Rotation", + "type": "Rotation" + }, { "name": "showContactInfo", "baseName": "ShowContactInfo", @@ -135,6 +163,26 @@ export class SignatureCustomAppearance { "name": "dateTimeFormat", "baseName": "DateTimeFormat", "type": "string" + }, + { + "name": "backgroundColor", + "baseName": "BackgroundColor", + "type": "Color" + }, + { + "name": "foregroundColor", + "baseName": "ForegroundColor", + "type": "Color" + }, + { + "name": "useDigitalSubjectFormat", + "baseName": "UseDigitalSubjectFormat", + "type": "boolean" + }, + { + "name": "digitalSubjectFormat", + "baseName": "DigitalSubjectFormat", + "type": "Array" } ]; static getAttributeTypeMap() { diff --git a/src/models/signatureSubjectNameElements.ts b/src/models/signatureSubjectNameElements.ts new file mode 100644 index 00000000..4b01d0ea --- /dev/null +++ b/src/models/signatureSubjectNameElements.ts @@ -0,0 +1,30 @@ + /** + * + * Copyright (c) 2025 Aspose.PDF Cloud + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +export enum SignatureSubjectNameElements { + CN = 'CN', + O = 'O', + L = 'L', + OU = 'OU', + S = 'S', + C = 'C', + E = 'E', +} diff --git a/src/objectSerializer.ts b/src/objectSerializer.ts index 0c9789c0..14b9f6c6 100644 --- a/src/objectSerializer.ts +++ b/src/objectSerializer.ts @@ -111,6 +111,7 @@ import { Segment } from "./models/segment"; import { ShapeType } from "./models/shapeType"; import { Signature } from "./models/signature"; import { SignatureCustomAppearance } from "./models/signatureCustomAppearance"; +import { SignatureSubjectNameElements } from "./models/signatureSubjectNameElements"; import { SignatureType } from "./models/signatureType"; import { SoundEncoding } from "./models/soundEncoding"; import { SoundIcon } from "./models/soundIcon"; @@ -362,6 +363,7 @@ let enumsMap: {[index: string]: any} = { "RasterImagesSavingModes": RasterImagesSavingModes, "Rotation": Rotation, "ShapeType": ShapeType, + "SignatureSubjectNameElements": SignatureSubjectNameElements, "SignatureType": SignatureType, "SoundEncoding": SoundEncoding, "SoundIcon": SoundIcon, diff --git a/src/requestHelper.ts b/src/requestHelper.ts index 4837b6ff..fb60afdb 100644 --- a/src/requestHelper.ts +++ b/src/requestHelper.ts @@ -95,7 +95,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura //headers sa.set("User-Agent", "pdf nodejs sdk"); sa.set("x-aspose-client", "nodejs sdk"); - sa.set("x-aspose-client-version", "25.6.0"); + sa.set("x-aspose-client-version", "25.7.0"); if (!requestOptions.headers) { requestOptions.headers = {};