Skip to content

Commit 58431a5

Browse files
authored
Merge pull request #28 from kaferi/master
Update to v20.8
2 parents e328980 + edbd102 commit 58431a5

File tree

13 files changed

+37
-22
lines changed

13 files changed

+37
-22
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.7.0'
8+
s.version = '20.8.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
@@ -35,6 +35,7 @@
3535
125EF5D9236C7F1F0013E682 /* RadioButtonField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D3236C7F1F0013E682 /* RadioButtonField.swift */; };
3636
125EF5DA236C7F1F0013E682 /* RadioButtonFieldsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D4236C7F1F0013E682 /* RadioButtonFieldsResponse.swift */; };
3737
125EF5DB236C7F1F0013E682 /* RadioButtonOptionField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125EF5D5236C7F1F0013E682 /* RadioButtonOptionField.swift */; };
38+
1270D81924F8F2BB00827FB9 /* Righteous-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1270D81824F8F2BB00827FB9 /* Righteous-Regular.ttf */; };
3839
1278CC982444B50900AACF09 /* ImageFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1278CC972444B50900AACF09 /* ImageFragment.swift */; };
3940
1288960024D068D8007FD10A /* ImageEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 128895FD24D068D8007FD10A /* ImageEncoding.swift */; };
4041
1288960124D068D8007FD10A /* ApiInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 128895FE24D068D8007FD10A /* ApiInfo.swift */; };
@@ -442,6 +443,7 @@
442443
125EF5D3236C7F1F0013E682 /* RadioButtonField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonField.swift; sourceTree = "<group>"; };
443444
125EF5D4236C7F1F0013E682 /* RadioButtonFieldsResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonFieldsResponse.swift; sourceTree = "<group>"; };
444445
125EF5D5236C7F1F0013E682 /* RadioButtonOptionField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RadioButtonOptionField.swift; sourceTree = "<group>"; };
446+
1270D81824F8F2BB00827FB9 /* Righteous-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Righteous-Regular.ttf"; sourceTree = "<group>"; };
445447
1278CC972444B50900AACF09 /* ImageFragment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageFragment.swift; sourceTree = "<group>"; };
446448
128895FD24D068D8007FD10A /* ImageEncoding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageEncoding.swift; sourceTree = "<group>"; };
447449
128895FE24D068D8007FD10A /* ApiInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiInfo.swift; sourceTree = "<group>"; };
@@ -1156,6 +1158,7 @@
11561158
1E668BBC2174B2E2004218A8 /* TestData */ = {
11571159
isa = PBXGroup;
11581160
children = (
1161+
1270D81824F8F2BB00827FB9 /* Righteous-Regular.ttf */,
11591162
12AE101B23F45BD6007D00A5 /* 4pagesPdfA.pdf */,
11601163
1E84B8C3233CF4F000057874 /* FormDataTextBox.pdf */,
11611164
1ED9932F231FC39700725F99 /* 33226.p12 */,
@@ -1437,6 +1440,7 @@
14371440
1E668BE32174B38A004218A8 /* butterfly.jpg in Resources */,
14381441
1E668BE42174B38A004218A8 /* rusdoc.pdf in Resources */,
14391442
1E668BEE2174B38A004218A8 /* Penguins.emf in Resources */,
1443+
1270D81924F8F2BB00827FB9 /* Righteous-Regular.ttf in Resources */,
14401444
1E668BE52174B38A004218A8 /* PdfWithXfaForm.pdf in Resources */,
14411445
1E668BE62174B38A004218A8 /* test1234.pfx in Resources */,
14421446
1E668BEB2174B38A004218A8 /* PdfWithImages2.pdf in Resources */,
@@ -2025,7 +2029,7 @@
20252029
"@executable_path/Frameworks",
20262030
"@loader_path/Frameworks",
20272031
);
2028-
MARKETING_VERSION = 20.7.0;
2032+
MARKETING_VERSION = 20.8.0;
20292033
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20302034
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20312035
SKIP_INSTALL = YES;
@@ -2054,7 +2058,7 @@
20542058
"@executable_path/Frameworks",
20552059
"@loader_path/Frameworks",
20562060
);
2057-
MARKETING_VERSION = 20.7.0;
2061+
MARKETING_VERSION = 20.8.0;
20582062
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20592063
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20602064
SKIP_INSTALL = YES;

AsposePdfCloud/APIs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ open class RequestBuilder<T> {
5151
//OAuth2.0
5252
_ = addHeader(name: "Authorization", value: "Bearer " + AsposePdfCloudAPI.accessToken!)
5353
.addHeader(name: "x-aspose-client", value: "swift sdk")
54-
.addHeader(name: "x-aspose-client-version", value: "20.7.0")
54+
.addHeader(name: "x-aspose-client-version", value: "20.8.0")
5555
}
5656

5757
open func addHeaders(_ aHeaders:[String:String]) {

AsposePdfCloud/Models/Paragraph.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ open class Paragraph: Codable {
3333
public var lineSpacing: LineSpacing?
3434
/** Word wrap mode. */
3535
public var wrapMode: WrapMode?
36-
/** Horizontal alignment for the text inside paragrph&#39;s rectangle. */
36+
/** Horizontal alignment for the text inside paragraph&#39;s rectangle. */
3737
public var horizontalAlignment: TextHorizontalAlignment?
3838
/** Left margin. */
3939
public var leftMargin: Double?
@@ -49,7 +49,7 @@ open class Paragraph: Codable {
4949
public var rotation: Double?
5050
/** Subsequent lines indent value. */
5151
public var subsequentLinesIndent: Double?
52-
/** Vertical alignment for the text inside paragrph&#39;s rectangle */
52+
/** Vertical alignment for the text inside paragraph&#39;s rectangle */
5353
public var verticalAlignment: VerticalAlignment?
5454
/** An array of text lines. */
5555
public var lines: [TextLine]

AsposePdfCloud/Models/TextState.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,26 @@ open class TextState: Codable {
3131

3232
/** Gets or sets font size of the text. */
3333
public var fontSize: Double
34-
/** Gets or sets font of the text. */
34+
/** Gets or sets font name of the text. */
3535
public var font: String?
3636
/** Gets or sets foreground color of the text. */
3737
public var foregroundColor: Color?
3838
/** Sets background color of the text. */
3939
public var backgroundColor: Color?
4040
/** Sets font style of the text. */
4141
public var fontStyle: FontStyles
42+
/** Sets path of font file in storage. */
43+
public var fontFile: String?
4244

4345

4446

45-
public init(fontSize: Double, font: String?, foregroundColor: Color?, backgroundColor: Color?, fontStyle: FontStyles) {
47+
public init(fontSize: Double, font: String?, foregroundColor: Color?, backgroundColor: Color?, fontStyle: FontStyles, fontFile: String?) {
4648
self.fontSize = fontSize
4749
self.font = font
4850
self.foregroundColor = foregroundColor
4951
self.backgroundColor = backgroundColor
5052
self.fontStyle = fontStyle
53+
self.fontFile = fontFile
5154
}
5255

5356

@@ -62,6 +65,7 @@ open class TextState: Codable {
6265
try container.encodeIfPresent(foregroundColor, forKey: "ForegroundColor")
6366
try container.encodeIfPresent(backgroundColor, forKey: "BackgroundColor")
6467
try container.encode(fontStyle, forKey: "FontStyle")
68+
try container.encodeIfPresent(fontFile, forKey: "FontFile")
6569
}
6670

6771
// Decodable protocol methods
@@ -74,6 +78,7 @@ open class TextState: Codable {
7478
foregroundColor = try container.decodeIfPresent(Color.self, forKey: "ForegroundColor")
7579
backgroundColor = try container.decodeIfPresent(Color.self, forKey: "BackgroundColor")
7680
fontStyle = try container.decode(FontStyles.self, forKey: "FontStyle")
81+
fontFile = try container.decodeIfPresent(String.self, forKey: "FontFile")
7782
}
7883
}
7984

AsposePdfCloudTests/HeaderFooterTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class HeaderFooterTests: AsposePdfCloudTests {
5454
font: "Arial Bold",
5555
foregroundColor: Color(A: 255, R: 255, G: 0, B: 0),
5656
backgroundColor: nil,
57-
fontStyle: FontStyles.regular),
57+
fontStyle: FontStyles.regular,
58+
fontFile: nil
59+
),
5860
leftMargin: 1,
5961
topMargin: 2,
6062
rightMargin: 3
@@ -105,7 +107,8 @@ class HeaderFooterTests: AsposePdfCloudTests {
105107
font: "Arial Bold",
106108
foregroundColor: Color(A: 255, R: 255, G: 0, B: 0),
107109
backgroundColor: nil,
108-
fontStyle: FontStyles.regular),
110+
fontStyle: FontStyles.regular,
111+
fontFile: nil),
109112
bottomMargin: 2,
110113
leftMargin: 1,
111114
rightMargin: 3

AsposePdfCloudTests/StampsTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ class StampsTests: AsposePdfCloudTests {
148148
zoom: 1,
149149
textAlignment: HorizontalAlignment.center,
150150
value: "Text Stamp",
151-
textState: TextState(fontSize: 14, font: nil, foregroundColor: nil, backgroundColor: nil, fontStyle: FontStyles.regular),
151+
textState: TextState(fontSize: 14, font: "Arial", foregroundColor: nil, backgroundColor: nil, fontStyle: FontStyles.regular,
152+
fontFile: nil),
152153
verticalAlignment: VerticalAlignment.center,
153154
bottomMargin: 1,
154155
leftMargin: 2,

AsposePdfCloudTests/TablesTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ class TablesTests: AsposePdfCloudTests {
288288
font: "Arial Bold",
289289
foregroundColor: Color(A: 255, R: 255, G: 0, B: 0),
290290
backgroundColor: nil,
291-
fontStyle: FontStyles.regular)
291+
fontStyle: FontStyles.regular,
292+
fontFile: nil)
292293

293294
let numOfCols = 5
294295
let numOfRows = 5

AsposePdfCloudTests/TextTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class TextTests: AsposePdfCloudTests {
8181

8282
let expectation = self.expectation(description: "testPutAddText")
8383
let fileName = "4pages.pdf"
84+
let fontFile = "Righteous-Regular.ttf"
8485
let pageNumber = 1
8586
let paragraph = Paragraph(
8687
lineSpacing: LineSpacing.fontSize,
@@ -102,19 +103,18 @@ class TextTests: AsposePdfCloudTests {
102103
value: "segment 1",
103104
textState: TextState(
104105
fontSize: 10,
105-
font: "Arial",
106+
font: "Righteous",
106107
foregroundColor: Color(A: 0x00, R: 0x00, G: 0xFF, B: 0x00),
107108
backgroundColor: Color(A: 0x00, R: 0xFF, G: 0x00, B: 0x00),
108-
fontStyle: FontStyles.bold
109+
fontStyle: FontStyles.regular,
110+
fontFile: self.tempFolder + "/" + fontFile
109111
)
110112
)
111113
]
112114
)
113115
]
114116
)
115-
116-
117-
uploadFile(name: fileName) {
117+
uploadFiles(names: [fileName, fontFile]) {
118118

119119
PdfAPI.putAddText(name: fileName, pageNumber: pageNumber, paragraph: paragraph, folder: self.tempFolder) {
120120
(response, error) in

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Edit assembly info of a PDF document online https://products.aspose.app/pdf/asse
1717
$ gem install cocoapods
1818
```
1919

20-
> CocoaPods 1.1+ is required to build AsposePdfCloud 20.7+.
20+
> CocoaPods 1.1+ is required to build AsposePdfCloud 20.8+.
2121
2222
To integrate AsposePdfCloud into your Xcode project using CocoaPods, specify it in your `Podfile`:
2323

@@ -27,7 +27,7 @@ platform :ios, '10.0'
2727
use_frameworks!
2828

2929
target '<Your Target Name>' do
30-
pod 'AsposePdfCloud', '~> 20.7'
30+
pod 'AsposePdfCloud', '~> 20.8'
3131
end
3232
```
3333

0 commit comments

Comments
 (0)