Skip to content

Commit ce47daa

Browse files
authored
Merge pull request #29 from kaferi/master
Update to v20.9
2 parents 58431a5 + 49f23b0 commit ce47daa

File tree

12 files changed

+39
-23
lines changed

12 files changed

+39
-23
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.8.0'
8+
s.version = '20.9.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,7 @@
20292029
"@executable_path/Frameworks",
20302030
"@loader_path/Frameworks",
20312031
);
2032-
MARKETING_VERSION = 20.8.0;
2032+
MARKETING_VERSION = 20.9.0;
20332033
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20342034
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20352035
SKIP_INSTALL = YES;
@@ -2058,7 +2058,7 @@
20582058
"@executable_path/Frameworks",
20592059
"@loader_path/Frameworks",
20602060
);
2061-
MARKETING_VERSION = 20.8.0;
2061+
MARKETING_VERSION = 20.9.0;
20622062
PRODUCT_BUNDLE_IDENTIFIER = com.aspose.AsposePdfCloud;
20632063
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
20642064
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.8.0")
54+
.addHeader(name: "x-aspose-client-version", value: "20.9.0")
5555
}
5656

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

AsposePdfCloud/APIs/PdfAPI.swift

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13324,16 +13324,17 @@ open class PdfAPI {
1332413324
- parameter annotations: (body) The array of annotation.
1332513325
- parameter storage: (query) The document storage. (optional)
1332613326
- parameter folder: (query) The document folder. (optional)
13327+
- parameter apply: (query) Apply redaction immediately after adding. (optional, default to false)
1332713328
- parameter completion: completion handler to receive the data and the error objects
1332813329
*/
13329-
open class func postPageRedactionAnnotations(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
13330+
open class func postPageRedactionAnnotations(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil, apply: Bool? = nil, completion: @escaping ((_ data: AsposeResponse?,_ error: Error?) -> Void)) {
1333013331
AuthAspose.checkAuth() {
1333113332
(authError) in
1333213333
guard authError == nil else {
1333313334
completion(nil, authError)
1333413335
return
1333513336
}
13336-
postPageRedactionAnnotationsWithRequestBuilder(name: name, pageNumber: pageNumber, annotations: annotations, storage: storage, folder: folder).execute { (response, error) -> Void in
13337+
postPageRedactionAnnotationsWithRequestBuilder(name: name, pageNumber: pageNumber, annotations: annotations, storage: storage, folder: folder, apply: apply).execute { (response, error) -> Void in
1333713338
completion(response?.body, error);
1333813339
}
1333913340
}
@@ -13356,10 +13357,11 @@ open class PdfAPI {
1335613357
- parameter annotations: (body) The array of annotation.
1335713358
- parameter storage: (query) The document storage. (optional)
1335813359
- parameter folder: (query) The document folder. (optional)
13360+
- parameter apply: (query) Apply redaction immediately after adding. (optional, default to false)
1335913361

1336013362
- returns: RequestBuilder<AsposeResponse>
1336113363
*/
13362-
open class func postPageRedactionAnnotationsWithRequestBuilder(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil) -> RequestBuilder<AsposeResponse> {
13364+
open class func postPageRedactionAnnotationsWithRequestBuilder(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil, apply: Bool? = nil) -> RequestBuilder<AsposeResponse> {
1336313365
var pathUrl = "/pdf/{name}/pages/{pageNumber}/annotations/redaction"
1336413366
pathUrl = pathUrl.replacingOccurrences(of: "{name}", with: "\(name)", options: .literal, range: nil)
1336513367
pathUrl = pathUrl.replacingOccurrences(of: "{pageNumber}", with: "\(pageNumber)", options: .literal, range: nil)
@@ -13369,7 +13371,8 @@ open class PdfAPI {
1336913371
let urlObj = NSURLComponents(string: URLString)
1337013372
urlObj?.queryItems = APIHelper.mapValuesToQueryItems(values:[
1337113373
"storage": storage,
13372-
"folder": folder
13374+
"folder": folder,
13375+
"apply": apply
1337313376
])
1337413377

1337513378

@@ -20266,16 +20269,17 @@ open class PdfAPI {
2026620269
- parameter annotation: (body) Annotation.
2026720270
- parameter storage: (query) The document storage. (optional)
2026820271
- parameter folder: (query) The document folder. (optional)
20272+
- parameter apply: (query) Apply redaction immediately after adding. (optional, default to false)
2026920273
- parameter completion: completion handler to receive the data and the error objects
2027020274
*/
20271-
open class func putRedactionAnnotation(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil, completion: @escaping ((_ data: RedactionAnnotationResponse?,_ error: Error?) -> Void)) {
20275+
open class func putRedactionAnnotation(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil, apply: Bool? = nil, completion: @escaping ((_ data: RedactionAnnotationResponse?,_ error: Error?) -> Void)) {
2027220276
AuthAspose.checkAuth() {
2027320277
(authError) in
2027420278
guard authError == nil else {
2027520279
completion(nil, authError)
2027620280
return
2027720281
}
20278-
putRedactionAnnotationWithRequestBuilder(name: name, annotationId: annotationId, annotation: annotation, storage: storage, folder: folder).execute { (response, error) -> Void in
20282+
putRedactionAnnotationWithRequestBuilder(name: name, annotationId: annotationId, annotation: annotation, storage: storage, folder: folder, apply: apply).execute { (response, error) -> Void in
2027920283
completion(response?.body, error);
2028020284
}
2028120285
}
@@ -20295,10 +20299,11 @@ open class PdfAPI {
2029520299
- parameter annotation: (body) Annotation.
2029620300
- parameter storage: (query) The document storage. (optional)
2029720301
- parameter folder: (query) The document folder. (optional)
20302+
- parameter apply: (query) Apply redaction immediately after adding. (optional, default to false)
2029820303

2029920304
- returns: RequestBuilder<RedactionAnnotationResponse>
2030020305
*/
20301-
open class func putRedactionAnnotationWithRequestBuilder(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil) -> RequestBuilder<RedactionAnnotationResponse> {
20306+
open class func putRedactionAnnotationWithRequestBuilder(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil, apply: Bool? = nil) -> RequestBuilder<RedactionAnnotationResponse> {
2030220307
var pathUrl = "/pdf/{name}/annotations/redaction/{annotationId}"
2030320308
pathUrl = pathUrl.replacingOccurrences(of: "{name}", with: "\(name)", options: .literal, range: nil)
2030420309
pathUrl = pathUrl.replacingOccurrences(of: "{annotationId}", with: "\(annotationId)", options: .literal, range: nil)
@@ -20308,7 +20313,8 @@ open class PdfAPI {
2030820313
let urlObj = NSURLComponents(string: URLString)
2030920314
urlObj?.queryItems = APIHelper.mapValuesToQueryItems(values:[
2031020315
"storage": storage,
20311-
"folder": folder
20316+
"folder": folder,
20317+
"apply": apply
2031220318
])
2031320319

2031420320

AsposePdfCloud/Models/SignatureCustomAppearance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import Foundation
2626

2727

28-
/** An abstract class which represents signature custon appearance object. */
28+
/** An abstract class which represents signature custom appearance object. */
2929

3030
open class SignatureCustomAppearance: Codable {
3131

AsposePdfCloud/Models/TextStyle.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ open class TextStyle: Codable {
3737
public var foregroundColor: Color?
3838
/** Sets background color of the text. */
3939
public var backgroundColor: Color?
40+
/** Sets path of font file in storage. */
41+
public var fontFile: String?
4042

4143

4244

43-
public init(fontSize: Double, font: String?, foregroundColor: Color?, backgroundColor: Color?) {
45+
public init(fontSize: Double, font: String?, foregroundColor: Color?, backgroundColor: Color?, fontFile: String?) {
4446
self.fontSize = fontSize
4547
self.font = font
4648
self.foregroundColor = foregroundColor
4749
self.backgroundColor = backgroundColor
50+
self.fontFile = fontFile
4851
}
4952

5053

@@ -58,6 +61,7 @@ open class TextStyle: Codable {
5861
try container.encodeIfPresent(font, forKey: "Font")
5962
try container.encodeIfPresent(foregroundColor, forKey: "ForegroundColor")
6063
try container.encodeIfPresent(backgroundColor, forKey: "BackgroundColor")
64+
try container.encodeIfPresent(fontFile, forKey: "FontFile")
6165
}
6266

6367
// Decodable protocol methods
@@ -69,6 +73,7 @@ open class TextStyle: Codable {
6973
font = try container.decodeIfPresent(String.self, forKey: "Font")
7074
foregroundColor = try container.decodeIfPresent(Color.self, forKey: "ForegroundColor")
7175
backgroundColor = try container.decodeIfPresent(Color.self, forKey: "BackgroundColor")
76+
fontFile = try container.decodeIfPresent(String.self, forKey: "FontFile")
7277
}
7378
}
7479

AsposePdfCloudTests/FreeTextAnnotationsTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ class FreeTextAnnotationsTests: AsposePdfCloudTests {
156156
fontSize: 12,
157157
font: "Arial",
158158
foregroundColor: Color(A: 0xFF, R: 0, G: 0xFF, B: 0),
159-
backgroundColor: Color(A: 0xFF, R: 0xFF, G: 0, B: 0)
159+
backgroundColor: Color(A: 0xFF, R: 0xFF, G: 0, B: 0),
160+
fontFile: nil
160161
)
161162
)
162163

@@ -208,7 +209,8 @@ class FreeTextAnnotationsTests: AsposePdfCloudTests {
208209
fontSize: 12,
209210
font: "Arial",
210211
foregroundColor: Color(A: 0xFF, R: 0, G: 0xFF, B: 0),
211-
backgroundColor: Color(A: 0xFF, R: 0xFF, G: 0, B: 0)
212+
backgroundColor: Color(A: 0xFF, R: 0xFF, G: 0, B: 0),
213+
fontFile: nil
212214
)
213215
)
214216

README.md

Lines changed: 3 additions & 3 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.8+.
20+
> CocoaPods 1.1+ is required to build AsposePdfCloud 20.9+.
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.8'
30+
pod 'AsposePdfCloud', '~> 20.9'
3131
end
3232
```
3333

@@ -652,7 +652,7 @@ Class | Description
652652
[**Segment**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/Segment.md) | Represents segment of Pdf text.
653653
[**ShapeType**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/ShapeType.md) | This enum represents shape type for the extracted images.
654654
[**Signature**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/Signature.md) | Represents signature.
655-
[**SignatureCustomAppearance**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/SignatureCustomAppearance.md) | An abstract class which represents signature custon appearance object.
655+
[**SignatureCustomAppearance**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/SignatureCustomAppearance.md) | An abstract class which represents signature custom appearance object.
656656
[**SignatureField**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/SignatureField.md) | Provides SignatureField.
657657
[**SignatureFieldResponse**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/SignatureFieldResponse.md) | Represents response containing single signature field object
658658
[**SignatureFields**](https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-swift/tree/master/docs/SignatureFields.md) | Object representing a list of signature fields.

docs/PdfApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5655,7 +5655,7 @@ Name | Type | Description | Notes
56555655

56565656
<a name="postPageRedactionAnnotations"></a>
56575657
## **postPageRedactionAnnotations**
5658-
> postPageRedactionAnnotations(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil, completion: @escaping ((_ data: AsposeResponse?, _ error: Error?) -> Void))
5658+
> postPageRedactionAnnotations(name: String, pageNumber: Int, annotations: [RedactionAnnotation], storage: String? = nil, folder: String? = nil, apply: Bool? = nil, completion: @escaping ((_ data: AsposeResponse?, _ error: Error?) -> Void))
56595659
56605660
Add document page redaction annotations.
56615661

@@ -5667,6 +5667,7 @@ Name | Type | Description | Notes
56675667
**annotations** | [**[RedactionAnnotation]**](RedactionAnnotation.md) | The array of annotation. |
56685668
**storage** | **String?** | The document storage. | [optional]
56695669
**folder** | **String?** | The document folder. | [optional]
5670+
**apply** | **Bool?** | Apply redaction immediately after adding. | [optional]
56705671

56715672
### Return type
56725673

@@ -8301,7 +8302,7 @@ Name | Type | Description | Notes
83018302

83028303
<a name="putRedactionAnnotation"></a>
83038304
## **putRedactionAnnotation**
8304-
> putRedactionAnnotation(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil, completion: @escaping ((_ data: RedactionAnnotationResponse?, _ error: Error?) -> Void))
8305+
> putRedactionAnnotation(name: String, annotationId: String, annotation: RedactionAnnotation, storage: String? = nil, folder: String? = nil, apply: Bool? = nil, completion: @escaping ((_ data: RedactionAnnotationResponse?, _ error: Error?) -> Void))
83058306
83068307
Replace document redaction annotation
83078308

@@ -8313,6 +8314,7 @@ Name | Type | Description | Notes
83138314
**annotation** | [**RedactionAnnotation**](RedactionAnnotation.md) | Annotation. |
83148315
**storage** | **String?** | The document storage. | [optional]
83158316
**folder** | **String?** | The document folder. | [optional]
8317+
**apply** | **Bool?** | Apply redaction immediately after adding. | [optional]
83168318

83178319
### Return type
83188320

docs/RedactionAnnotation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**fillColor** | [**Color?**](Color.md) | Gets or sets color to fill annotation. | [optional]
1010
**borderColor** | [**Color?**](Color.md) | Gets or sets color of border which is drawn when redaction is not active. | [optional]
1111
**overlayText** | **String?** | Text to print on redact annotation. | [optional]
12-
**repeat** | **Bool?** | If true overlay text will be repated on the annotation. | [optional]
12+
**repeat** | **Bool?** | If true overlay text will be repeated on the annotation. | [optional]
1313
**textAlignment** | [**HorizontalAlignment?**](HorizontalAlignment.md) | Gets or sets. Alignment of Overlay Text. | [optional]
1414
**color** | [**Color?**](Color.md) | Color of the annotation.<br />*Inherited from [Annotation](Annotation.md)* | [optional]
1515
**contents** | **String?** | Get the annotation content.<br />*Inherited from [Annotation](Annotation.md)* | [optional]

0 commit comments

Comments
 (0)