Skip to content

Commit 7b3fe0c

Browse files
authored
Merge pull request #79 from aspose-pdf-cloud/develop
update to 24.11
2 parents e8fbea3 + db6633b commit 7b3fe0c

File tree

11 files changed

+376
-20
lines changed

11 files changed

+376
-20
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,10 @@ 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.10
33-
- Develop a method to add XMP metadata.
34-
- Develop a method to obtain XMP metadata in the XML form.
35-
- Develop a method to obtain XMP metadata in the JSON form.
32+
## Enhancements in Version 24.11
33+
- Add DocRecognitionMode EnhancedFlow mode.
3634
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3735

38-
## Bugs fixed in Version 24.10
39-
- PDF XFA form to Acro from conversion API results corrupt PDF.
40-
4136
## Installation
4237

4338
### Build a gem
@@ -51,15 +46,15 @@ gem build aspose_pdf_cloud.gemspec
5146
Then either install the gem locally:
5247

5348
```shell
54-
gem install ./aspose_pdf_cloud-24.10.0.gem
49+
gem install ./aspose_pdf_cloud-24.11.0.gem
5550
```
56-
(for development, run `gem install --dev ./aspose_pdf_cloud-24.10.0.gem` to install the development dependencies)
51+
(for development, run `gem install --dev ./aspose_pdf_cloud-24.11.0.gem` to install the development dependencies)
5752

5853
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
5954

6055
Finally add this to the Gemfile:
6156

62-
gem 'aspose_pdf_cloud', '~> 24.10.0'
57+
gem 'aspose_pdf_cloud', '~> 24.11.0'
6358

6459
### Install from Git
6560

docs/DocRecognitionMode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Value | Description
66
------------ | ------------- | ------------- | -------------
77
**TEXTBOX** | **String** | 'Textbox' | This mode is fast and good for maximally preserving original look of the PDF file, but editability of the resulting document could be limited.Every visually grouped block of text int the original PDF file is converted into a textbox in the resulting document. This achieves maximal resemblance of the output document to the original PDF file. The output document will look good, but it will consist entirely of textboxes and it could makes further editing of the document in Microsoft Word quite hard.This is the default mode.
88
**FLOW** | **String** | 'Flow' | Full recognition mode, the engine performs grouping and multi-level analysis to restore the original document author's intent and produce a maximally editable document. The downside is that the output document might look different from the original PDF file.
9+
**ENHANCED_FLOW** | **String** | 'EnhancedFlow' | An alternative Flow mode that supports the recognition of tables.
910

1011

1112

docs/PdfApi.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Method | HTTP request | Description
9595
[**get_image_extract_as_png**](PdfApi.md#get_image_extract_as_png) | **GET** /pdf/\{name}/images/\{imageId}/extract/png | Extract document image in PNG format
9696
[**get_image_extract_as_tiff**](PdfApi.md#get_image_extract_as_tiff) | **GET** /pdf/\{name}/images/\{imageId}/extract/tiff | Extract document image in TIFF format
9797
[**get_images**](PdfApi.md#get_images) | **GET** /pdf/\{name}/pages/\{pageNumber}/images | Read document images.
98+
[**get_images_extract_svg**](PdfApi.md#get_images_extract_svg) | **GET** /pdf/\{name}/pages/\{pageNumber}/images/extract/svg | Extract SVG images from document page.
9899
[**get_import_fields_from_fdf_in_storage**](PdfApi.md#get_import_fields_from_fdf_in_storage) | **GET** /pdf/\{name}/import/fdf | Update fields from FDF file in storage.
99100
[**get_import_fields_from_xfdf_in_storage**](PdfApi.md#get_import_fields_from_xfdf_in_storage) | **GET** /pdf/\{name}/import/xfdf | Update fields from XFDF file in storage.
100101
[**get_import_fields_from_xml_in_storage**](PdfApi.md#get_import_fields_from_xml_in_storage) | **GET** /pdf/\{name}/import/xml | Import from XML file (located on storage) to PDF format and return resulting file in response.
@@ -2626,6 +2627,32 @@ Name | Type | Description | Notes
26262627

26272628

26282629

2630+
# **get_images_extract_svg**
2631+
> SvgImages get_images_extract_svg(name, page_number, opts)
2632+
2633+
Extract SVG images from document page.
2634+
2635+
### Parameters
2636+
2637+
Name | Type | Description | Notes
2638+
------------- | ------------- | ------------- | -------------
2639+
**name** | **String**| The document name. |
2640+
**page_number** | **Integer**| The page number. |
2641+
**storage** | **String**| The document storage. | [optional]
2642+
**folder** | **String**| The document folder. | [optional]
2643+
**pass_base64** | **String**| The password (Base64). | [optional]
2644+
2645+
### Return type
2646+
2647+
[**SvgImages**](SvgImages.md)
2648+
2649+
### HTTP request headers
2650+
2651+
- **Content-Type**: application/json
2652+
- **Accept**: application/json
2653+
2654+
2655+
26292656
# **get_import_fields_from_fdf_in_storage**
26302657
> File get_import_fields_from_fdf_in_storage(name, fdf_file_path, opts)
26312658

docs/SvgImages.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AsposePdfCloud::SvgImages
2+
SvgImages class
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**code** | **Integer** | Response status code. |
8+
**status** | **String** | Response status. | [optional]
9+
**list** | **Array<String>** | List of SVG images | [optional]
10+
11+

lib/aspose_pdf_cloud.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
require_relative 'aspose_pdf_cloud/models/strike_out_annotation_response'
258258
require_relative 'aspose_pdf_cloud/models/strike_out_annotations'
259259
require_relative 'aspose_pdf_cloud/models/strike_out_annotations_response'
260+
require_relative 'aspose_pdf_cloud/models/svg_images'
260261
require_relative 'aspose_pdf_cloud/models/table'
261262
require_relative 'aspose_pdf_cloud/models/table_recognized'
262263
require_relative 'aspose_pdf_cloud/models/table_recognized_response'

lib/aspose_pdf_cloud/api/pdf_api.rb

Lines changed: 87 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6893,6 +6893,87 @@ def get_images_with_http_info(name, page_number, opts = {})
68936893
return data, status_code, headers
68946894
end
68956895

6896+
# Extract SVG images from document page.
6897+
#
6898+
# @param name The document name.
6899+
# @param page_number The page number.
6900+
# @param [Hash] opts the optional parameters
6901+
# @option opts [String] :storage The document storage.
6902+
# @option opts [String] :folder The document folder.
6903+
# @option opts [String] :pass_base64 The password (Base64).
6904+
# @return [SvgImages]
6905+
def get_images_extract_svg(name, page_number, opts = {})
6906+
@api_client.request_token_if_needed
6907+
data, _status_code, _headers = get_images_extract_svg_with_http_info(name, page_number, opts)
6908+
rescue ApiError => error
6909+
if error.code == 401
6910+
@api_client.request_token_if_needed
6911+
data, _status_code, _headers = get_images_extract_svg_with_http_info(name, page_number, opts)
6912+
else
6913+
raise
6914+
end
6915+
return data
6916+
end
6917+
6918+
# Extract SVG images from document page.
6919+
#
6920+
# @param name The document name.
6921+
# @param page_number The page number.
6922+
# @param [Hash] opts the optional parameters
6923+
# @option opts [String] :storage The document storage.
6924+
# @option opts [String] :folder The document folder.
6925+
# @option opts [String] :pass_base64 The password (Base64).
6926+
# @return [Array<(SvgImages, Fixnum, Hash)>] SvgImages data, response status code and response headers
6927+
def get_images_extract_svg_with_http_info(name, page_number, opts = {})
6928+
if @api_client.config.debugging
6929+
@api_client.config.logger.debug "Calling API: PdfApi.get_images_extract_svg ..."
6930+
end
6931+
# verify the required parameter 'name' is set
6932+
if @api_client.config.client_side_validation && name.nil?
6933+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_images_extract_svg"
6934+
end
6935+
# verify the required parameter 'page_number' is set
6936+
if @api_client.config.client_side_validation && page_number.nil?
6937+
fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_images_extract_svg"
6938+
end
6939+
# resource path
6940+
local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/svg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)
6941+
6942+
# query parameters
6943+
query_params = {}
6944+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
6945+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
6946+
query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?
6947+
6948+
# header parameters
6949+
header_params = {}
6950+
# HTTP header 'Accept' (if needed)
6951+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
6952+
# HTTP header 'Content-Type'
6953+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
6954+
6955+
# form parameters
6956+
form_params = {}
6957+
# Fix header in file
6958+
post_body = nil
6959+
6960+
# http body (model)
6961+
# Fix header in file
6962+
# post_body = nil
6963+
auth_names = ['JWT']
6964+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
6965+
:header_params => header_params,
6966+
:query_params => query_params,
6967+
:form_params => form_params,
6968+
:body => post_body,
6969+
:auth_names => auth_names,
6970+
:return_type => 'SvgImages')
6971+
if @api_client.config.debugging
6972+
@api_client.config.logger.debug "API called: PdfApi#get_images_extract_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
6973+
end
6974+
return data, status_code, headers
6975+
end
6976+
68966977
# Update fields from FDF file in storage.
68976978
#
68986979
# @param name The document name.
@@ -11073,8 +11154,8 @@ def get_pdf_in_storage_to_doc_with_http_info(name, opts = {})
1107311154
if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
1107411155
fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
1107511156
end
11076-
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
11077-
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
11157+
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow', 'EnhancedFlow'].include?(opts[:'mode'])
11158+
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow, EnhancedFlow'
1107811159
end
1107911160
# resource path
1108011161
local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s)
@@ -24932,8 +25013,8 @@ def put_pdf_in_request_to_doc_with_http_info(out_path, opts = {})
2493225013
if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
2493325014
fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
2493425015
end
24935-
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
24936-
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
25016+
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow', 'EnhancedFlow'].include?(opts[:'mode'])
25017+
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow, EnhancedFlow'
2493725018
end
2493825019
# resource path
2493925020
local_var_path = "/pdf/convert/doc"
@@ -26166,8 +26247,8 @@ def put_pdf_in_storage_to_doc_with_http_info(name, out_path, opts = {})
2616626247
if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
2616726248
fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
2616826249
end
26169-
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
26170-
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
26250+
if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow', 'EnhancedFlow'].include?(opts[:'mode'])
26251+
fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow, EnhancedFlow'
2617126252
end
2617226253
# resource path
2617326254
local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s)

lib/aspose_pdf_cloud/models/doc_recognition_mode.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class DocRecognitionMode
2727

2828
TEXTBOX = "Textbox".freeze
2929
FLOW = "Flow".freeze
30+
ENHANCED_FLOW = "EnhancedFlow".freeze
3031

3132
# Builds the enum from string
3233
# @param [String] The enum value in the form of the string

0 commit comments

Comments
 (0)