aspose_pdf_cloud 24.3.0 → 24.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/PdfApi.md +82 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +232 -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: 017c3ad39657e983b6aae0ac0e55e9808ca5271571fdce13bd756e612cc000f6
|
4
|
+
data.tar.gz: c761b2b7685f44cd161d7df22a45997857139bf0d56b62f5d402756e1baa89c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8751142a437c8ae96c055eff19dfaed72277827814e20fba514f5a70f8e845247d8b70faadfcc0ef4a571e5f4e3c80db6a8feaff2664b0a0df26fd4bc42136d5
|
7
|
+
data.tar.gz: 741dbb909f25436ba3a10204ccd9463efe3714b92105c5f58f3a573d574877a9b8617da182ab45945c9e454c8450d58bd7c13ed76d81c07c5e4fbcdbc83b0f7d
|
data/README.md
CHANGED
@@ -29,9 +29,12 @@ 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.5
|
33
33
|
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
|
34
34
|
|
35
|
+
## Bugs fixed in Version 24.5
|
36
|
+
- Aspose.PDF Cloud Service Throws Bad Gateway Error intermittently.
|
37
|
+
|
35
38
|
## Installation
|
36
39
|
|
37
40
|
### Build a gem
|
@@ -45,15 +48,15 @@ gem build aspose_pdf_cloud.gemspec
|
|
45
48
|
Then either install the gem locally:
|
46
49
|
|
47
50
|
```shell
|
48
|
-
gem install ./aspose_pdf_cloud-24.
|
51
|
+
gem install ./aspose_pdf_cloud-24.5.0.gem
|
49
52
|
```
|
50
|
-
(for development, run `gem install --dev ./aspose_pdf_cloud-24.
|
53
|
+
(for development, run `gem install --dev ./aspose_pdf_cloud-24.5.0.gem` to install the development dependencies)
|
51
54
|
|
52
55
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
53
56
|
|
54
57
|
Finally add this to the Gemfile:
|
55
58
|
|
56
|
-
gem 'aspose_pdf_cloud', '~> 24.
|
59
|
+
gem 'aspose_pdf_cloud', '~> 24.5.0'
|
57
60
|
|
58
61
|
### Install from Git
|
59
62
|
|
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
|
@@ -208,6 +209,7 @@ Method | HTTP request | Description
|
|
208
209
|
[**post_document_text_replace**](PdfApi.md#post_document_text_replace) | **POST** /pdf/\{name}/text/replace | Document's replace text method.
|
209
210
|
[**post_encrypt_document_in_storage**](PdfApi.md#post_encrypt_document_in_storage) | **POST** /pdf/\{name}/encrypt | Encrypt document in storage.
|
210
211
|
[**post_flatten_document**](PdfApi.md#post_flatten_document) | **POST** /pdf/\{name}/flatten | Flatten the document.
|
212
|
+
[**post_html_to_pdf**](PdfApi.md#post_html_to_pdf) | **POST** /pdf/create/html | Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
|
211
213
|
[**post_import_fields_from_fdf**](PdfApi.md#post_import_fields_from_fdf) | **POST** /pdf/\{name}/import/fdf | Update fields from FDF file in request.
|
212
214
|
[**post_import_fields_from_xfdf**](PdfApi.md#post_import_fields_from_xfdf) | **POST** /pdf/\{name}/import/xfdf | Update fields from XFDF file in request.
|
213
215
|
[**post_import_fields_from_xml**](PdfApi.md#post_import_fields_from_xml) | **POST** /pdf/\{name}/import/xml | Update fields from XML file in request.
|
@@ -243,6 +245,7 @@ Method | HTTP request | Description
|
|
243
245
|
[**post_page_text_replace**](PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method.
|
244
246
|
[**post_page_text_stamps**](PdfApi.md#post_page_text_stamps) | **POST** /pdf/\{name}/pages/\{pageNumber}/stamps/text | Add document page text stamps.
|
245
247
|
[**post_page_underline_annotations**](PdfApi.md#post_page_underline_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/underline | Add document page underline annotations.
|
248
|
+
[**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
249
|
[**post_popup_annotation**](PdfApi.md#post_popup_annotation) | **POST** /pdf/\{name}/annotations/\{annotationId}/popup | Add document popup annotations.
|
247
250
|
[**post_radio_button_fields**](PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
|
248
251
|
[**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
|
@@ -4120,6 +4123,30 @@ Name | Type | Description | Notes
|
|
4120
4123
|
|
4121
4124
|
|
4122
4125
|
|
4126
|
+
# **get_pdf_in_storage_to_text**
|
4127
|
+
> File get_pdf_in_storage_to_text(name, opts)
|
4128
|
+
|
4129
|
+
Converts PDF document (located on storage) to Text format and returns resulting file in response content
|
4130
|
+
|
4131
|
+
### Parameters
|
4132
|
+
|
4133
|
+
Name | Type | Description | Notes
|
4134
|
+
------------- | ------------- | ------------- | -------------
|
4135
|
+
**name** | **String**| The document name. |
|
4136
|
+
**folder** | **String**| The document folder. | [optional]
|
4137
|
+
**storage** | **String**| The document storage. | [optional]
|
4138
|
+
|
4139
|
+
### Return type
|
4140
|
+
|
4141
|
+
**File**
|
4142
|
+
|
4143
|
+
### HTTP request headers
|
4144
|
+
|
4145
|
+
- **Content-Type**: application/json
|
4146
|
+
- **Accept**: multipart/form-data
|
4147
|
+
|
4148
|
+
|
4149
|
+
|
4123
4150
|
# **get_pdf_in_storage_to_tiff**
|
4124
4151
|
> File get_pdf_in_storage_to_tiff(name, opts)
|
4125
4152
|
|
@@ -5545,6 +5572,35 @@ Name | Type | Description | Notes
|
|
5545
5572
|
|
5546
5573
|
|
5547
5574
|
|
5575
|
+
# **post_html_to_pdf**
|
5576
|
+
> File post_html_to_pdf(opts)
|
5577
|
+
|
5578
|
+
Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
|
5579
|
+
|
5580
|
+
### Parameters
|
5581
|
+
|
5582
|
+
Name | Type | Description | Notes
|
5583
|
+
------------- | ------------- | ------------- | -------------
|
5584
|
+
**html_file_name** | **String**| Name of HTML file in ZIP. | [optional]
|
5585
|
+
**height** | **Float**| Page height | [optional]
|
5586
|
+
**width** | **Float**| Page width | [optional]
|
5587
|
+
**is_landscape** | **BOOLEAN**| Is page landscaped | [optional]
|
5588
|
+
**margin_left** | **Float**| Page margin left | [optional]
|
5589
|
+
**margin_bottom** | **Float**| Page margin bottom | [optional]
|
5590
|
+
**margin_right** | **Float**| Page margin right | [optional]
|
5591
|
+
**margin_top** | **Float**| Page margin top | [optional]
|
5592
|
+
|
5593
|
+
### Return type
|
5594
|
+
|
5595
|
+
**File**
|
5596
|
+
|
5597
|
+
### HTTP request headers
|
5598
|
+
|
5599
|
+
- **Content-Type**: multipart/form-data
|
5600
|
+
- **Accept**: multipart/form-data
|
5601
|
+
|
5602
|
+
|
5603
|
+
|
5548
5604
|
# **post_import_fields_from_fdf**
|
5549
5605
|
> AsposeResponse post_import_fields_from_fdf(name, opts)
|
5550
5606
|
|
@@ -6458,6 +6514,32 @@ Name | Type | Description | Notes
|
|
6458
6514
|
|
6459
6515
|
|
6460
6516
|
|
6517
|
+
# **post_pdf_to_xlsx**
|
6518
|
+
> File post_pdf_to_xlsx(opts)
|
6519
|
+
|
6520
|
+
Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
6521
|
+
|
6522
|
+
### Parameters
|
6523
|
+
|
6524
|
+
Name | Type | Description | Notes
|
6525
|
+
------------- | ------------- | ------------- | -------------
|
6526
|
+
**insert_blank_column_at_first** | **BOOLEAN**| Insert blank column at first | [optional]
|
6527
|
+
**minimize_the_number_of_worksheets** | **BOOLEAN**| Minimize the number of worksheets | [optional]
|
6528
|
+
**uniform_worksheets** | **BOOLEAN**| Uniform worksheets | [optional]
|
6529
|
+
**password** | **String**| The password (Base64). | [optional]
|
6530
|
+
**file** | **File**| A file to be converted. | [optional]
|
6531
|
+
|
6532
|
+
### Return type
|
6533
|
+
|
6534
|
+
**File**
|
6535
|
+
|
6536
|
+
### HTTP request headers
|
6537
|
+
|
6538
|
+
- **Content-Type**: multipart/form-data
|
6539
|
+
- **Accept**: multipart/form-data
|
6540
|
+
|
6541
|
+
|
6542
|
+
|
6461
6543
|
# **post_popup_annotation**
|
6462
6544
|
> AsposeResponse post_popup_annotation(name, annotation_id, annotation, opts)
|
6463
6545
|
|
@@ -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.
|
@@ -16049,6 +16121,90 @@ module AsposePdfCloud
|
|
16049
16121
|
return data, status_code, headers
|
16050
16122
|
end
|
16051
16123
|
|
16124
|
+
# Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
|
16125
|
+
#
|
16126
|
+
# @param [Hash] opts the optional parameters
|
16127
|
+
# @option opts [String] :html_file_name Name of HTML file in ZIP.
|
16128
|
+
# @option opts [Float] :height Page height
|
16129
|
+
# @option opts [Float] :width Page width
|
16130
|
+
# @option opts [BOOLEAN] :is_landscape Is page landscaped
|
16131
|
+
# @option opts [Float] :margin_left Page margin left
|
16132
|
+
# @option opts [Float] :margin_bottom Page margin bottom
|
16133
|
+
# @option opts [Float] :margin_right Page margin right
|
16134
|
+
# @option opts [Float] :margin_top Page margin top
|
16135
|
+
# @return [File]
|
16136
|
+
def post_html_to_pdf(opts = {})
|
16137
|
+
@api_client.request_token_if_needed
|
16138
|
+
data, _status_code, _headers = post_html_to_pdf_with_http_info(opts)
|
16139
|
+
rescue ApiError => error
|
16140
|
+
if error.code == 401
|
16141
|
+
@api_client.request_token_if_needed
|
16142
|
+
data, _status_code, _headers = post_html_to_pdf_with_http_info(opts)
|
16143
|
+
else
|
16144
|
+
raise
|
16145
|
+
end
|
16146
|
+
return data
|
16147
|
+
end
|
16148
|
+
|
16149
|
+
# Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
|
16150
|
+
#
|
16151
|
+
# @param [Hash] opts the optional parameters
|
16152
|
+
# @option opts [String] :html_file_name Name of HTML file in ZIP.
|
16153
|
+
# @option opts [Float] :height Page height
|
16154
|
+
# @option opts [Float] :width Page width
|
16155
|
+
# @option opts [BOOLEAN] :is_landscape Is page landscaped
|
16156
|
+
# @option opts [Float] :margin_left Page margin left
|
16157
|
+
# @option opts [Float] :margin_bottom Page margin bottom
|
16158
|
+
# @option opts [Float] :margin_right Page margin right
|
16159
|
+
# @option opts [Float] :margin_top Page margin top
|
16160
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
16161
|
+
def post_html_to_pdf_with_http_info(opts = {})
|
16162
|
+
if @api_client.config.debugging
|
16163
|
+
@api_client.config.logger.debug "Calling API: PdfApi.post_html_to_pdf ..."
|
16164
|
+
end
|
16165
|
+
# resource path
|
16166
|
+
local_var_path = "/pdf/create/html"
|
16167
|
+
|
16168
|
+
# query parameters
|
16169
|
+
query_params = {}
|
16170
|
+
query_params[:'htmlFileName'] = opts[:'html_file_name'] if !opts[:'html_file_name'].nil?
|
16171
|
+
query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
|
16172
|
+
query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
|
16173
|
+
query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
|
16174
|
+
query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
|
16175
|
+
query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
|
16176
|
+
query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
|
16177
|
+
query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
|
16178
|
+
|
16179
|
+
# header parameters
|
16180
|
+
header_params = {}
|
16181
|
+
# HTTP header 'Accept' (if needed)
|
16182
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
16183
|
+
# HTTP header 'Content-Type'
|
16184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
16185
|
+
|
16186
|
+
# form parameters
|
16187
|
+
form_params = {}
|
16188
|
+
# Fix header in file
|
16189
|
+
post_body = nil
|
16190
|
+
|
16191
|
+
# http body (model)
|
16192
|
+
# Fix header in file
|
16193
|
+
# post_body = nil
|
16194
|
+
auth_names = ['JWT']
|
16195
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
16196
|
+
:header_params => header_params,
|
16197
|
+
:query_params => query_params,
|
16198
|
+
:form_params => form_params,
|
16199
|
+
:body => post_body,
|
16200
|
+
:auth_names => auth_names,
|
16201
|
+
:return_type => 'File')
|
16202
|
+
if @api_client.config.debugging
|
16203
|
+
@api_client.config.logger.debug "API called: PdfApi#post_html_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
16204
|
+
end
|
16205
|
+
return data, status_code, headers
|
16206
|
+
end
|
16207
|
+
|
16052
16208
|
# Update fields from FDF file in request.
|
16053
16209
|
#
|
16054
16210
|
# @param name The document name.
|
@@ -18983,6 +19139,82 @@ module AsposePdfCloud
|
|
18983
19139
|
return data, status_code, headers
|
18984
19140
|
end
|
18985
19141
|
|
19142
|
+
# Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
19143
|
+
#
|
19144
|
+
# @param [Hash] opts the optional parameters
|
19145
|
+
# @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first
|
19146
|
+
# @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets
|
19147
|
+
# @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets
|
19148
|
+
# @option opts [String] :password The password (Base64).
|
19149
|
+
# @option opts [File] :file A file to be converted.
|
19150
|
+
# @return [File]
|
19151
|
+
def post_pdf_to_xlsx(opts = {})
|
19152
|
+
@api_client.request_token_if_needed
|
19153
|
+
data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
|
19154
|
+
rescue ApiError => error
|
19155
|
+
if error.code == 401
|
19156
|
+
@api_client.request_token_if_needed
|
19157
|
+
data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
|
19158
|
+
else
|
19159
|
+
raise
|
19160
|
+
end
|
19161
|
+
return data
|
19162
|
+
end
|
19163
|
+
|
19164
|
+
# Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
|
19165
|
+
#
|
19166
|
+
# @param [Hash] opts the optional parameters
|
19167
|
+
# @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first
|
19168
|
+
# @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets
|
19169
|
+
# @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets
|
19170
|
+
# @option opts [String] :password The password (Base64).
|
19171
|
+
# @option opts [File] :file A file to be converted.
|
19172
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
19173
|
+
def post_pdf_to_xlsx_with_http_info(opts = {})
|
19174
|
+
if @api_client.config.debugging
|
19175
|
+
@api_client.config.logger.debug "Calling API: PdfApi.post_pdf_to_xlsx ..."
|
19176
|
+
end
|
19177
|
+
# resource path
|
19178
|
+
local_var_path = "/pdf/convert/xlsx"
|
19179
|
+
|
19180
|
+
# query parameters
|
19181
|
+
query_params = {}
|
19182
|
+
query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
|
19183
|
+
query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
|
19184
|
+
query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
|
19185
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
19186
|
+
|
19187
|
+
# header parameters
|
19188
|
+
header_params = {}
|
19189
|
+
# HTTP header 'Accept' (if needed)
|
19190
|
+
header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
|
19191
|
+
# HTTP header 'Content-Type'
|
19192
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
19193
|
+
|
19194
|
+
# form parameters
|
19195
|
+
form_params = {}
|
19196
|
+
# Fix header in file
|
19197
|
+
post_body = nil
|
19198
|
+
post_body = opts[:'file'] if !opts[:'file'].nil?
|
19199
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
19200
|
+
|
19201
|
+
# http body (model)
|
19202
|
+
# Fix header in file
|
19203
|
+
# post_body = nil
|
19204
|
+
auth_names = ['JWT']
|
19205
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
19206
|
+
:header_params => header_params,
|
19207
|
+
:query_params => query_params,
|
19208
|
+
:form_params => form_params,
|
19209
|
+
:body => post_body,
|
19210
|
+
:auth_names => auth_names,
|
19211
|
+
:return_type => 'File')
|
19212
|
+
if @api_client.config.debugging
|
19213
|
+
@api_client.config.logger.debug "API called: PdfApi#post_pdf_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
19214
|
+
end
|
19215
|
+
return data, status_code, headers
|
19216
|
+
end
|
19217
|
+
|
18986
19218
|
# Add document popup annotations.
|
18987
19219
|
#
|
18988
19220
|
# @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.5.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-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|