Skip to content

Commit ea8eaf0

Browse files
authored
Merge pull request #72 from aspose-pdf-cloud/develop
update to 24.4
2 parents 0ea8ada + a63ba5f commit ea8eaf0

File tree

4 files changed

+222
-34
lines changed

4 files changed

+222
-34
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
2929
## Read PDF Formats
3030
MHT, PCL, PS, XSLFO, MD
3131

32-
## Enhancements in Version 24.3
32+
## Enhancements in Version 24.4
33+
- Convert PDF to optimized Text.
34+
- Convert PDF to EXCEL without Cloud Storage.
3335
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3436

3537
## Installation

docs/PdfApi.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Method | HTTP request | Description
153153
[**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
154154
[**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
155155
[**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
156157
[**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
157158
[**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
158159
[**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
243244
[**post_page_text_replace**](PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method.
244245
[**post_page_text_stamps**](PdfApi.md#post_page_text_stamps) | **POST** /pdf/\{name}/pages/\{pageNumber}/stamps/text | Add document page text stamps.
245246
[**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.
246248
[**post_popup_annotation**](PdfApi.md#post_popup_annotation) | **POST** /pdf/\{name}/annotations/\{annotationId}/popup | Add document popup annotations.
247249
[**post_radio_button_fields**](PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
248250
[**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
@@ -4120,6 +4122,30 @@ Name | Type | Description | Notes
41204122

41214123

41224124

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+
41234149
# **get_pdf_in_storage_to_tiff**
41244150
> File get_pdf_in_storage_to_tiff(name, opts)
41254151
@@ -6458,6 +6484,32 @@ Name | Type | Description | Notes
64586484

64596485

64606486

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+
64616513
# **post_popup_annotation**
64626514
> AsposeResponse post_popup_annotation(name, annotation_id, annotation, opts)
64636515

lib/aspose_pdf_cloud/api/pdf_api.rb

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11608,6 +11608,78 @@ def get_pdf_in_storage_to_te_x_with_http_info(name, opts = {})
1160811608
return data, status_code, headers
1160911609
end
1161011610

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+
1161111683
# Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
1161211684
#
1161311685
# @param name The document name.
@@ -18983,6 +19055,82 @@ def post_page_underline_annotations_with_http_info(name, page_number, annotation
1898319055
return data, status_code, headers
1898419056
end
1898519057

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+
1898619134
# Add document popup annotations.
1898719135
#
1898819136
# @param name The document name.

0 commit comments

Comments
 (0)