Skip to content

Commit c93e8b2

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 28d9da0 + 1462e5f commit c93e8b2

File tree

6 files changed

+140
-5
lines changed

6 files changed

+140
-5
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 25.4
17+
18+
- Added 'AttachmentsEmbeddingMode' property for PdfSaveOptionsData class.
19+
- Added 'UpdateAmbiguousTextFont' property for SaveOptionsData class.
20+
- Added 'Granularity' property for CompareOptions class.
21+
22+
1623
## Enhancements in Version 25.2
1724

1825
- Added 'IdPrefix' property for HtmlFixedSaveOptionsData and SvgSaveOptionsData class.
@@ -378,7 +385,7 @@ Add link to this repository as dependency to your Package.swift:
378385

379386
dependencies: [
380387
// Dependencies declare other packages that this package depends on.
381-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git", from: "25.3")
388+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git", from: "25.4")
382389
],
383390
targets: [
384391
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -396,7 +403,7 @@ targets: [
396403
Add link to git repository as dependency to your Podfile:
397404

398405
```ruby
399-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '25.3'
406+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '25.4'
400407
```
401408

402409
## Getting Started

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ public class Configuration : Codable {
187187

188188
// Returns SDK version for using in statistics headers
189189
public func getSdkVersion() -> String {
190-
return "25.3";
190+
return "25.4";
191191
}
192192
}

Sources/AsposeWordsCloud/Model/CompareOptions.swift

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ import Foundation
2929

3030
// DTO container with compare documents options.
3131
public class CompareOptions : Codable, WordsApiModel {
32+
// Gets or sets the option indicating whether changes are tracked by character or by word.
33+
public enum Granularity : String, Codable
34+
{
35+
// Enum value "charLevel"
36+
case charLevel = "CharLevel"
37+
38+
// Enum value "wordLevel"
39+
case wordLevel = "WordLevel"
40+
}
41+
3242
// Gets or sets the option that controls which document shall be used as a target during comparison.
3343
public enum Target : String, Codable
3444
{
@@ -51,6 +61,18 @@ public class CompareOptions : Codable, WordsApiModel {
5161
}
5262
}
5363

64+
// Field of granularity. DTO container with compare documents options.
65+
private var _granularity : Granularity? = nil;
66+
67+
public var granularity : Granularity? {
68+
get {
69+
return self._granularity;
70+
}
71+
set {
72+
self._granularity = newValue;
73+
}
74+
}
75+
5476
// Field of ignoreCaseChanges. DTO container with compare documents options.
5577
private var _ignoreCaseChanges : Bool? = nil;
5678

@@ -161,6 +183,7 @@ public class CompareOptions : Codable, WordsApiModel {
161183

162184
private enum CodingKeys: String, CodingKey {
163185
case acceptAllRevisionsBeforeComparison = "AcceptAllRevisionsBeforeComparison";
186+
case granularity = "Granularity";
164187
case ignoreCaseChanges = "IgnoreCaseChanges";
165188
case ignoreComments = "IgnoreComments";
166189
case ignoreFields = "IgnoreFields";
@@ -178,6 +201,10 @@ public class CompareOptions : Codable, WordsApiModel {
178201

179202
public required init(from json: [String: Any]) throws {
180203
self.acceptAllRevisionsBeforeComparison = json["AcceptAllRevisionsBeforeComparison"] as? Bool;
204+
if let raw_granularity = json["Granularity"] as? String {
205+
self.granularity = Granularity(rawValue: raw_granularity);
206+
}
207+
181208
self.ignoreCaseChanges = json["IgnoreCaseChanges"] as? Bool;
182209
self.ignoreComments = json["IgnoreComments"] as? Bool;
183210
self.ignoreFields = json["IgnoreFields"] as? Bool;
@@ -195,6 +222,7 @@ public class CompareOptions : Codable, WordsApiModel {
195222
public required init(from decoder: Decoder) throws {
196223
let container = try decoder.container(keyedBy: CodingKeys.self);
197224
self.acceptAllRevisionsBeforeComparison = try container.decodeIfPresent(Bool.self, forKey: .acceptAllRevisionsBeforeComparison);
225+
self.granularity = try container.decodeIfPresent(Granularity.self, forKey: .granularity);
198226
self.ignoreCaseChanges = try container.decodeIfPresent(Bool.self, forKey: .ignoreCaseChanges);
199227
self.ignoreComments = try container.decodeIfPresent(Bool.self, forKey: .ignoreComments);
200228
self.ignoreFields = try container.decodeIfPresent(Bool.self, forKey: .ignoreFields);
@@ -211,6 +239,9 @@ public class CompareOptions : Codable, WordsApiModel {
211239
if (self.acceptAllRevisionsBeforeComparison != nil) {
212240
try container.encode(self.acceptAllRevisionsBeforeComparison, forKey: .acceptAllRevisionsBeforeComparison);
213241
}
242+
if (self.granularity != nil) {
243+
try container.encode(self.granularity, forKey: .granularity);
244+
}
214245
if (self.ignoreCaseChanges != nil) {
215246
try container.encode(self.ignoreCaseChanges, forKey: .ignoreCaseChanges);
216247
}
@@ -258,6 +289,18 @@ public class CompareOptions : Codable, WordsApiModel {
258289
}
259290

260291

292+
// Sets granularity. Gets or sets the option indicating whether changes are tracked by character or by word.
293+
public func setGranularity(granularity : Granularity?) -> CompareOptions {
294+
self.granularity = granularity;
295+
return self;
296+
}
297+
298+
// Gets granularity. Gets or sets the option indicating whether changes are tracked by character or by word.
299+
public func getGranularity() -> Granularity? {
300+
return self.granularity;
301+
}
302+
303+
261304
// Sets ignoreCaseChanges. Gets or sets a value indicating whether documents comparison is case insensitive. By default comparison is case sensitive.
262305
public func setIgnoreCaseChanges(ignoreCaseChanges : Bool?) -> CompareOptions {
263306
self.ignoreCaseChanges = ignoreCaseChanges;

Sources/AsposeWordsCloud/Model/PageSetup.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,12 @@ public class PageSetup : LinkElement {
322322
// Enum value "number10Envelope"
323323
case number10Envelope = "Number10Envelope"
324324

325+
// Enum value "jisB4"
326+
case jisB4 = "JisB4"
327+
328+
// Enum value "jisB5"
329+
case jisB5 = "JisB5"
330+
325331
// Enum value "custom"
326332
case custom = "Custom"
327333
}

Sources/AsposeWordsCloud/Model/PdfSaveOptionsData.swift

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ import Foundation
2929

3030
// Container class for pdf save options.
3131
public class PdfSaveOptionsData : FixedPageSaveOptionsData {
32+
// Gets or sets a value determining how attachments are embedded to the PDF document.
33+
// Default value is None and attachments are not embedded.
34+
// PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files.
35+
// None value will be used automatically.
36+
public enum AttachmentsEmbeddingMode : String, Codable
37+
{
38+
// Enum value "_none"
39+
case _none = "None"
40+
41+
// Enum value "annotations"
42+
case annotations = "Annotations"
43+
44+
// Enum value "documentEmbeddedFiles"
45+
case documentEmbeddedFiles = "DocumentEmbeddedFiles"
46+
}
47+
3248
// Gets or sets the PDF standards compliance level for output documents.
3349
public enum Compliance : String, Codable
3450
{
@@ -178,6 +194,18 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
178194
case fitBox = "FitBox"
179195
}
180196

197+
// Field of attachmentsEmbeddingMode. Container class for pdf save options.
198+
private var _attachmentsEmbeddingMode : AttachmentsEmbeddingMode? = nil;
199+
200+
public var attachmentsEmbeddingMode : AttachmentsEmbeddingMode? {
201+
get {
202+
return self._attachmentsEmbeddingMode;
203+
}
204+
set {
205+
self._attachmentsEmbeddingMode = newValue;
206+
}
207+
}
208+
181209
// Field of cacheBackgroundGraphics. Container class for pdf save options.
182210
private var _cacheBackgroundGraphics : Bool? = nil;
183211

@@ -536,6 +564,7 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
536564
}
537565

538566
private enum CodingKeys: String, CodingKey {
567+
case attachmentsEmbeddingMode = "AttachmentsEmbeddingMode";
539568
case cacheBackgroundGraphics = "CacheBackgroundGraphics";
540569
case compliance = "Compliance";
541570
case createNoteHyperlinks = "CreateNoteHyperlinks";
@@ -574,6 +603,10 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
574603

575604
public required init(from json: [String: Any]) throws {
576605
try super.init(from: json);
606+
if let raw_attachmentsEmbeddingMode = json["AttachmentsEmbeddingMode"] as? String {
607+
self.attachmentsEmbeddingMode = AttachmentsEmbeddingMode(rawValue: raw_attachmentsEmbeddingMode);
608+
}
609+
577610
self.cacheBackgroundGraphics = json["CacheBackgroundGraphics"] as? Bool;
578611
if let raw_compliance = json["Compliance"] as? String {
579612
self.compliance = Compliance(rawValue: raw_compliance);
@@ -644,6 +677,7 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
644677
public required init(from decoder: Decoder) throws {
645678
try super.init(from: decoder);
646679
let container = try decoder.container(keyedBy: CodingKeys.self);
680+
self.attachmentsEmbeddingMode = try container.decodeIfPresent(AttachmentsEmbeddingMode.self, forKey: .attachmentsEmbeddingMode);
647681
self.cacheBackgroundGraphics = try container.decodeIfPresent(Bool.self, forKey: .cacheBackgroundGraphics);
648682
self.compliance = try container.decodeIfPresent(Compliance.self, forKey: .compliance);
649683
self.createNoteHyperlinks = try container.decodeIfPresent(Bool.self, forKey: .createNoteHyperlinks);
@@ -678,6 +712,9 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
678712
public override func encode(to encoder: Encoder) throws {
679713
try super.encode(to: encoder);
680714
var container = encoder.container(keyedBy: CodingKeys.self);
715+
if (self.attachmentsEmbeddingMode != nil) {
716+
try container.encode(self.attachmentsEmbeddingMode, forKey: .attachmentsEmbeddingMode);
717+
}
681718
if (self.cacheBackgroundGraphics != nil) {
682719
try container.encode(self.cacheBackgroundGraphics, forKey: .cacheBackgroundGraphics);
683720
}
@@ -779,6 +816,18 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
779816

780817
}
781818

819+
// Sets attachmentsEmbeddingMode. Gets or sets a value determining how attachments are embedded to the PDF document. Default value is None and attachments are not embedded. PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files. None value will be used automatically.
820+
public func setAttachmentsEmbeddingMode(attachmentsEmbeddingMode : AttachmentsEmbeddingMode?) -> PdfSaveOptionsData {
821+
self.attachmentsEmbeddingMode = attachmentsEmbeddingMode;
822+
return self;
823+
}
824+
825+
// Gets attachmentsEmbeddingMode. Gets or sets a value determining how attachments are embedded to the PDF document. Default value is None and attachments are not embedded. PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files. None value will be used automatically.
826+
public func getAttachmentsEmbeddingMode() -> AttachmentsEmbeddingMode? {
827+
return self.attachmentsEmbeddingMode;
828+
}
829+
830+
782831
// Sets cacheBackgroundGraphics. Gets or sets a value determining whether or not to cache graphics placed in document's background. Default value is true and background graphics are written to the PDF document as an xObject. When the value is false background graphics are not cached. Some shapes are not supported for caching(shapes with fields, bookmarks, HRefs). Document background graphic is various shapes, charts, images placed in the footer or header, well as background and border of a page.
783832
public func setCacheBackgroundGraphics(cacheBackgroundGraphics : Bool?) -> PdfSaveOptionsData {
784833
self.cacheBackgroundGraphics = cacheBackgroundGraphics;
@@ -864,14 +913,14 @@ public class PdfSaveOptionsData : FixedPageSaveOptionsData {
864913

865914

866915
// Sets embedAttachments. Gets or sets a value determining whether or not to embed attachments to the PDF document. Default value is false and attachments are not embedded. When the value is true attachments are embedded to the PDF document. Embedding attachments is not supported when saving to PDF/A and PDF/UA compliance. false value will be used automatically. Embedding attachments is not supported when encryption is enabled. false value will be used automatically.
867-
@available(*, deprecated, message: "This property will be removed in the future.")
916+
@available(*, deprecated, message: "Obsolete, please use AttachmentsEmbeddingMode instead.")
868917
public func setEmbedAttachments(embedAttachments : Bool?) -> PdfSaveOptionsData {
869918
self.embedAttachments = embedAttachments;
870919
return self;
871920
}
872921

873922
// Gets embedAttachments. Gets or sets a value determining whether or not to embed attachments to the PDF document. Default value is false and attachments are not embedded. When the value is true attachments are embedded to the PDF document. Embedding attachments is not supported when saving to PDF/A and PDF/UA compliance. false value will be used automatically. Embedding attachments is not supported when encryption is enabled. false value will be used automatically.
874-
@available(*, deprecated, message: "This property will be removed in the future.")
923+
@available(*, deprecated, message: "Obsolete, please use AttachmentsEmbeddingMode instead.")
875924
public func getEmbedAttachments() -> Bool? {
876925
return self.embedAttachments;
877926
}

Sources/AsposeWordsCloud/Model/SaveOptionsData.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,18 @@ public class SaveOptionsData : Codable, WordsApiModel {
163163
}
164164
}
165165

166+
// Field of updateAmbiguousTextFont. base container class for save options data.
167+
private var _updateAmbiguousTextFont : Bool? = nil;
168+
169+
public var updateAmbiguousTextFont : Bool? {
170+
get {
171+
return self._updateAmbiguousTextFont;
172+
}
173+
set {
174+
self._updateAmbiguousTextFont = newValue;
175+
}
176+
}
177+
166178
// Field of updateCreatedTimeProperty. base container class for save options data.
167179
private var _updateCreatedTimeProperty : Bool? = nil;
168180

@@ -240,6 +252,7 @@ public class SaveOptionsData : Codable, WordsApiModel {
240252
case dmlRenderingMode = "DmlRenderingMode";
241253
case fileName = "FileName";
242254
case imlRenderingMode = "ImlRenderingMode";
255+
case updateAmbiguousTextFont = "UpdateAmbiguousTextFont";
243256
case updateCreatedTimeProperty = "UpdateCreatedTimeProperty";
244257
case updateFields = "UpdateFields";
245258
case updateLastPrintedProperty = "UpdateLastPrintedProperty";
@@ -275,6 +288,7 @@ public class SaveOptionsData : Codable, WordsApiModel {
275288
self.imlRenderingMode = ImlRenderingMode(rawValue: raw_imlRenderingMode);
276289
}
277290

291+
self.updateAmbiguousTextFont = json["UpdateAmbiguousTextFont"] as? Bool;
278292
self.updateCreatedTimeProperty = json["UpdateCreatedTimeProperty"] as? Bool;
279293
self.updateFields = json["UpdateFields"] as? Bool;
280294
self.updateLastPrintedProperty = json["UpdateLastPrintedProperty"] as? Bool;
@@ -292,6 +306,7 @@ public class SaveOptionsData : Codable, WordsApiModel {
292306
self.dmlRenderingMode = try container.decodeIfPresent(DmlRenderingMode.self, forKey: .dmlRenderingMode);
293307
self.fileName = try container.decodeIfPresent(String.self, forKey: .fileName);
294308
self.imlRenderingMode = try container.decodeIfPresent(ImlRenderingMode.self, forKey: .imlRenderingMode);
309+
self.updateAmbiguousTextFont = try container.decodeIfPresent(Bool.self, forKey: .updateAmbiguousTextFont);
295310
self.updateCreatedTimeProperty = try container.decodeIfPresent(Bool.self, forKey: .updateCreatedTimeProperty);
296311
self.updateFields = try container.decodeIfPresent(Bool.self, forKey: .updateFields);
297312
self.updateLastPrintedProperty = try container.decodeIfPresent(Bool.self, forKey: .updateLastPrintedProperty);
@@ -323,6 +338,9 @@ public class SaveOptionsData : Codable, WordsApiModel {
323338
if (self.imlRenderingMode != nil) {
324339
try container.encode(self.imlRenderingMode, forKey: .imlRenderingMode);
325340
}
341+
if (self.updateAmbiguousTextFont != nil) {
342+
try container.encode(self.updateAmbiguousTextFont, forKey: .updateAmbiguousTextFont);
343+
}
326344
if (self.updateCreatedTimeProperty != nil) {
327345
try container.encode(self.updateCreatedTimeProperty, forKey: .updateCreatedTimeProperty);
328346
}
@@ -439,6 +457,18 @@ public class SaveOptionsData : Codable, WordsApiModel {
439457
}
440458

441459

460+
// Sets updateAmbiguousTextFont. Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
461+
public func setUpdateAmbiguousTextFont(updateAmbiguousTextFont : Bool?) -> SaveOptionsData {
462+
self.updateAmbiguousTextFont = updateAmbiguousTextFont;
463+
return self;
464+
}
465+
466+
// Gets updateAmbiguousTextFont. Gets or sets a value indicating whether the font attributes will be changed according to the character code being used.
467+
public func getUpdateAmbiguousTextFont() -> Bool? {
468+
return self.updateAmbiguousTextFont;
469+
}
470+
471+
442472
// Sets updateCreatedTimeProperty. Gets or sets a value determining whether the Aspose.Words.Properties.BuiltInDocumentProperties.CreatedTime property is updated before saving. Default value is false.
443473
public func setUpdateCreatedTimeProperty(updateCreatedTimeProperty : Bool?) -> SaveOptionsData {
444474
self.updateCreatedTimeProperty = updateCreatedTimeProperty;

0 commit comments

Comments
 (0)