aspose_pdf_cloud 24.3.0 → 24.4.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 +6 -4
- data/docs/PdfApi.md +52 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +148 -0
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +19 -33
- 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: dee09851c2f85db607abea25ef5a964d41b9183386b79e14663bbbf6035f58f2
|
|
4
|
+
data.tar.gz: e08a5bc8c25ee5dbf7cce19b9d24cce437719ac4ae5d605bb94ab8fa7d52d275
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45f0ce9fa3b50f9108a35eeb76438674a4f0471aeee9896875acc3be439fd5eb7ddcb64c2d22e0b993d56f66f56d9ba8cd650fea7e723f05d3f13652a9e5c21c
|
|
7
|
+
data.tar.gz: b2522d0dc3727aea6a3307962fe419e1c1ef03c747da5cb12c27813215b3af6ee068cc82f467e07aa75ab3256f74b050688027f392c075aae1b91d7d71e8e295
|
data/README.md
CHANGED
|
@@ -29,7 +29,9 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
|
|
|
29
29
|
## Read PDF Formats
|
|
30
30
|
MHT, PCL, PS, XSLFO, MD
|
|
31
31
|
|
|
32
|
-
## Enhancements in Version 24.
|
|
32
|
+
## Enhancements in Version 24.4
|
|
33
|
+
- Convert PDF to optimized Text.
|
|
34
|
+
- Convert PDF to EXCEL without Cloud Storage.
|
|
33
35
|
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
|
|
34
36
|
|
|
35
37
|
## Installation
|
|
@@ -45,15 +47,15 @@ gem build aspose_pdf_cloud.gemspec
|
|
|
45
47
|
Then either install the gem locally:
|
|
46
48
|
|
|
47
49
|
```shell
|
|
48
|
-
gem install ./aspose_pdf_cloud-24.
|
|
50
|
+
gem install ./aspose_pdf_cloud-24.4.0.gem
|
|
49
51
|
```
|
|
50
|
-
(for development, run `gem install --dev ./aspose_pdf_cloud-24.
|
|
52
|
+
(for development, run `gem install --dev ./aspose_pdf_cloud-24.4.0.gem` to install the development dependencies)
|
|
51
53
|
|
|
52
54
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
53
55
|
|
|
54
56
|
Finally add this to the Gemfile:
|
|
55
57
|
|
|
56
|
-
gem 'aspose_pdf_cloud', '~> 24.
|
|
58
|
+
gem 'aspose_pdf_cloud', '~> 24.4.0'
|
|
57
59
|
|
|
58
60
|
### Install from Git
|
|
59
61
|
|
data/docs/PdfApi.md
CHANGED
|
@@ -153,6 +153,7 @@ Method | HTTP request | Description
|
|
|
153
153
|
[**get_pdf_in_storage_to_pptx**](PdfApi.md#get_pdf_in_storage_to_pptx) | **GET** /pdf/\{name}/convert/pptx | Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
|
|
154
154
|
[**get_pdf_in_storage_to_svg**](PdfApi.md#get_pdf_in_storage_to_svg) | **GET** /pdf/\{name}/convert/svg | Converts PDF document (located on storage) to SVG format and returns resulting file in response content
|
|
155
155
|
[**get_pdf_in_storage_to_te_x**](PdfApi.md#get_pdf_in_storage_to_te_x) | **GET** /pdf/\{name}/convert/tex | Converts PDF document (located on storage) to TeX format and returns resulting file in response content
|
|
156
|
+
[**get_pdf_in_storage_to_text**](PdfApi.md#get_pdf_in_storage_to_text) | **GET** /pdf/\{name}/convert/text | Converts PDF document (located on storage) to Text format and returns resulting file in response content
|
|
156
157
|
[**get_pdf_in_storage_to_tiff**](PdfApi.md#get_pdf_in_storage_to_tiff) | **GET** /pdf/\{name}/convert/tiff | Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
|
|
157
158
|
[**get_pdf_in_storage_to_xls**](PdfApi.md#get_pdf_in_storage_to_xls) | **GET** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and returns resulting file in response content
|
|
158
159
|
[**get_pdf_in_storage_to_xlsx**](PdfApi.md#get_pdf_in_storage_to_xlsx) | **GET** /pdf/\{name}/convert/xlsx | Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
|
|
@@ -243,6 +244,7 @@ Method | HTTP request | Description
|
|
|
243
244
|
[**post_page_text_replace**](PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method.
|
|
244
245
|
[**post_page_text_stamps**](PdfApi.md#post_page_text_stamps) | **POST** /pdf/\{name}/pages/\{pageNumber}/stamps/text | Add document page text stamps.
|
|
245
246
|
[**post_page_underline_annotations**](PdfApi.md#post_page_underline_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/underline | Add document page underline annotations.
|
|
247
|
+
[**post_pdf_to_xlsx**](PdfApi.md#post_pdf_to_xlsx) | **POST** /pdf/convert/xlsx | Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
|
246
248
|
[**post_popup_annotation**](PdfApi.md#post_popup_annotation) | **POST** /pdf/\{name}/annotations/\{annotationId}/popup | Add document popup annotations.
|
|
247
249
|
[**post_radio_button_fields**](PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
|
|
248
250
|
[**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
|
|
@@ -4120,6 +4122,30 @@ Name | Type | Description | Notes
|
|
|
4120
4122
|
|
|
4121
4123
|
|
|
4122
4124
|
|
|
4125
|
+
# **get_pdf_in_storage_to_text**
|
|
4126
|
+
> File get_pdf_in_storage_to_text(name, opts)
|
|
4127
|
+
|
|
4128
|
+
Converts PDF document (located on storage) to Text format and returns resulting file in response content
|
|
4129
|
+
|
|
4130
|
+
### Parameters
|
|
4131
|
+
|
|
4132
|
+
Name | Type | Description | Notes
|
|
4133
|
+
------------- | ------------- | ------------- | -------------
|
|
4134
|
+
**name** | **String**| The document name. |
|
|
4135
|
+
**folder** | **String**| The document folder. | [optional]
|
|
4136
|
+
**storage** | **String**| The document storage. | [optional]
|
|
4137
|
+
|
|
4138
|
+
### Return type
|
|
4139
|
+
|
|
4140
|
+
**File**
|
|
4141
|
+
|
|
4142
|
+
### HTTP request headers
|
|
4143
|
+
|
|
4144
|
+
- **Content-Type**: application/json
|
|
4145
|
+
- **Accept**: multipart/form-data
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
|
|
4123
4149
|
# **get_pdf_in_storage_to_tiff**
|
|
4124
4150
|
> File get_pdf_in_storage_to_tiff(name, opts)
|
|
4125
4151
|
|
|
@@ -6458,6 +6484,32 @@ Name | Type | Description | Notes
|
|
|
6458
6484
|
|
|
6459
6485
|
|
|
6460
6486
|
|
|
6487
|
+
# **post_pdf_to_xlsx**
|
|
6488
|
+
> File post_pdf_to_xlsx(opts)
|
|
6489
|
+
|
|
6490
|
+
Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
|
6491
|
+
|
|
6492
|
+
### Parameters
|
|
6493
|
+
|
|
6494
|
+
Name | Type | Description | Notes
|
|
6495
|
+
------------- | ------------- | ------------- | -------------
|
|
6496
|
+
**insert_blank_column_at_first** | **BOOLEAN**| Insert blank column at first | [optional]
|
|
6497
|
+
**minimize_the_number_of_worksheets** | **BOOLEAN**| Minimize the number of worksheets | [optional]
|
|
6498
|
+
**uniform_worksheets** | **BOOLEAN**| Uniform worksheets | [optional]
|
|
6499
|
+
**password** | **String**| The password (Base64). | [optional]
|
|
6500
|
+
**file** | **File**| A file to be converted. | [optional]
|
|
6501
|
+
|
|
6502
|
+
### Return type
|
|
6503
|
+
|
|
6504
|
+
**File**
|
|
6505
|
+
|
|
6506
|
+
### HTTP request headers
|
|
6507
|
+
|
|
6508
|
+
- **Content-Type**: multipart/form-data
|
|
6509
|
+
- **Accept**: multipart/form-data
|
|
6510
|
+
|
|
6511
|
+
|
|
6512
|
+
|
|
6461
6513
|
# **post_popup_annotation**
|
|
6462
6514
|
> AsposeResponse post_popup_annotation(name, annotation_id, annotation, opts)
|
|
6463
6515
|
|
|
@@ -11608,6 +11608,78 @@ module AsposePdfCloud
|
|
|
11608
11608
|
return data, status_code, headers
|
|
11609
11609
|
end
|
|
11610
11610
|
|
|
11611
|
+
# Converts PDF document (located on storage) to Text format and returns resulting file in response content
|
|
11612
|
+
#
|
|
11613
|
+
# @param name The document name.
|
|
11614
|
+
# @param [Hash] opts the optional parameters
|
|
11615
|
+
# @option opts [String] :folder The document folder.
|
|
11616
|
+
# @option opts [String] :storage The document storage.
|
|
11617
|
+
# @return [File]
|
|
11618
|
+
def get_pdf_in_storage_to_text(name, opts = {})
|
|
11619
|
+
@api_client.request_token_if_needed
|
|
11620
|
+
data, _status_code, _headers = get_pdf_in_storage_to_text_with_http_info(name, opts)
|
|
11621
|
+
rescue ApiError => error
|
|
11622
|
+
if error.code == 401
|
|
11623
|
+
@api_client.request_token_if_needed
|
|
11624
|
+
data, _status_code, _headers = get_pdf_in_storage_to_text_with_http_info(name, opts)
|
|
11625
|
+
else
|
|
11626
|
+
raise
|
|
11627
|
+
end
|
|
11628
|
+
return data
|
|
11629
|
+
end
|
|
11630
|
+
|
|
11631
|
+
# Converts PDF document (located on storage) to Text format and returns resulting file in response content
|
|
11632
|
+
#
|
|
11633
|
+
# @param name The document name.
|
|
11634
|
+
# @param [Hash] opts the optional parameters
|
|
11635
|
+
# @option opts [String] :folder The document folder.
|
|
11636
|
+
# @option opts [String] :storage The document storage.
|
|
11637
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
|
11638
|
+
def get_pdf_in_storage_to_text_with_http_info(name, opts = {})
|
|
11639
|
+
if @api_client.config.debugging
|
|
11640
|
+
@api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_text ..."
|
|
11641
|
+
end
|
|
11642
|
+
# verify the required parameter 'name' is set
|
|
11643
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
11644
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_text"
|
|
11645
|
+
end
|
|
11646
|
+
# resource path
|
|
11647
|
+
local_var_path = "/pdf/{name}/convert/text".sub('{' + 'name' + '}', name.to_s)
|
|
11648
|
+
|
|
11649
|
+
# query parameters
|
|
11650
|
+
query_params = {}
|
|
11651
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
|
11652
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
|
11653
|
+
|
|
11654
|
+
# header parameters
|
|
11655
|
+
header_params = {}
|
|
11656
|
+
# HTTP header 'Accept' (if needed)
|
|
11657
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
|
11658
|
+
# HTTP header 'Content-Type'
|
|
11659
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
11660
|
+
|
|
11661
|
+
# form parameters
|
|
11662
|
+
form_params = {}
|
|
11663
|
+
# Fix header in file
|
|
11664
|
+
post_body = nil
|
|
11665
|
+
|
|
11666
|
+
# http body (model)
|
|
11667
|
+
# Fix header in file
|
|
11668
|
+
# post_body = nil
|
|
11669
|
+
auth_names = ['JWT']
|
|
11670
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
11671
|
+
:header_params => header_params,
|
|
11672
|
+
:query_params => query_params,
|
|
11673
|
+
:form_params => form_params,
|
|
11674
|
+
:body => post_body,
|
|
11675
|
+
:auth_names => auth_names,
|
|
11676
|
+
:return_type => 'File')
|
|
11677
|
+
if @api_client.config.debugging
|
|
11678
|
+
@api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
11679
|
+
end
|
|
11680
|
+
return data, status_code, headers
|
|
11681
|
+
end
|
|
11682
|
+
|
|
11611
11683
|
# Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
|
|
11612
11684
|
#
|
|
11613
11685
|
# @param name The document name.
|
|
@@ -18983,6 +19055,82 @@ module AsposePdfCloud
|
|
|
18983
19055
|
return data, status_code, headers
|
|
18984
19056
|
end
|
|
18985
19057
|
|
|
19058
|
+
# Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
|
19059
|
+
#
|
|
19060
|
+
# @param [Hash] opts the optional parameters
|
|
19061
|
+
# @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first
|
|
19062
|
+
# @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets
|
|
19063
|
+
# @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets
|
|
19064
|
+
# @option opts [String] :password The password (Base64).
|
|
19065
|
+
# @option opts [File] :file A file to be converted.
|
|
19066
|
+
# @return [File]
|
|
19067
|
+
def post_pdf_to_xlsx(opts = {})
|
|
19068
|
+
@api_client.request_token_if_needed
|
|
19069
|
+
data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
|
|
19070
|
+
rescue ApiError => error
|
|
19071
|
+
if error.code == 401
|
|
19072
|
+
@api_client.request_token_if_needed
|
|
19073
|
+
data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
|
|
19074
|
+
else
|
|
19075
|
+
raise
|
|
19076
|
+
end
|
|
19077
|
+
return data
|
|
19078
|
+
end
|
|
19079
|
+
|
|
19080
|
+
# Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
|
19081
|
+
#
|
|
19082
|
+
# @param [Hash] opts the optional parameters
|
|
19083
|
+
# @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first
|
|
19084
|
+
# @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets
|
|
19085
|
+
# @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets
|
|
19086
|
+
# @option opts [String] :password The password (Base64).
|
|
19087
|
+
# @option opts [File] :file A file to be converted.
|
|
19088
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
|
19089
|
+
def post_pdf_to_xlsx_with_http_info(opts = {})
|
|
19090
|
+
if @api_client.config.debugging
|
|
19091
|
+
@api_client.config.logger.debug "Calling API: PdfApi.post_pdf_to_xlsx ..."
|
|
19092
|
+
end
|
|
19093
|
+
# resource path
|
|
19094
|
+
local_var_path = "/pdf/convert/xlsx"
|
|
19095
|
+
|
|
19096
|
+
# query parameters
|
|
19097
|
+
query_params = {}
|
|
19098
|
+
query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
|
|
19099
|
+
query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
|
|
19100
|
+
query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
|
|
19101
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
|
19102
|
+
|
|
19103
|
+
# header parameters
|
|
19104
|
+
header_params = {}
|
|
19105
|
+
# HTTP header 'Accept' (if needed)
|
|
19106
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
|
19107
|
+
# HTTP header 'Content-Type'
|
|
19108
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
19109
|
+
|
|
19110
|
+
# form parameters
|
|
19111
|
+
form_params = {}
|
|
19112
|
+
# Fix header in file
|
|
19113
|
+
post_body = nil
|
|
19114
|
+
post_body = opts[:'file'] if !opts[:'file'].nil?
|
|
19115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
|
19116
|
+
|
|
19117
|
+
# http body (model)
|
|
19118
|
+
# Fix header in file
|
|
19119
|
+
# post_body = nil
|
|
19120
|
+
auth_names = ['JWT']
|
|
19121
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
19122
|
+
:header_params => header_params,
|
|
19123
|
+
:query_params => query_params,
|
|
19124
|
+
:form_params => form_params,
|
|
19125
|
+
:body => post_body,
|
|
19126
|
+
:auth_names => auth_names,
|
|
19127
|
+
:return_type => 'File')
|
|
19128
|
+
if @api_client.config.debugging
|
|
19129
|
+
@api_client.config.logger.debug "API called: PdfApi#post_pdf_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
19130
|
+
end
|
|
19131
|
+
return data, status_code, headers
|
|
19132
|
+
end
|
|
19133
|
+
|
|
18986
19134
|
# Add document popup annotations.
|
|
18987
19135
|
#
|
|
18988
19136
|
# @param name The document name.
|
data/test/pdf_tests.rb
CHANGED
|
@@ -2821,11 +2821,9 @@ class PdfTests < Minitest::Test
|
|
|
2821
2821
|
def test_get_pdf_in_storage_to_doc
|
|
2822
2822
|
file_name = '4pages.pdf'
|
|
2823
2823
|
upload_file(file_name)
|
|
2824
|
-
|
|
2825
2824
|
opts = {
|
|
2826
2825
|
:folder => @temp_folder
|
|
2827
2826
|
}
|
|
2828
|
-
|
|
2829
2827
|
response = @pdf_api.get_pdf_in_storage_to_doc(file_name, opts)
|
|
2830
2828
|
assert(response, 'Failed to convert PDF to DOC.')
|
|
2831
2829
|
end
|
|
@@ -2834,7 +2832,6 @@ class PdfTests < Minitest::Test
|
|
|
2834
2832
|
file_name = '4pages.pdf'
|
|
2835
2833
|
upload_file(file_name)
|
|
2836
2834
|
res_file = 'result.doc'
|
|
2837
|
-
|
|
2838
2835
|
opts = {
|
|
2839
2836
|
:folder => @temp_folder
|
|
2840
2837
|
}
|
|
@@ -2844,9 +2841,7 @@ class PdfTests < Minitest::Test
|
|
|
2844
2841
|
|
|
2845
2842
|
def test_put_pdf_in_request_to_doc
|
|
2846
2843
|
file_name = '4pages.pdf'
|
|
2847
|
-
|
|
2848
2844
|
res_file = 'result.doc'
|
|
2849
|
-
|
|
2850
2845
|
opts = {
|
|
2851
2846
|
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
2852
2847
|
# :file => @test_data_folder + file_name
|
|
@@ -3042,7 +3037,6 @@ class PdfTests < Minitest::Test
|
|
|
3042
3037
|
opts = {
|
|
3043
3038
|
:folder => @temp_folder
|
|
3044
3039
|
}
|
|
3045
|
-
|
|
3046
3040
|
response = @pdf_api.get_pdf_in_storage_to_html(file_name, opts)
|
|
3047
3041
|
assert(response, 'Failed to convert PDF to HTML.')
|
|
3048
3042
|
end
|
|
@@ -3079,7 +3073,6 @@ class PdfTests < Minitest::Test
|
|
|
3079
3073
|
opts = {
|
|
3080
3074
|
:folder => @temp_folder
|
|
3081
3075
|
}
|
|
3082
|
-
|
|
3083
3076
|
response = @pdf_api.get_pdf_in_storage_to_epub(file_name, opts)
|
|
3084
3077
|
assert(response, 'Failed to convert PDF to EPUB.')
|
|
3085
3078
|
end
|
|
@@ -3189,7 +3182,6 @@ class PdfTests < Minitest::Test
|
|
|
3189
3182
|
file_name = '4pages.pdf'
|
|
3190
3183
|
upload_file(file_name)
|
|
3191
3184
|
res_file = 'result.tex'
|
|
3192
|
-
|
|
3193
3185
|
opts = {
|
|
3194
3186
|
:folder => @temp_folder
|
|
3195
3187
|
}
|
|
@@ -3197,12 +3189,9 @@ class PdfTests < Minitest::Test
|
|
|
3197
3189
|
assert(response, 'Failed to convert PDF to TeX.')
|
|
3198
3190
|
end
|
|
3199
3191
|
|
|
3200
|
-
|
|
3201
3192
|
def test_put_pdf_in_request_to_te_x
|
|
3202
3193
|
file_name = '4pages.pdf'
|
|
3203
|
-
|
|
3204
3194
|
res_file = 'result.tex'
|
|
3205
|
-
|
|
3206
3195
|
opts = {
|
|
3207
3196
|
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
3208
3197
|
}
|
|
@@ -3213,11 +3202,9 @@ class PdfTests < Minitest::Test
|
|
|
3213
3202
|
def test_get_pdf_in_storage_to_mobi_xml
|
|
3214
3203
|
file_name = '4pages.pdf'
|
|
3215
3204
|
upload_file(file_name)
|
|
3216
|
-
|
|
3217
3205
|
opts = {
|
|
3218
3206
|
:folder => @temp_folder
|
|
3219
3207
|
}
|
|
3220
|
-
|
|
3221
3208
|
response = @pdf_api.get_pdf_in_storage_to_mobi_xml(file_name, opts)
|
|
3222
3209
|
assert(response, 'Failed to convert PDF to Moby Xml.')
|
|
3223
3210
|
end
|
|
@@ -3226,7 +3213,6 @@ class PdfTests < Minitest::Test
|
|
|
3226
3213
|
file_name = '4pages.pdf'
|
|
3227
3214
|
upload_file(file_name)
|
|
3228
3215
|
res_file = 'result.mobi'
|
|
3229
|
-
|
|
3230
3216
|
opts = {
|
|
3231
3217
|
:folder => @temp_folder
|
|
3232
3218
|
}
|
|
@@ -3234,12 +3220,9 @@ class PdfTests < Minitest::Test
|
|
|
3234
3220
|
assert(response, 'Failed to convert PDF to Moby Xml.')
|
|
3235
3221
|
end
|
|
3236
3222
|
|
|
3237
|
-
|
|
3238
3223
|
def test_put_pdf_in_request_to_mobi_xml
|
|
3239
3224
|
file_name = '4pages.pdf'
|
|
3240
|
-
|
|
3241
3225
|
res_file = 'result.mobi'
|
|
3242
|
-
|
|
3243
3226
|
opts = {
|
|
3244
3227
|
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
3245
3228
|
}
|
|
@@ -3250,11 +3233,9 @@ class PdfTests < Minitest::Test
|
|
|
3250
3233
|
def test_get_xfa_pdf_in_storage_to_acro_form
|
|
3251
3234
|
file_name = 'PdfWithXfaForm.pdf'
|
|
3252
3235
|
upload_file(file_name)
|
|
3253
|
-
|
|
3254
3236
|
opts = {
|
|
3255
3237
|
:folder => @temp_folder
|
|
3256
3238
|
}
|
|
3257
|
-
|
|
3258
3239
|
response = @pdf_api.get_xfa_pdf_in_storage_to_acro_form(file_name, opts)
|
|
3259
3240
|
assert(response, 'Failed to convert Xfa PDF to Acro form.')
|
|
3260
3241
|
end
|
|
@@ -3263,7 +3244,6 @@ class PdfTests < Minitest::Test
|
|
|
3263
3244
|
file_name = 'PdfWithXfaForm.pdf'
|
|
3264
3245
|
upload_file(file_name)
|
|
3265
3246
|
res_file = 'result.pdf'
|
|
3266
|
-
|
|
3267
3247
|
opts = {
|
|
3268
3248
|
:folder => @temp_folder
|
|
3269
3249
|
}
|
|
@@ -3271,7 +3251,6 @@ class PdfTests < Minitest::Test
|
|
|
3271
3251
|
assert(response, 'Failed to convert Xfa PDF to Acro form.')
|
|
3272
3252
|
end
|
|
3273
3253
|
|
|
3274
|
-
|
|
3275
3254
|
def test_put_xfa_pdf_in_request_to_acro_form
|
|
3276
3255
|
file_name = 'PdfWithXfaForm.pdf'
|
|
3277
3256
|
|
|
@@ -3284,15 +3263,12 @@ class PdfTests < Minitest::Test
|
|
|
3284
3263
|
assert(response, 'Failed to convert Xfa PDF to Acro form.')
|
|
3285
3264
|
end
|
|
3286
3265
|
|
|
3287
|
-
|
|
3288
3266
|
def test_get_pdf_in_storage_to_xml
|
|
3289
3267
|
file_name = '4pages.pdf'
|
|
3290
3268
|
upload_file(file_name)
|
|
3291
|
-
|
|
3292
3269
|
opts = {
|
|
3293
3270
|
:folder => @temp_folder
|
|
3294
3271
|
}
|
|
3295
|
-
|
|
3296
3272
|
response = @pdf_api.get_pdf_in_storage_to_xml(file_name, opts)
|
|
3297
3273
|
assert(response, 'Failed to convert PDF to Xml.')
|
|
3298
3274
|
end
|
|
@@ -3301,7 +3277,6 @@ class PdfTests < Minitest::Test
|
|
|
3301
3277
|
file_name = '4pages.pdf'
|
|
3302
3278
|
upload_file(file_name)
|
|
3303
3279
|
res_file = 'result.xml'
|
|
3304
|
-
|
|
3305
3280
|
opts = {
|
|
3306
3281
|
:folder => @temp_folder
|
|
3307
3282
|
}
|
|
@@ -3309,12 +3284,9 @@ class PdfTests < Minitest::Test
|
|
|
3309
3284
|
assert(response, 'Failed to convert PDF to Xml.')
|
|
3310
3285
|
end
|
|
3311
3286
|
|
|
3312
|
-
|
|
3313
3287
|
def test_put_pdf_in_request_to_xml
|
|
3314
3288
|
file_name = '4pages.pdf'
|
|
3315
|
-
|
|
3316
3289
|
res_file = 'result.xml'
|
|
3317
|
-
|
|
3318
3290
|
opts = {
|
|
3319
3291
|
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
3320
3292
|
}
|
|
@@ -3325,11 +3297,9 @@ class PdfTests < Minitest::Test
|
|
|
3325
3297
|
def test_get_pdf_in_storage_to_xlsx
|
|
3326
3298
|
file_name = '4pages.pdf'
|
|
3327
3299
|
upload_file(file_name)
|
|
3328
|
-
|
|
3329
3300
|
opts = {
|
|
3330
3301
|
:folder => @temp_folder
|
|
3331
3302
|
}
|
|
3332
|
-
|
|
3333
3303
|
response = @pdf_api.get_pdf_in_storage_to_xlsx(file_name, opts)
|
|
3334
3304
|
assert(response, 'Failed to convert PDF to XLS.')
|
|
3335
3305
|
end
|
|
@@ -3338,7 +3308,6 @@ class PdfTests < Minitest::Test
|
|
|
3338
3308
|
file_name = '4pages.pdf'
|
|
3339
3309
|
upload_file(file_name)
|
|
3340
3310
|
res_file = 'result.xlsx'
|
|
3341
|
-
|
|
3342
3311
|
opts = {
|
|
3343
3312
|
:folder => @temp_folder
|
|
3344
3313
|
}
|
|
@@ -3348,9 +3317,7 @@ class PdfTests < Minitest::Test
|
|
|
3348
3317
|
|
|
3349
3318
|
def test_put_pdf_in_request_to_xlsx
|
|
3350
3319
|
file_name = '4pages.pdf'
|
|
3351
|
-
|
|
3352
3320
|
res_file = 'result.xlsx'
|
|
3353
|
-
|
|
3354
3321
|
opts = {
|
|
3355
3322
|
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
3356
3323
|
}
|
|
@@ -3358,6 +3325,25 @@ class PdfTests < Minitest::Test
|
|
|
3358
3325
|
assert(response, 'Failed to convert PDF to XLS.')
|
|
3359
3326
|
end
|
|
3360
3327
|
|
|
3328
|
+
def test_post_pdf_to_xlsx
|
|
3329
|
+
file_name = '4pages.pdf'
|
|
3330
|
+
opts = {
|
|
3331
|
+
:file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
|
|
3332
|
+
}
|
|
3333
|
+
response = @pdf_api.post_pdf_to_xlsx(opts)
|
|
3334
|
+
assert(response, 'Failed to convert PDF to XLS.')
|
|
3335
|
+
end
|
|
3336
|
+
|
|
3337
|
+
def test_get_pdf_in_storage_to_text
|
|
3338
|
+
file_name = '4pages.pdf'
|
|
3339
|
+
upload_file(file_name)
|
|
3340
|
+
opts = {
|
|
3341
|
+
:folder => @temp_folder
|
|
3342
|
+
}
|
|
3343
|
+
response = @pdf_api.get_pdf_in_storage_to_text(file_name, opts)
|
|
3344
|
+
assert(response, 'Failed to convert PDF to Text.')
|
|
3345
|
+
end
|
|
3346
|
+
|
|
3361
3347
|
# Convert to PDF Tests
|
|
3362
3348
|
|
|
3363
3349
|
def test_get_epub_in_storage_to_pdf
|
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: 24.
|
|
4
|
+
version: 24.4.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: 2024-
|
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|