Skip to content

Commit 65cd5a9

Browse files
authored
Merge pull request #73 from aspose-pdf-cloud/develop
update to 24.5
2 parents ea8eaf0 + b366811 commit 65cd5a9

File tree

4 files changed

+122
-7
lines changed

4 files changed

+122
-7
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ 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.4
33-
- Convert PDF to optimized Text.
34-
- Convert PDF to EXCEL without Cloud Storage.
32+
## Enhancements in Version 24.5
3533
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3634

35+
## Bugs fixed in Version 24.5
36+
- Aspose.PDF Cloud Service Throws Bad Gateway Error intermittently.
37+
3738
## Installation
3839

3940
### Build a gem
@@ -47,15 +48,15 @@ gem build aspose_pdf_cloud.gemspec
4748
Then either install the gem locally:
4849

4950
```shell
50-
gem install ./aspose_pdf_cloud-24.3.0.gem
51+
gem install ./aspose_pdf_cloud-24.5.0.gem
5152
```
52-
(for development, run `gem install --dev ./aspose_pdf_cloud-24.3.0.gem` to install the development dependencies)
53+
(for development, run `gem install --dev ./aspose_pdf_cloud-24.5.0.gem` to install the development dependencies)
5354

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

5657
Finally add this to the Gemfile:
5758

58-
gem 'aspose_pdf_cloud', '~> 24.3.0'
59+
gem 'aspose_pdf_cloud', '~> 24.5.0'
5960

6061
### Install from Git
6162

docs/PdfApi.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ Method | HTTP request | Description
209209
[**post_document_text_replace**](PdfApi.md#post_document_text_replace) | **POST** /pdf/\{name}/text/replace | Document's replace text method.
210210
[**post_encrypt_document_in_storage**](PdfApi.md#post_encrypt_document_in_storage) | **POST** /pdf/\{name}/encrypt | Encrypt document in storage.
211211
[**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.
212213
[**post_import_fields_from_fdf**](PdfApi.md#post_import_fields_from_fdf) | **POST** /pdf/\{name}/import/fdf | Update fields from FDF file in request.
213214
[**post_import_fields_from_xfdf**](PdfApi.md#post_import_fields_from_xfdf) | **POST** /pdf/\{name}/import/xfdf | Update fields from XFDF file in request.
214215
[**post_import_fields_from_xml**](PdfApi.md#post_import_fields_from_xml) | **POST** /pdf/\{name}/import/xml | Update fields from XML file in request.
@@ -5571,6 +5572,35 @@ Name | Type | Description | Notes
55715572

55725573

55735574

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+
55745604
# **post_import_fields_from_fdf**
55755605
> AsposeResponse post_import_fields_from_fdf(name, opts)
55765606

lib/aspose_pdf_cloud/api/pdf_api.rb

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16121,6 +16121,90 @@ def post_flatten_document_with_http_info(name, opts = {})
1612116121
return data, status_code, headers
1612216122
end
1612316123

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+
1612416208
# Update fields from FDF file in request.
1612516209
#
1612616210
# @param name The document name.

lib/aspose_pdf_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
=end
2121

2222
module AsposePdfCloud
23-
VERSION = "24.3.0"
23+
VERSION = "24.5.0"
2424
end

0 commit comments

Comments
 (0)