Skip to content

Commit 1026620

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 295e092 + f9d7327 commit 1026620

17 files changed

+1725
-46
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 24.9
20+
21+
- Added digital signature methds for DOC, DOCX, XPS, or ODT documents.
22+
- Added ReplaceBackslashWithYenSign property for XpsSaveOptions and HtmlSaveOptions.
23+
- Added DigitalSignature property for XpsSaveOptions.
24+
- Added UseSdtTagAsFormFieldName property for PdfSaveOptions.
25+
- Added MergeWholeDocument parameter to the MailMerge operations to update fields in whole document after executing of a mail merge with regions.
26+
27+
1928
## Enhancements in Version 24.8
2029

2130
- Added the support of OpenType standard. It is usefull for languages required advanced typography.
1.69 KB
Binary file not shown.
12.6 KB
Binary file not shown.
12 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposewordscloud",
3-
"version": "24.8.0",
3+
"version": "24.9.0",
44
"description": "Aspose.Words Cloud SDK for Node.js",
55
"homepage": "https://products.aspose.cloud/words/cloud",
66
"author": {

src/api.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3339,6 +3339,42 @@ export class WordsApi implements Encryptor {
33393339
return Promise.resolve(result);
33403340
}
33413341

3342+
/**
3343+
* Gets signatures from the document.
3344+
* @param requestObj contains request parameters
3345+
*/
3346+
public async getSignatures(requestObj: model.GetSignaturesRequest): Promise< model.WordsIncomingMessage< model.SignatureCollectionResponse > > {
3347+
if (requestObj === null || requestObj === undefined) {
3348+
throw new Error('Required parameter "request" was null or undefined when calling getSignatures.');
3349+
}
3350+
3351+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
3352+
3353+
const response = await invokeApiMethod(requestOptions, this.configuration);
3354+
const result = new model.WordsIncomingMessage< model.SignatureCollectionResponse >();
3355+
result.response = response;
3356+
result.body = requestObj.createResponse(response.body, response.headers);
3357+
return Promise.resolve(result);
3358+
}
3359+
3360+
/**
3361+
* Gets signatures from the document.
3362+
* @param requestObj contains request parameters
3363+
*/
3364+
public async getSignaturesOnline(requestObj: model.GetSignaturesOnlineRequest): Promise< model.WordsIncomingMessage< model.SignatureCollectionResponse > > {
3365+
if (requestObj === null || requestObj === undefined) {
3366+
throw new Error('Required parameter "request" was null or undefined when calling getSignaturesOnline.');
3367+
}
3368+
3369+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
3370+
3371+
const response = await invokeApiMethod(requestOptions, this.configuration);
3372+
const result = new model.WordsIncomingMessage< model.SignatureCollectionResponse >();
3373+
result.response = response;
3374+
result.body = requestObj.createResponse(response.body, response.headers);
3375+
return Promise.resolve(result);
3376+
}
3377+
33423378
/**
33433379
* Reads a StructuredDocumentTag (SDT) from the document node.
33443380
* @param requestObj contains request parameters
@@ -4765,6 +4801,42 @@ export class WordsApi implements Encryptor {
47654801
return Promise.resolve(result);
47664802
}
47674803

4804+
/**
4805+
* Removes all signatures of the document.
4806+
* @param requestObj contains request parameters
4807+
*/
4808+
public async removeAllSignatures(requestObj: model.RemoveAllSignaturesRequest): Promise< model.WordsIncomingMessage< model.SignatureCollectionResponse > > {
4809+
if (requestObj === null || requestObj === undefined) {
4810+
throw new Error('Required parameter "request" was null or undefined when calling removeAllSignatures.');
4811+
}
4812+
4813+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
4814+
4815+
const response = await invokeApiMethod(requestOptions, this.configuration);
4816+
const result = new model.WordsIncomingMessage< model.SignatureCollectionResponse >();
4817+
result.response = response;
4818+
result.body = requestObj.createResponse(response.body, response.headers);
4819+
return Promise.resolve(result);
4820+
}
4821+
4822+
/**
4823+
* Removes all signatures of the document.
4824+
* @param requestObj contains request parameters
4825+
*/
4826+
public async removeAllSignaturesOnline(requestObj: model.RemoveAllSignaturesOnlineRequest): Promise< model.WordsIncomingMessage< model.RemoveAllSignaturesOnlineResponse > > {
4827+
if (requestObj === null || requestObj === undefined) {
4828+
throw new Error('Required parameter "request" was null or undefined when calling removeAllSignaturesOnline.');
4829+
}
4830+
4831+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
4832+
4833+
const response = await invokeApiMethod(requestOptions, this.configuration);
4834+
const result = new model.WordsIncomingMessage< model.RemoveAllSignaturesOnlineResponse >();
4835+
result.response = response;
4836+
result.body = requestObj.createResponse(response.body, response.headers);
4837+
return Promise.resolve(result);
4838+
}
4839+
47684840
/**
47694841
* Removes a range from the document.
47704842
* @param requestObj contains request parameters
@@ -5214,6 +5286,42 @@ export class WordsApi implements Encryptor {
52145286
return Promise.resolve(result);
52155287
}
52165288

5289+
/**
5290+
* Signs the document with given certificate.
5291+
* @param requestObj contains request parameters
5292+
*/
5293+
public async signDocument(requestObj: model.SignDocumentRequest): Promise< model.WordsIncomingMessage< model.SignatureCollectionResponse > > {
5294+
if (requestObj === null || requestObj === undefined) {
5295+
throw new Error('Required parameter "request" was null or undefined when calling signDocument.');
5296+
}
5297+
5298+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
5299+
5300+
const response = await invokeApiMethod(requestOptions, this.configuration);
5301+
const result = new model.WordsIncomingMessage< model.SignatureCollectionResponse >();
5302+
result.response = response;
5303+
result.body = requestObj.createResponse(response.body, response.headers);
5304+
return Promise.resolve(result);
5305+
}
5306+
5307+
/**
5308+
* Signs the document with given certificate.
5309+
* @param requestObj contains request parameters
5310+
*/
5311+
public async signDocumentOnline(requestObj: model.SignDocumentOnlineRequest): Promise< model.WordsIncomingMessage< model.SignDocumentOnlineResponse > > {
5312+
if (requestObj === null || requestObj === undefined) {
5313+
throw new Error('Required parameter "request" was null or undefined when calling signDocumentOnline.');
5314+
}
5315+
5316+
const requestOptions = await requestObj.createRequestOptions(this.configuration, this);
5317+
5318+
const response = await invokeApiMethod(requestOptions, this.configuration);
5319+
const result = new model.WordsIncomingMessage< model.SignDocumentOnlineResponse >();
5320+
result.response = response;
5321+
result.body = requestObj.createResponse(response.body, response.headers);
5322+
return Promise.resolve(result);
5323+
}
5324+
52175325
/**
52185326
* Splits a document into parts and saves them in the specified format.
52195327
* @param requestObj contains request parameters

src/internal/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async function invokeApiMethodInternal(requestOptions: request.OptionsWithUri, c
131131
requestOptions.timeout = 1000 * confguration.timeout;
132132

133133
requestOptions.headers["x-aspose-client"] = "nodejs sdk";
134-
requestOptions.headers["x-aspose-client-version"] = "24.8";
134+
requestOptions.headers["x-aspose-client-version"] = "24.9";
135135
requestOptions.encoding = null;
136136

137137
requestOptions.uri = encodeURI(requestOptions.uri.toString());
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="digitalSignatureDetails.ts">
4+
* Copyright (c) 2024 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
import { ModelInterface } from './modelInterface';
30+
import { SignOptions } from './signOptions';
31+
32+
export const importsMapDigitalSignatureDetails = {
33+
SignOptions,
34+
};
35+
36+
/**
37+
* Container class for details of digital signature.
38+
*/
39+
export class DigitalSignatureDetails implements ModelInterface {
40+
/**
41+
* Attribute type map
42+
*/
43+
public static attributeTypeMap: Array<AttributeInfo> = [
44+
{
45+
name: "certificateFilename",
46+
baseName: "CertificateFilename",
47+
type: "string",
48+
},
49+
{
50+
name: "signOptions",
51+
baseName: "SignOptions",
52+
type: "SignOptions",
53+
}
54+
];
55+
56+
/**
57+
* Returns attribute type map
58+
*/
59+
public static getAttributeTypeMap() {
60+
return DigitalSignatureDetails.attributeTypeMap;
61+
}
62+
63+
/**
64+
* Gets or sets the certificate's filename using for signing.
65+
*/
66+
public certificateFilename: string;
67+
68+
/**
69+
* Gets or sets signing options.
70+
*/
71+
public signOptions: SignOptions;
72+
73+
public constructor(init?: Partial< DigitalSignatureDetails >) {
74+
Object.assign(this, init);
75+
}
76+
77+
public collectFilesContent(_resultFilesContent: Array<any>) {
78+
}
79+
80+
public validate() {
81+
82+
this.signOptions?.validate();
83+
84+
}
85+
}
86+

src/model/htmlSaveOptionsData.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ export class HtmlSaveOptionsData extends SaveOptionsData {
206206
baseName: "PrettyFormat",
207207
type: "boolean",
208208
},
209+
{
210+
name: "replaceBackslashWithYenSign",
211+
baseName: "ReplaceBackslashWithYenSign",
212+
type: "boolean",
213+
},
209214
{
210215
name: "resolveFontNames",
211216
baseName: "ResolveFontNames",
@@ -419,6 +424,15 @@ export class HtmlSaveOptionsData extends SaveOptionsData {
419424
*/
420425
public prettyFormat: boolean;
421426

427+
/**
428+
* Gets or sets the flag that indicates whether backslash characters should be replaced with yen signs.
429+
* Default value is false.
430+
* By default, Aspose.Words mimics MS Word's behavior and doesn't replace backslash characters with yen signs in
431+
* generated HTML documents. However, previous versions of Aspose.Words performed such replacements in certain
432+
* scenarios. This flag enables backward compatibility with previous versions of Aspose.Words.
433+
*/
434+
public replaceBackslashWithYenSign: boolean;
435+
422436
/**
423437
* Gets or sets a value indicating whether font family names used in the document are resolved and substituted according to FontSettings when being written into HTML-based formats.
424438
* The default value is false.

0 commit comments

Comments
 (0)