aspose_pdf_cloud 19.12.0 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/PdfApi.md +53 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +160 -0
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +74 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2cff3ea26d275e20541506fb7bbc9a5b09b65983f78deedb5075a0589313dfab
|
|
4
|
+
data.tar.gz: e5f315a1e4cc4b784b0192af45a07609f8ae3547d7c5fb2f4a90dd899843cef9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a42718f2b379366afd02eb01de6cd457adfa6ef8414294ac9a37945cbe6096fb999127e4034adcdcb6281472185aa438467bfb9865d84b94785cab5ad572f7e
|
|
7
|
+
data.tar.gz: 11c0cf4b616c04f9869d8cfa93178c2cc6537282a9adea8d00ed0fab8b0d584855181818fe000d7d2cb799a61ee631d894a25e2dccd5abbbbe2db94ab476566a
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Aspose.PDF Cloud
|
|
2
2
|
|
|
3
3
|
- API version: 3.0
|
|
4
|
-
- Package version:
|
|
4
|
+
- Package version: 20.1.0
|
|
5
5
|
|
|
6
6
|
[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.
|
|
7
7
|
|
|
@@ -9,6 +9,8 @@ Our Cloud SDKs are wrappers around REST API in various programming languages, al
|
|
|
9
9
|
|
|
10
10
|
These SDKs are now fully supported. If you have any questions, see any bugs or have enhancement request, feel free to reach out to us at [Free Support Forums](https://forum.aspose.cloud/c/pdf).
|
|
11
11
|
|
|
12
|
+
Unlock your PDF document using the Aspose.PDF online service https://products.aspose.app/pdf/unlock.
|
|
13
|
+
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
16
|
### Build a gem
|
|
@@ -22,15 +24,15 @@ gem build aspose_pdf_cloud.gemspec
|
|
|
22
24
|
Then either install the gem locally:
|
|
23
25
|
|
|
24
26
|
```shell
|
|
25
|
-
gem install ./aspose_pdf_cloud-
|
|
27
|
+
gem install ./aspose_pdf_cloud-20.1.0.gem
|
|
26
28
|
```
|
|
27
|
-
(for development, run `gem install --dev ./aspose_pdf_cloud-
|
|
29
|
+
(for development, run `gem install --dev ./aspose_pdf_cloud-20.1.0.gem` to install the development dependencies)
|
|
28
30
|
|
|
29
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
30
32
|
|
|
31
33
|
Finally add this to the Gemfile:
|
|
32
34
|
|
|
33
|
-
gem 'aspose_pdf_cloud', '~>
|
|
35
|
+
gem 'aspose_pdf_cloud', '~> 20.1.0'
|
|
34
36
|
|
|
35
37
|
### Install from Git
|
|
36
38
|
|
|
@@ -328,6 +330,7 @@ Class | Method | HTTP request | Description
|
|
|
328
330
|
*AsposePdfCloud::PdfApi* | [**post_radio_button_fields**](docs/PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
|
|
329
331
|
*AsposePdfCloud::PdfApi* | [**post_sign_document**](docs/PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
|
|
330
332
|
*AsposePdfCloud::PdfApi* | [**post_sign_page**](docs/PdfApi.md#post_sign_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/sign | Sign page.
|
|
333
|
+
*AsposePdfCloud::PdfApi* | [**post_signature_field**](docs/PdfApi.md#post_signature_field) | **POST** /pdf/\{name}/fields/signature | Add document signature field.
|
|
331
334
|
*AsposePdfCloud::PdfApi* | [**post_split_document**](docs/PdfApi.md#post_split_document) | **POST** /pdf/\{name}/split | Split document to parts.
|
|
332
335
|
*AsposePdfCloud::PdfApi* | [**post_text_box_fields**](docs/PdfApi.md#post_text_box_fields) | **POST** /pdf/\{name}/fields/textbox | Add document text box fields.
|
|
333
336
|
*AsposePdfCloud::PdfApi* | [**put_add_new_page**](docs/PdfApi.md#put_add_new_page) | **PUT** /pdf/\{name}/pages | Add new page to end of the document.
|
|
@@ -420,6 +423,7 @@ Class | Method | HTTP request | Description
|
|
|
420
423
|
*AsposePdfCloud::PdfApi* | [**put_screen_annotation_data_extract**](docs/PdfApi.md#put_screen_annotation_data_extract) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId}/data/extract | Extract document screen annotation content to storage
|
|
421
424
|
*AsposePdfCloud::PdfApi* | [**put_searchable_document**](docs/PdfApi.md#put_searchable_document) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
|
|
422
425
|
*AsposePdfCloud::PdfApi* | [**put_set_property**](docs/PdfApi.md#put_set_property) | **PUT** /pdf/\{name}/documentproperties/\{propertyName} | Add/update document property.
|
|
426
|
+
*AsposePdfCloud::PdfApi* | [**put_signature_field**](docs/PdfApi.md#put_signature_field) | **PUT** /pdf/\{name}/fields/signature/\{fieldName} | Replace document signature field.
|
|
423
427
|
*AsposePdfCloud::PdfApi* | [**put_sound_annotation**](docs/PdfApi.md#put_sound_annotation) | **PUT** /pdf/\{name}/annotations/sound/\{annotationId} | Replace document sound annotation
|
|
424
428
|
*AsposePdfCloud::PdfApi* | [**put_sound_annotation_data_extract**](docs/PdfApi.md#put_sound_annotation_data_extract) | **PUT** /pdf/\{name}/annotations/sound/\{annotationId}/data/extract | Extract document sound annotation content to storage
|
|
425
429
|
*AsposePdfCloud::PdfApi* | [**put_square_annotation**](docs/PdfApi.md#put_square_annotation) | **PUT** /pdf/\{name}/annotations/square/\{annotationId} | Replace document square annotation
|
data/docs/PdfApi.md
CHANGED
|
@@ -243,6 +243,7 @@ Method | HTTP request | Description
|
|
|
243
243
|
[**post_radio_button_fields**](PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
|
|
244
244
|
[**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
|
|
245
245
|
[**post_sign_page**](PdfApi.md#post_sign_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/sign | Sign page.
|
|
246
|
+
[**post_signature_field**](PdfApi.md#post_signature_field) | **POST** /pdf/\{name}/fields/signature | Add document signature field.
|
|
246
247
|
[**post_split_document**](PdfApi.md#post_split_document) | **POST** /pdf/\{name}/split | Split document to parts.
|
|
247
248
|
[**post_text_box_fields**](PdfApi.md#post_text_box_fields) | **POST** /pdf/\{name}/fields/textbox | Add document text box fields.
|
|
248
249
|
[**put_add_new_page**](PdfApi.md#put_add_new_page) | **PUT** /pdf/\{name}/pages | Add new page to end of the document.
|
|
@@ -335,6 +336,7 @@ Method | HTTP request | Description
|
|
|
335
336
|
[**put_screen_annotation_data_extract**](PdfApi.md#put_screen_annotation_data_extract) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId}/data/extract | Extract document screen annotation content to storage
|
|
336
337
|
[**put_searchable_document**](PdfApi.md#put_searchable_document) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
|
|
337
338
|
[**put_set_property**](PdfApi.md#put_set_property) | **PUT** /pdf/\{name}/documentproperties/\{propertyName} | Add/update document property.
|
|
339
|
+
[**put_signature_field**](PdfApi.md#put_signature_field) | **PUT** /pdf/\{name}/fields/signature/\{fieldName} | Replace document signature field.
|
|
338
340
|
[**put_sound_annotation**](PdfApi.md#put_sound_annotation) | **PUT** /pdf/\{name}/annotations/sound/\{annotationId} | Replace document sound annotation
|
|
339
341
|
[**put_sound_annotation_data_extract**](PdfApi.md#put_sound_annotation_data_extract) | **PUT** /pdf/\{name}/annotations/sound/\{annotationId}/data/extract | Extract document sound annotation content to storage
|
|
340
342
|
[**put_square_annotation**](PdfApi.md#put_square_annotation) | **PUT** /pdf/\{name}/annotations/square/\{annotationId} | Replace document square annotation
|
|
@@ -6421,6 +6423,31 @@ Name | Type | Description | Notes
|
|
|
6421
6423
|
|
|
6422
6424
|
|
|
6423
6425
|
|
|
6426
|
+
# **post_signature_field**
|
|
6427
|
+
> AsposeResponse post_signature_field(name, field, opts)
|
|
6428
|
+
|
|
6429
|
+
Add document signature field.
|
|
6430
|
+
|
|
6431
|
+
### Parameters
|
|
6432
|
+
|
|
6433
|
+
Name | Type | Description | Notes
|
|
6434
|
+
------------- | ------------- | ------------- | -------------
|
|
6435
|
+
**name** | **String**| The document name. |
|
|
6436
|
+
**field** | [**SignatureField**](SignatureField.md)| The field. |
|
|
6437
|
+
**storage** | **String**| The document storage. | [optional]
|
|
6438
|
+
**folder** | **String**| The document folder. | [optional]
|
|
6439
|
+
|
|
6440
|
+
### Return type
|
|
6441
|
+
|
|
6442
|
+
[**AsposeResponse**](AsposeResponse.md)
|
|
6443
|
+
|
|
6444
|
+
### HTTP request headers
|
|
6445
|
+
|
|
6446
|
+
- **Content-Type**: application/json
|
|
6447
|
+
- **Accept**: application/json
|
|
6448
|
+
|
|
6449
|
+
|
|
6450
|
+
|
|
6424
6451
|
# **post_split_document**
|
|
6425
6452
|
> SplitResultResponse post_split_document(name, opts)
|
|
6426
6453
|
|
|
@@ -8921,6 +8948,32 @@ Name | Type | Description | Notes
|
|
|
8921
8948
|
|
|
8922
8949
|
|
|
8923
8950
|
|
|
8951
|
+
# **put_signature_field**
|
|
8952
|
+
> SignatureFieldResponse put_signature_field(name, field_name, field, opts)
|
|
8953
|
+
|
|
8954
|
+
Replace document signature field.
|
|
8955
|
+
|
|
8956
|
+
### Parameters
|
|
8957
|
+
|
|
8958
|
+
Name | Type | Description | Notes
|
|
8959
|
+
------------- | ------------- | ------------- | -------------
|
|
8960
|
+
**name** | **String**| The document name. |
|
|
8961
|
+
**field_name** | **String**| The field name. |
|
|
8962
|
+
**field** | [**SignatureField**](SignatureField.md)| The field. |
|
|
8963
|
+
**storage** | **String**| The document storage. | [optional]
|
|
8964
|
+
**folder** | **String**| The document folder. | [optional]
|
|
8965
|
+
|
|
8966
|
+
### Return type
|
|
8967
|
+
|
|
8968
|
+
[**SignatureFieldResponse**](SignatureFieldResponse.md)
|
|
8969
|
+
|
|
8970
|
+
### HTTP request headers
|
|
8971
|
+
|
|
8972
|
+
- **Content-Type**: application/json
|
|
8973
|
+
- **Accept**: application/json
|
|
8974
|
+
|
|
8975
|
+
|
|
8976
|
+
|
|
8924
8977
|
# **put_sound_annotation**
|
|
8925
8978
|
> SoundAnnotationResponse put_sound_annotation(name, annotation_id, annotation, opts)
|
|
8926
8979
|
|
|
@@ -18879,6 +18879,83 @@ module AsposePdfCloud
|
|
|
18879
18879
|
return data, status_code, headers
|
|
18880
18880
|
end
|
|
18881
18881
|
|
|
18882
|
+
# Add document signature field.
|
|
18883
|
+
#
|
|
18884
|
+
# @param name The document name.
|
|
18885
|
+
# @param field The field.
|
|
18886
|
+
# @param [Hash] opts the optional parameters
|
|
18887
|
+
# @option opts [String] :storage The document storage.
|
|
18888
|
+
# @option opts [String] :folder The document folder.
|
|
18889
|
+
# @return [AsposeResponse]
|
|
18890
|
+
def post_signature_field(name, field, opts = {})
|
|
18891
|
+
@api_client.request_token_if_needed
|
|
18892
|
+
data, _status_code, _headers = post_signature_field_with_http_info(name, field, opts)
|
|
18893
|
+
rescue ApiError => error
|
|
18894
|
+
if error.code == 401
|
|
18895
|
+
@api_client.request_token_if_needed
|
|
18896
|
+
data, _status_code, _headers = post_signature_field_with_http_info(name, field, opts)
|
|
18897
|
+
else
|
|
18898
|
+
raise
|
|
18899
|
+
end
|
|
18900
|
+
return data
|
|
18901
|
+
end
|
|
18902
|
+
|
|
18903
|
+
# Add document signature field.
|
|
18904
|
+
#
|
|
18905
|
+
# @param name The document name.
|
|
18906
|
+
# @param field The field.
|
|
18907
|
+
# @param [Hash] opts the optional parameters
|
|
18908
|
+
# @option opts [String] :storage The document storage.
|
|
18909
|
+
# @option opts [String] :folder The document folder.
|
|
18910
|
+
# @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
|
|
18911
|
+
def post_signature_field_with_http_info(name, field, opts = {})
|
|
18912
|
+
if @api_client.config.debugging
|
|
18913
|
+
@api_client.config.logger.debug "Calling API: PdfApi.post_signature_field ..."
|
|
18914
|
+
end
|
|
18915
|
+
# verify the required parameter 'name' is set
|
|
18916
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
18917
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_signature_field"
|
|
18918
|
+
end
|
|
18919
|
+
# verify the required parameter 'field' is set
|
|
18920
|
+
if @api_client.config.client_side_validation && field.nil?
|
|
18921
|
+
fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.post_signature_field"
|
|
18922
|
+
end
|
|
18923
|
+
# resource path
|
|
18924
|
+
local_var_path = "/pdf/{name}/fields/signature".sub('{' + 'name' + '}', name.to_s)
|
|
18925
|
+
|
|
18926
|
+
# query parameters
|
|
18927
|
+
query_params = {}
|
|
18928
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
|
18929
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
18930
|
+
|
|
18931
|
+
# header parameters
|
|
18932
|
+
header_params = {}
|
|
18933
|
+
# HTTP header 'Accept' (if needed)
|
|
18934
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
18935
|
+
# HTTP header 'Content-Type'
|
|
18936
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
18937
|
+
|
|
18938
|
+
# form parameters
|
|
18939
|
+
form_params = {}
|
|
18940
|
+
# Fix header in file
|
|
18941
|
+
post_body = nil
|
|
18942
|
+
|
|
18943
|
+
# http body (model)
|
|
18944
|
+
post_body = @api_client.object_to_http_body(field)
|
|
18945
|
+
auth_names = ['JWT']
|
|
18946
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
18947
|
+
:header_params => header_params,
|
|
18948
|
+
:query_params => query_params,
|
|
18949
|
+
:form_params => form_params,
|
|
18950
|
+
:body => post_body,
|
|
18951
|
+
:auth_names => auth_names,
|
|
18952
|
+
:return_type => 'AsposeResponse')
|
|
18953
|
+
if @api_client.config.debugging
|
|
18954
|
+
@api_client.config.logger.debug "API called: PdfApi#post_signature_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
18955
|
+
end
|
|
18956
|
+
return data, status_code, headers
|
|
18957
|
+
end
|
|
18958
|
+
|
|
18882
18959
|
# Split document to parts.
|
|
18883
18960
|
#
|
|
18884
18961
|
# @param name Document name.
|
|
@@ -26849,6 +26926,89 @@ module AsposePdfCloud
|
|
|
26849
26926
|
return data, status_code, headers
|
|
26850
26927
|
end
|
|
26851
26928
|
|
|
26929
|
+
# Replace document signature field.
|
|
26930
|
+
#
|
|
26931
|
+
# @param name The document name.
|
|
26932
|
+
# @param field_name The field name.
|
|
26933
|
+
# @param field The field.
|
|
26934
|
+
# @param [Hash] opts the optional parameters
|
|
26935
|
+
# @option opts [String] :storage The document storage.
|
|
26936
|
+
# @option opts [String] :folder The document folder.
|
|
26937
|
+
# @return [SignatureFieldResponse]
|
|
26938
|
+
def put_signature_field(name, field_name, field, opts = {})
|
|
26939
|
+
@api_client.request_token_if_needed
|
|
26940
|
+
data, _status_code, _headers = put_signature_field_with_http_info(name, field_name, field, opts)
|
|
26941
|
+
rescue ApiError => error
|
|
26942
|
+
if error.code == 401
|
|
26943
|
+
@api_client.request_token_if_needed
|
|
26944
|
+
data, _status_code, _headers = put_signature_field_with_http_info(name, field_name, field, opts)
|
|
26945
|
+
else
|
|
26946
|
+
raise
|
|
26947
|
+
end
|
|
26948
|
+
return data
|
|
26949
|
+
end
|
|
26950
|
+
|
|
26951
|
+
# Replace document signature field.
|
|
26952
|
+
#
|
|
26953
|
+
# @param name The document name.
|
|
26954
|
+
# @param field_name The field name.
|
|
26955
|
+
# @param field The field.
|
|
26956
|
+
# @param [Hash] opts the optional parameters
|
|
26957
|
+
# @option opts [String] :storage The document storage.
|
|
26958
|
+
# @option opts [String] :folder The document folder.
|
|
26959
|
+
# @return [Array<(SignatureFieldResponse, Fixnum, Hash)>] SignatureFieldResponse data, response status code and response headers
|
|
26960
|
+
def put_signature_field_with_http_info(name, field_name, field, opts = {})
|
|
26961
|
+
if @api_client.config.debugging
|
|
26962
|
+
@api_client.config.logger.debug "Calling API: PdfApi.put_signature_field ..."
|
|
26963
|
+
end
|
|
26964
|
+
# verify the required parameter 'name' is set
|
|
26965
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
26966
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_signature_field"
|
|
26967
|
+
end
|
|
26968
|
+
# verify the required parameter 'field_name' is set
|
|
26969
|
+
if @api_client.config.client_side_validation && field_name.nil?
|
|
26970
|
+
fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_signature_field"
|
|
26971
|
+
end
|
|
26972
|
+
# verify the required parameter 'field' is set
|
|
26973
|
+
if @api_client.config.client_side_validation && field.nil?
|
|
26974
|
+
fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_signature_field"
|
|
26975
|
+
end
|
|
26976
|
+
# resource path
|
|
26977
|
+
local_var_path = "/pdf/{name}/fields/signature/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)
|
|
26978
|
+
|
|
26979
|
+
# query parameters
|
|
26980
|
+
query_params = {}
|
|
26981
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
|
26982
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
26983
|
+
|
|
26984
|
+
# header parameters
|
|
26985
|
+
header_params = {}
|
|
26986
|
+
# HTTP header 'Accept' (if needed)
|
|
26987
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
26988
|
+
# HTTP header 'Content-Type'
|
|
26989
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
26990
|
+
|
|
26991
|
+
# form parameters
|
|
26992
|
+
form_params = {}
|
|
26993
|
+
# Fix header in file
|
|
26994
|
+
post_body = nil
|
|
26995
|
+
|
|
26996
|
+
# http body (model)
|
|
26997
|
+
post_body = @api_client.object_to_http_body(field)
|
|
26998
|
+
auth_names = ['JWT']
|
|
26999
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
27000
|
+
:header_params => header_params,
|
|
27001
|
+
:query_params => query_params,
|
|
27002
|
+
:form_params => form_params,
|
|
27003
|
+
:body => post_body,
|
|
27004
|
+
:auth_names => auth_names,
|
|
27005
|
+
:return_type => 'SignatureFieldResponse')
|
|
27006
|
+
if @api_client.config.debugging
|
|
27007
|
+
@api_client.config.logger.debug "API called: PdfApi#put_signature_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
27008
|
+
end
|
|
27009
|
+
return data, status_code, headers
|
|
27010
|
+
end
|
|
27011
|
+
|
|
26852
27012
|
# Replace document sound annotation
|
|
26853
27013
|
#
|
|
26854
27014
|
# @param name The document name.
|
data/test/pdf_tests.rb
CHANGED
|
@@ -3862,7 +3862,7 @@ class PdfTests < Minitest::Test
|
|
|
3862
3862
|
assert(response, 'Failed flatten document.')
|
|
3863
3863
|
end
|
|
3864
3864
|
|
|
3865
|
-
def
|
|
3865
|
+
def test_get_document_sigignature_fields
|
|
3866
3866
|
file_name = 'adbe.x509.rsa_sha1.valid.pdf'
|
|
3867
3867
|
upload_file(file_name)
|
|
3868
3868
|
|
|
@@ -3874,7 +3874,7 @@ class PdfTests < Minitest::Test
|
|
|
3874
3874
|
assert(response, 'Failed to read document signature fields.')
|
|
3875
3875
|
end
|
|
3876
3876
|
|
|
3877
|
-
def
|
|
3877
|
+
def test_get_page_sigignature_fields
|
|
3878
3878
|
file_name = 'adbe.x509.rsa_sha1.valid.pdf'
|
|
3879
3879
|
upload_file(file_name)
|
|
3880
3880
|
|
|
@@ -3887,7 +3887,75 @@ class PdfTests < Minitest::Test
|
|
|
3887
3887
|
assert(response, 'Failed to read page signature fields.')
|
|
3888
3888
|
end
|
|
3889
3889
|
|
|
3890
|
-
def
|
|
3890
|
+
def test_post_sigignature_field
|
|
3891
|
+
file_name = '4pages.pdf'
|
|
3892
|
+
upload_file(file_name)
|
|
3893
|
+
|
|
3894
|
+
signature_name = '33226.p12'
|
|
3895
|
+
upload_file(signature_name)
|
|
3896
|
+
|
|
3897
|
+
signature = Signature.new
|
|
3898
|
+
signature.authority = 'Sergey Smal'
|
|
3899
|
+
signature.contact = 'test@mail.ru'
|
|
3900
|
+
signature.date = '08/01/2012 12:15:00.000 PM'
|
|
3901
|
+
signature.form_field_name = 'Signature1'
|
|
3902
|
+
signature.location = 'Ukraine'
|
|
3903
|
+
signature.password = 'sIikZSmz'
|
|
3904
|
+
signature.rectangle = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
|
|
3905
|
+
signature.signature_path = @temp_folder + '/' + signature_name
|
|
3906
|
+
signature.signature_type = SignatureType::PKCS7
|
|
3907
|
+
signature.visible = true
|
|
3908
|
+
signature.show_properties = false
|
|
3909
|
+
|
|
3910
|
+
field = SignatureField.new
|
|
3911
|
+
field.partial_name = 'sign1'
|
|
3912
|
+
field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
|
|
3913
|
+
field.signature = signature
|
|
3914
|
+
field.page_index = 1
|
|
3915
|
+
|
|
3916
|
+
opts = {
|
|
3917
|
+
:folder => @temp_folder
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
response = @pdf_api.post_signature_field(file_name, field, opts)
|
|
3921
|
+
assert(response, 'Failed to create signature field.')
|
|
3922
|
+
end
|
|
3923
|
+
|
|
3924
|
+
def test_put_sigignature_field
|
|
3925
|
+
file_name = 'adbe.x509.rsa_sha1.valid.pdf'
|
|
3926
|
+
upload_file(file_name)
|
|
3927
|
+
|
|
3928
|
+
signature_name = '33226.p12'
|
|
3929
|
+
upload_file(signature_name)
|
|
3930
|
+
|
|
3931
|
+
signature = Signature.new
|
|
3932
|
+
signature.authority = 'Sergey Smal'
|
|
3933
|
+
signature.contact = 'test@mail.ru'
|
|
3934
|
+
signature.date = '08/01/2012 12:15:00.000 PM'
|
|
3935
|
+
signature.form_field_name = 'Signature1'
|
|
3936
|
+
signature.location = 'Ukraine'
|
|
3937
|
+
signature.password = 'sIikZSmz'
|
|
3938
|
+
signature.rectangle = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
|
|
3939
|
+
signature.signature_path = @temp_folder + '/' + signature_name
|
|
3940
|
+
signature.signature_type = SignatureType::PKCS7
|
|
3941
|
+
signature.visible = true
|
|
3942
|
+
signature.show_properties = false
|
|
3943
|
+
|
|
3944
|
+
field = SignatureField.new
|
|
3945
|
+
field.partial_name = 'sign1'
|
|
3946
|
+
field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
|
|
3947
|
+
field.signature = signature
|
|
3948
|
+
field.page_index = 1
|
|
3949
|
+
|
|
3950
|
+
opts = {
|
|
3951
|
+
:folder => @temp_folder
|
|
3952
|
+
}
|
|
3953
|
+
|
|
3954
|
+
response = @pdf_api.put_signature_field(file_name, 'Signature1', field, opts)
|
|
3955
|
+
assert(response, 'Failed to update signature field.')
|
|
3956
|
+
end
|
|
3957
|
+
|
|
3958
|
+
def test_get_sigignature_field
|
|
3891
3959
|
file_name = 'adbe.x509.rsa_sha1.valid.pdf'
|
|
3892
3960
|
upload_file(file_name)
|
|
3893
3961
|
|
|
@@ -3900,6 +3968,9 @@ class PdfTests < Minitest::Test
|
|
|
3900
3968
|
assert(response, 'Failed to read signature field.')
|
|
3901
3969
|
end
|
|
3902
3970
|
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
|
|
3903
3974
|
def test_get_document_text_box_fields
|
|
3904
3975
|
file_name = 'FormDataTextBox.pdf'
|
|
3905
3976
|
upload_file(file_name)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aspose_pdf_cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 20.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aspose PDF Cloud
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-01-
|
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|