Skip to content

Commit 928d77a

Browse files
committed
Update to v20.1
1 parent 48a4815 commit 928d77a

File tree

4 files changed

+331
-1
lines changed

4 files changed

+331
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 19.12.0
3+
- Package version: 20.1.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of PDF documents in the cloud.
66

@@ -292,6 +292,7 @@ Class | Method | HTTP request | Description
292292
*PdfApi* | [**PostRadioButtonFields**](docs/PdfApi.md#postradiobuttonfields) | **Post** /pdf/{name}/fields/radiobutton | Add document RadioButton fields.
293293
*PdfApi* | [**PostSignDocument**](docs/PdfApi.md#postsigndocument) | **Post** /pdf/{name}/sign | Sign document.
294294
*PdfApi* | [**PostSignPage**](docs/PdfApi.md#postsignpage) | **Post** /pdf/{name}/pages/{pageNumber}/sign | Sign page.
295+
*PdfApi* | [**PostSignatureField**](docs/PdfApi.md#postsignaturefield) | **Post** /pdf/{name}/fields/signature | Add document signature field.
295296
*PdfApi* | [**PostSplitDocument**](docs/PdfApi.md#postsplitdocument) | **Post** /pdf/{name}/split | Split document to parts.
296297
*PdfApi* | [**PostTextBoxFields**](docs/PdfApi.md#posttextboxfields) | **Post** /pdf/{name}/fields/textbox | Add document text box fields.
297298
*PdfApi* | [**PutAddNewPage**](docs/PdfApi.md#putaddnewpage) | **Put** /pdf/{name}/pages | Add new page to end of the document.
@@ -384,6 +385,7 @@ Class | Method | HTTP request | Description
384385
*PdfApi* | [**PutScreenAnnotationDataExtract**](docs/PdfApi.md#putscreenannotationdataextract) | **Put** /pdf/{name}/annotations/screen/{annotationId}/data/extract | Extract document screen annotation content to storage
385386
*PdfApi* | [**PutSearchableDocument**](docs/PdfApi.md#putsearchabledocument) | **Put** /pdf/{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
386387
*PdfApi* | [**PutSetProperty**](docs/PdfApi.md#putsetproperty) | **Put** /pdf/{name}/documentproperties/{propertyName} | Add/update document property.
388+
*PdfApi* | [**PutSignatureField**](docs/PdfApi.md#putsignaturefield) | **Put** /pdf/{name}/fields/signature/{fieldName} | Replace document signature field.
387389
*PdfApi* | [**PutSoundAnnotation**](docs/PdfApi.md#putsoundannotation) | **Put** /pdf/{name}/annotations/sound/{annotationId} | Replace document sound annotation
388390
*PdfApi* | [**PutSoundAnnotationDataExtract**](docs/PdfApi.md#putsoundannotationdataextract) | **Put** /pdf/{name}/annotations/sound/{annotationId}/data/extract | Extract document sound annotation content to storage
389391
*PdfApi* | [**PutSquareAnnotation**](docs/PdfApi.md#putsquareannotation) | **Put** /pdf/{name}/annotations/square/{annotationId} | Replace document square annotation

docs/PdfApi.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ Method | HTTP request | Description
243243
[**PostRadioButtonFields**](PdfApi.md#PostRadioButtonFields) | **Post** /pdf/{name}/fields/radiobutton | Add document RadioButton fields.
244244
[**PostSignDocument**](PdfApi.md#PostSignDocument) | **Post** /pdf/{name}/sign | Sign document.
245245
[**PostSignPage**](PdfApi.md#PostSignPage) | **Post** /pdf/{name}/pages/{pageNumber}/sign | Sign page.
246+
[**PostSignatureField**](PdfApi.md#PostSignatureField) | **Post** /pdf/{name}/fields/signature | Add document signature field.
246247
[**PostSplitDocument**](PdfApi.md#PostSplitDocument) | **Post** /pdf/{name}/split | Split document to parts.
247248
[**PostTextBoxFields**](PdfApi.md#PostTextBoxFields) | **Post** /pdf/{name}/fields/textbox | Add document text box fields.
248249
[**PutAddNewPage**](PdfApi.md#PutAddNewPage) | **Put** /pdf/{name}/pages | Add new page to end of the document.
@@ -335,6 +336,7 @@ Method | HTTP request | Description
335336
[**PutScreenAnnotationDataExtract**](PdfApi.md#PutScreenAnnotationDataExtract) | **Put** /pdf/{name}/annotations/screen/{annotationId}/data/extract | Extract document screen annotation content to storage
336337
[**PutSearchableDocument**](PdfApi.md#PutSearchableDocument) | **Put** /pdf/{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
337338
[**PutSetProperty**](PdfApi.md#PutSetProperty) | **Put** /pdf/{name}/documentproperties/{propertyName} | Add/update document property.
339+
[**PutSignatureField**](PdfApi.md#PutSignatureField) | **Put** /pdf/{name}/fields/signature/{fieldName} | Replace document signature field.
338340
[**PutSoundAnnotation**](PdfApi.md#PutSoundAnnotation) | **Put** /pdf/{name}/annotations/sound/{annotationId} | Replace document sound annotation
339341
[**PutSoundAnnotationDataExtract**](PdfApi.md#PutSoundAnnotationDataExtract) | **Put** /pdf/{name}/annotations/sound/{annotationId}/data/extract | Extract document sound annotation content to storage
340342
[**PutSquareAnnotation**](PdfApi.md#PutSquareAnnotation) | **Put** /pdf/{name}/annotations/square/{annotationId} | Replace document square annotation
@@ -8297,6 +8299,39 @@ Name | Type | Description | Notes
82978299

82988300
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
82998301

8302+
# **PostSignatureField**
8303+
> AsposeResponse PostSignatureField(name, field, optional)
8304+
Add document signature field.
8305+
8306+
### Required Parameters
8307+
8308+
Name | Type | Description | Notes
8309+
------------- | ------------- | ------------- | -------------
8310+
**name** | **string**| The document name. |
8311+
**field** | [**SignatureField**](SignatureField.md)| The field. |
8312+
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
8313+
8314+
### Optional Parameters
8315+
Optional parameters are passed through a map[string]interface{}.
8316+
8317+
Name | Type | Description | Notes
8318+
------------- | ------------- | ------------- | -------------
8319+
**name** | **string**| The document name. |
8320+
**field** | [**SignatureField**](SignatureField.md)| The field. |
8321+
**storage** | **string**| The document storage. |
8322+
**folder** | **string**| The document folder. |
8323+
8324+
### Return type
8325+
8326+
[**AsposeResponse**](AsposeResponse.md)
8327+
8328+
### HTTP request headers
8329+
8330+
- **Content-Type**: application/json
8331+
- **Accept**: application/json
8332+
8333+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
8334+
83008335
# **PostSplitDocument**
83018336
> SplitResultResponse PostSplitDocument(name, optional)
83028337
Split document to parts.
@@ -11549,6 +11584,41 @@ Name | Type | Description | Notes
1154911584

1155011585
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
1155111586

11587+
# **PutSignatureField**
11588+
> SignatureFieldResponse PutSignatureField(name, fieldName, field, optional)
11589+
Replace document signature field.
11590+
11591+
### Required Parameters
11592+
11593+
Name | Type | Description | Notes
11594+
------------- | ------------- | ------------- | -------------
11595+
**name** | **string**| The document name. |
11596+
**fieldName** | **string**| The field name. |
11597+
**field** | [**SignatureField**](SignatureField.md)| The field. |
11598+
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
11599+
11600+
### Optional Parameters
11601+
Optional parameters are passed through a map[string]interface{}.
11602+
11603+
Name | Type | Description | Notes
11604+
------------- | ------------- | ------------- | -------------
11605+
**name** | **string**| The document name. |
11606+
**fieldName** | **string**| The field name. |
11607+
**field** | [**SignatureField**](SignatureField.md)| The field. |
11608+
**storage** | **string**| The document storage. |
11609+
**folder** | **string**| The document folder. |
11610+
11611+
### Return type
11612+
11613+
[**SignatureFieldResponse**](SignatureFieldResponse.md)
11614+
11615+
### HTTP request headers
11616+
11617+
- **Content-Type**: application/json
11618+
- **Accept**: application/json
11619+
11620+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
11621+
1155211622
# **PutSoundAnnotation**
1155311623
> SoundAnnotationResponse PutSoundAnnotation(name, annotationId, annotation, optional)
1155411624
Replace document sound annotation

fields_test.go

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,102 @@ func TestGetSignatureField(t *testing.T) {
306306
}
307307
}
308308

309+
func TestPostSignatureField(t *testing.T) {
310+
311+
name := "4pages.pdf"
312+
signatureName := "33226.p12"
313+
314+
if err := GetBaseTest().UploadFile(name); err != nil {
315+
t.Error(err)
316+
}
317+
318+
if err := GetBaseTest().UploadFile(signatureName); err != nil {
319+
t.Error(err)
320+
}
321+
322+
signature := Signature {
323+
Authority: "Sergey Smal",
324+
Contact: "[email protected]",
325+
Date: "08/01/2012 12:15:00.000 PM",
326+
FormFieldName: "Signature1",
327+
Location: "Ukraine",
328+
Password: "sIikZSmz",
329+
Rectangle: &Rectangle{ LLX: 100, LLY: 100, URX: 0, URY: 0},
330+
SignaturePath: GetBaseTest().remoteFolder + "/" + signatureName,
331+
SignatureType: SignatureTypePKCS7,
332+
Visible: true,
333+
ShowProperties: false,
334+
}
335+
336+
field := SignatureField {
337+
PageIndex: 1,
338+
Signature: &signature,
339+
Rect: &Rectangle{ LLX: 100, LLY: 100, URX: 0, URY: 0},
340+
PartialName: "sign1",
341+
}
342+
343+
args := map[string]interface{} {
344+
"folder": GetBaseTest().remoteFolder,
345+
}
346+
347+
response, httpResponse, err := GetBaseTest().PdfAPI.PostSignatureField(name, field, args)
348+
if err != nil {
349+
t.Error(err)
350+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
351+
t.Fail()
352+
} else {
353+
fmt.Printf("%d\tTestPostSignatureField - %d\n", GetBaseTest().GetTestNumber(), response.Code)
354+
}
355+
}
356+
357+
func TestPutSignatureField(t *testing.T) {
358+
359+
name := "4pages.pdf"
360+
signatureName := "33226.p12"
361+
362+
if err := GetBaseTest().UploadFile(name); err != nil {
363+
t.Error(err)
364+
}
365+
366+
if err := GetBaseTest().UploadFile(signatureName); err != nil {
367+
t.Error(err)
368+
}
369+
370+
signature := Signature {
371+
Authority: "Sergey Smal",
372+
Contact: "[email protected]",
373+
Date: "08/01/2012 12:15:00.000 PM",
374+
FormFieldName: "Signature1",
375+
Location: "Ukraine",
376+
Password: "sIikZSmz",
377+
Rectangle: &Rectangle{ LLX: 100, LLY: 100, URX: 0, URY: 0},
378+
SignaturePath: GetBaseTest().remoteFolder + "/" + signatureName,
379+
SignatureType: SignatureTypePKCS7,
380+
Visible: true,
381+
ShowProperties: false,
382+
}
383+
384+
field := SignatureField {
385+
PageIndex: 1,
386+
Signature: &signature,
387+
Rect: &Rectangle{ LLX: 100, LLY: 100, URX: 0, URY: 0},
388+
PartialName: "sign1",
389+
}
390+
391+
args := map[string]interface{} {
392+
"folder": GetBaseTest().remoteFolder,
393+
}
394+
395+
response, httpResponse, err := GetBaseTest().PdfAPI.PutSignatureField(name, "Signature1", field, args)
396+
if err != nil {
397+
t.Error(err)
398+
} else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 {
399+
t.Fail()
400+
} else {
401+
fmt.Printf("%d\tTestPutSignatureField - %d\n", GetBaseTest().GetTestNumber(), response.Code)
402+
}
403+
}
404+
309405
func TestGetDocumentTextBoxFields(t *testing.T) {
310406

311407
name := "FormDataTextBox.pdf"

0 commit comments

Comments
 (0)