Skip to content

Commit d0982fa

Browse files
Merge pull request #24 from kaferi/master
Update to v20.4
2 parents 1c13ffb + 71e3f22 commit d0982fa

File tree

10 files changed

+151
-35
lines changed

10 files changed

+151
-35
lines changed

AsposePdfCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Pod::Spec.new do |s|
55
s.ios.deployment_target = '10.0'
66
s.osx.deployment_target = '10.11'
77
s.tvos.deployment_target = '9.0'
8-
s.version = '20.2.0'
8+
s.version = '20.4.0'
99
s.swift_version = '4.1'
1010
s.source = { :git => 'https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift.git', :tag => s.version.to_s }
1111
s.authors = 'Aspose PDF Cloud'

AsposePdfCloud.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
125EF5D9236C7F1F0013E682 /* RadioButtonField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D3236C7F1F0013E682 /* RadioButtonField.swift */; };
3535
125EF5DA236C7F1F0013E682 /* RadioButtonFieldsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D4236C7F1F0013E682 /* RadioButtonFieldsResponse.swift */; };
3636
125EF5DB236C7F1F0013E682 /* RadioButtonOptionField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D5236C7F1F0013E682 /* RadioButtonOptionField.swift */; };
37+
1278CC982444B50900AACF09 /* ImageFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1278CC972444B50900AACF09 /* ImageFragment.swift */; };
3738
128B4CEB238C25F500877D55 /* ComboBoxFieldsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 128B4CE7238C25F500877D55 /* ComboBoxFieldsResponse.swift */; };
3839
128B4CEC238C25F500877D55 /* ComboBoxFieldResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 128B4CE8238C25F500877D55 /* ComboBoxFieldResponse.swift */; };
3940
128B4CED238C25F500877D55 /* ComboBoxField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 128B4CE9238C25F500877D55 /* ComboBoxField.swift */; };
@@ -436,6 +437,7 @@
436437
125EF5D3236C7F1F0013E682 /* RadioButtonField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonField.swift; sourceTree = "<group>"; };
437438
125EF5D4236C7F1F0013E682 /* RadioButtonFieldsResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonFieldsResponse.swift; sourceTree = "<group>"; };
438439
125EF5D5236C7F1F0013E682 /* RadioButtonOptionField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonOptionField.swift; sourceTree = "<group>"; };
440+
1278CC972444B50900AACF09 /* ImageFragment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageFragment.swift; sourceTree = "<group>"; };
439441
128B4CE7238C25F500877D55 /* ComboBoxFieldsResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComboBoxFieldsResponse.swift; sourceTree = "<group>"; };
440442
128B4CE8238C25F500877D55 /* ComboBoxFieldResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComboBoxFieldResponse.swift; sourceTree = "<group>"; };
441443
128B4CE9238C25F500877D55 /* ComboBoxField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComboBoxField.swift; sourceTree = "<group>"; };
@@ -858,6 +860,7 @@
858860
1E668AE72174AFC2004218A8 /* Models */ = {
859861
isa = PBXGroup;
860862
children = (
863+
1278CC972444B50900AACF09 /* ImageFragment.swift */,
861864
1E668B072174AFF2004218A8 /* Annotation.swift */,
862865
1E668B1C2174AFF4004218A8 /* AnnotationFlags.swift */,
863866
1E668B0B2174AFF2004218A8 /* AnnotationInfo.swift */,
@@ -1676,6 +1679,7 @@
16761679
1E668B992174AFFC004218A8 /* LettersPositioningMethods.swift in Sources */,
16771680
1E9D85BB21B55DF50026DB97 /* CaretAnnotationResponse.swift in Sources */,
16781681
1E668BAA2174AFFC004218A8 /* Pages.swift in Sources */,
1682+
1278CC982444B50900AACF09 /* ImageFragment.swift in Sources */,
16791683
1E9A4AD522280BBB00BE3FA5 /* ScreenAnnotationResponse.swift in Sources */,
16801684
1E668BA92174AFFC004218A8 /* CompressionType.swift in Sources */,
16811685
1E7AF02122FC47C20017310A /* FileVersions.swift in Sources */,
@@ -2005,7 +2009,7 @@
20052009
"@executable_path/Frameworks",
20062010
"@loader_path/Frameworks",
20072011
);
2008-
MARKETING_VERSION = 20.2.0;
2012+
MARKETING_VERSION = 20.4.0;
20092013
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20102014
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20112015
SKIP_INSTALL = YES;
@@ -2034,7 +2038,7 @@
20342038
"@executable_path/Frameworks",
20352039
"@loader_path/Frameworks",
20362040
);
2037-
MARKETING_VERSION = 20.2.0;
2041+
MARKETING_VERSION = 20.4.0;
20382042
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20392043
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20402044
SKIP_INSTALL = YES;

AsposePdfCloud/APIs/PdfAPI.swift

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8373,19 +8373,18 @@ open class PdfAPI {
83738373
Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content
83748374

83758375
- parameter name: (path) The document name.
8376-
- parameter pagesCount: (query) Pages count. (optional)
83778376
- parameter folder: (query) The document folder. (optional)
83788377
- parameter storage: (query) The document storage. (optional)
83798378
- parameter completion: completion handler to receive the data and the error objects
83808379
*/
8381-
open class func getPdfInStorageToLaTeX(name: String, pagesCount: Int? = nil, folder: String? = nil, storage: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
8380+
open class func getPdfInStorageToLaTeX(name: String, folder: String? = nil, storage: String? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
83828381
AuthAspose.checkAuth() {
83838382
(authError) in
83848383
guard authError == nil else {
83858384
completion(nil, authError)
83868385
return
83878386
}
8388-
getPdfInStorageToLaTeXWithRequestBuilder(name: name, pagesCount: pagesCount, folder: folder, storage: storage).execute { (response, error) -> Void in
8387+
getPdfInStorageToLaTeXWithRequestBuilder(name: name, folder: folder, storage: storage).execute { (response, error) -> Void in
83898388
completion(response?.body, error);
83908389
}
83918390
}
@@ -8401,21 +8400,19 @@ open class PdfAPI {
84018400
- examples: [{output=none}]
84028401

84038402
- parameter name: (path) The document name.
8404-
- parameter pagesCount: (query) Pages count. (optional)
84058403
- parameter folder: (query) The document folder. (optional)
84068404
- parameter storage: (query) The document storage. (optional)
84078405

84088406
- returns: RequestBuilder<Data>
84098407
*/
8410-
open class func getPdfInStorageToLaTeXWithRequestBuilder(name: String, pagesCount: Int? = nil, folder: String? = nil, storage: String? = nil) -> RequestBuilder<Data> {
8408+
open class func getPdfInStorageToLaTeXWithRequestBuilder(name: String, folder: String? = nil, storage: String? = nil) -> RequestBuilder<Data> {
84118409
var pathUrl = "/pdf/{name}/convert/latex"
84128410
pathUrl = pathUrl.replacingOccurrences(of: "{name}", with: "\(name)", options: .literal, range: nil)
84138411
let URLString = AsposePdfCloudAPI.basePath + pathUrl
84148412
let parameters: [String:Any]? = nil
84158413

84168414
let urlObj = NSURLComponents(string: URLString)
84178415
urlObj?.queryItems = APIHelper.mapValuesToQueryItems(values:[
8418-
"pagesCount": pagesCount?.encodeToJSON(),
84198416
"folder": folder,
84208417
"storage": storage
84218418
])
@@ -17975,19 +17972,18 @@ open class PdfAPI {
1797517972
Converts PDF document (in request content) to LaTeX format and uploads resulting file to storage.
1797617973

1797717974
- parameter outPath: (query) Full resulting filename (ex. /folder1/folder2/result.tex)
17978-
- parameter pagesCount: (query) Pages count. (optional)
1797917975
- parameter storage: (query) The document storage. (optional)
1798017976
- parameter file: (form) A file to be converted. (optional)
1798117977
- parameter completion: completion handler to receive the data and the error objects
1798217978
*/
17983-
open class func putPdfInRequestToLaTeX(outPath: String, pagesCount: Int? = nil, storage: String? = nil, file: URL? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
17979+
open class func putPdfInRequestToLaTeX(outPath: String, storage: String? = nil, file: URL? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
1798417980
AuthAspose.checkAuth() {
1798517981
(authError) in
1798617982
guard authError == nil else {
1798717983
completion(nil, authError)
1798817984
return
1798917985
}
17990-
putPdfInRequestToLaTeXWithRequestBuilder(outPath: outPath, pagesCount: pagesCount, storage: storage, file: file).execute { (response, error) -> Void in
17986+
putPdfInRequestToLaTeXWithRequestBuilder(outPath: outPath, storage: storage, file: file).execute { (response, error) -> Void in
1799117987
completion(response?.body, error);
1799217988
}
1799317989
}
@@ -18006,13 +18002,12 @@ open class PdfAPI {
1800618002
}}]
1800718003

1800818004
- parameter outPath: (query) Full resulting filename (ex. /folder1/folder2/result.tex)
18009-
- parameter pagesCount: (query) Pages count. (optional)
1801018005
- parameter storage: (query) The document storage. (optional)
1801118006
- parameter file: (form) A file to be converted. (optional)
1801218007

1801318008
- returns: RequestBuilder<AsposeResponse>
1801418009
*/
18015-
open class func putPdfInRequestToLaTeXWithRequestBuilder(outPath: String, pagesCount: Int? = nil, storage: String? = nil, file: URL? = nil) -> RequestBuilder<AsposeResponse> {
18010+
open class func putPdfInRequestToLaTeXWithRequestBuilder(outPath: String, storage: String? = nil, file: URL? = nil) -> RequestBuilder<AsposeResponse> {
1801618011
let pathUrl = "/pdf/convert/latex"
1801718012
let URLString = AsposePdfCloudAPI.basePath + pathUrl
1801818013
let formParams: [String:Any?] = [
@@ -18025,7 +18020,6 @@ open class PdfAPI {
1802518020
let urlObj = NSURLComponents(string: URLString)
1802618021
urlObj?.queryItems = APIHelper.mapValuesToQueryItems(values:[
1802718022
"outPath": outPath,
18028-
"pagesCount": pagesCount?.encodeToJSON(),
1802918023
"storage": storage
1803018024
])
1803118025

@@ -18961,19 +18955,18 @@ open class PdfAPI {
1896118955

1896218956
- parameter name: (path) The document name.
1896318957
- parameter outPath: (query) Full resulting filename (ex. /folder1/folder2/result.tex)
18964-
- parameter pagesCount: (query) Pages count. (optional)
1896518958
- parameter folder: (query) The document folder. (optional)
1896618959
- parameter storage: (query) The document storage. (optional)
1896718960
- parameter completion: completion handler to receive the data and the error objects
1896818961
*/
18969-
open class func putPdfInStorageToLaTeX(name: String, outPath: String, pagesCount: Int? = nil, folder: String? = nil, storage: String? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
18962+
open class func putPdfInStorageToLaTeX(name: String, outPath: String, folder: String? = nil, storage: String? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
1897018963
AuthAspose.checkAuth() {
1897118964
(authError) in
1897218965
guard authError == nil else {
1897318966
completion(nil, authError)
1897418967
return
1897518968
}
18976-
putPdfInStorageToLaTeXWithRequestBuilder(name: name, outPath: outPath, pagesCount: pagesCount, folder: folder, storage: storage).execute { (response, error) -> Void in
18969+
putPdfInStorageToLaTeXWithRequestBuilder(name: name, outPath: outPath, folder: folder, storage: storage).execute { (response, error) -> Void in
1897718970
completion(response?.body, error);
1897818971
}
1897918972
}
@@ -18993,13 +18986,12 @@ open class PdfAPI {
1899318986

1899418987
- parameter name: (path) The document name.
1899518988
- parameter outPath: (query) Full resulting filename (ex. /folder1/folder2/result.tex)
18996-
- parameter pagesCount: (query) Pages count. (optional)
1899718989
- parameter folder: (query) The document folder. (optional)
1899818990
- parameter storage: (query) The document storage. (optional)
1899918991

1900018992
- returns: RequestBuilder<AsposeResponse>
1900118993
*/
19002-
open class func putPdfInStorageToLaTeXWithRequestBuilder(name: String, outPath: String, pagesCount: Int? = nil, folder: String? = nil, storage: String? = nil) -> RequestBuilder<AsposeResponse> {
18994+
open class func putPdfInStorageToLaTeXWithRequestBuilder(name: String, outPath: String, folder: String? = nil, storage: String? = nil) -> RequestBuilder<AsposeResponse> {
1900318995
var pathUrl = "/pdf/{name}/convert/latex"
1900418996
pathUrl = pathUrl.replacingOccurrences(of: "{name}", with: "\(name)", options: .literal, range: nil)
1900518997
let URLString = AsposePdfCloudAPI.basePath + pathUrl
@@ -19008,7 +19000,6 @@ open class PdfAPI {
1900819000
let urlObj = NSURLComponents(string: URLString)
1900919001
urlObj?.queryItems = APIHelper.mapValuesToQueryItems(values:[
1901019002
"outPath": outPath,
19011-
"pagesCount": pagesCount?.encodeToJSON(),
1901219003
"folder": folder,
1901319004
"storage": storage
1901419005
])

AsposePdfCloud/Models/Cell.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ open class Cell: Codable {
3939
public var backgroundColor: Color?
4040
/** Gets or sets the background image file. */
4141
public var backgroundImageFile: String?
42+
/** Gets or sets path of the background image file from storage. */
43+
public var backgroundImageStorageFile: String?
4244
/** Gets or sets the alignment. */
4345
public var alignment: HorizontalAlignment?
4446
/** Gets or sets the default cell text state. */
@@ -55,15 +57,20 @@ open class Cell: Codable {
5557
public var rowSpan: Int?
5658
/** Gets or sets the column width. */
5759
public var width: Double?
60+
/** Gets or sets Html fragment. */
61+
public var htmlFragment: String?
62+
/** Gets or sets ImageFragment list. */
63+
public var images: [ImageFragment]?
5864

5965

6066

61-
public init(isNoBorder: Bool?, margin: MarginInfo?, border: BorderInfo?, backgroundColor: Color?, backgroundImageFile: String?, alignment: HorizontalAlignment?, defaultCellTextState: TextState?, paragraphs: [TextRect]?, isWordWrapped: Bool?, verticalAlignment: VerticalAlignment?, colSpan: Int?, rowSpan: Int?, width: Double?) {
67+
public init(isNoBorder: Bool?, margin: MarginInfo?, border: BorderInfo?, backgroundColor: Color?, backgroundImageFile: String?, backgroundImageStorageFile: String?, alignment: HorizontalAlignment?, defaultCellTextState: TextState?, paragraphs: [TextRect]?, isWordWrapped: Bool?, verticalAlignment: VerticalAlignment?, colSpan: Int?, rowSpan: Int?, width: Double?, htmlFragment: String?, images: [ImageFragment]?) {
6268
self.isNoBorder = isNoBorder
6369
self.margin = margin
6470
self.border = border
6571
self.backgroundColor = backgroundColor
6672
self.backgroundImageFile = backgroundImageFile
73+
self.backgroundImageStorageFile = backgroundImageStorageFile
6774
self.alignment = alignment
6875
self.defaultCellTextState = defaultCellTextState
6976
self.paragraphs = paragraphs
@@ -72,6 +79,8 @@ open class Cell: Codable {
7279
self.colSpan = colSpan
7380
self.rowSpan = rowSpan
7481
self.width = width
82+
self.htmlFragment = htmlFragment
83+
self.images = images
7584
}
7685

7786

@@ -86,6 +95,7 @@ open class Cell: Codable {
8695
try container.encodeIfPresent(border, forKey: "Border")
8796
try container.encodeIfPresent(backgroundColor, forKey: "BackgroundColor")
8897
try container.encodeIfPresent(backgroundImageFile, forKey: "BackgroundImageFile")
98+
try container.encodeIfPresent(backgroundImageStorageFile, forKey: "BackgroundImageStorageFile")
8999
try container.encodeIfPresent(alignment, forKey: "Alignment")
90100
try container.encodeIfPresent(defaultCellTextState, forKey: "DefaultCellTextState")
91101
try container.encodeIfPresent(paragraphs, forKey: "Paragraphs")
@@ -94,6 +104,8 @@ open class Cell: Codable {
94104
try container.encodeIfPresent(colSpan, forKey: "ColSpan")
95105
try container.encodeIfPresent(rowSpan, forKey: "RowSpan")
96106
try container.encodeIfPresent(width, forKey: "Width")
107+
try container.encodeIfPresent(htmlFragment, forKey: "HtmlFragment")
108+
try container.encodeIfPresent(images, forKey: "Images")
97109
}
98110

99111
// Decodable protocol methods
@@ -106,6 +118,7 @@ open class Cell: Codable {
106118
border = try container.decodeIfPresent(BorderInfo.self, forKey: "Border")
107119
backgroundColor = try container.decodeIfPresent(Color.self, forKey: "BackgroundColor")
108120
backgroundImageFile = try container.decodeIfPresent(String.self, forKey: "BackgroundImageFile")
121+
backgroundImageStorageFile = try container.decodeIfPresent(String.self, forKey: "BackgroundImageStorageFile")
109122
alignment = try container.decodeIfPresent(HorizontalAlignment.self, forKey: "Alignment")
110123
defaultCellTextState = try container.decodeIfPresent(TextState.self, forKey: "DefaultCellTextState")
111124
paragraphs = try container.decodeIfPresent([TextRect].self, forKey: "Paragraphs")
@@ -114,6 +127,8 @@ open class Cell: Codable {
114127
colSpan = try container.decodeIfPresent(Int.self, forKey: "ColSpan")
115128
rowSpan = try container.decodeIfPresent(Int.self, forKey: "RowSpan")
116129
width = try container.decodeIfPresent(Double.self, forKey: "Width")
130+
htmlFragment = try container.decodeIfPresent(String.self, forKey: "HtmlFragment")
131+
images = try container.decodeIfPresent([ImageFragment].self, forKey: "Images")
117132
}
118133
}
119134

0 commit comments

Comments
 (0)