Skip to content

Commit cc6695a

Browse files
authored
Merge pull request #93 from aspose-pdf-cloud/develop
update to 25.8
2 parents acb1a75 + a844e06 commit cc6695a

File tree

5 files changed

+143
-8
lines changed

5 files changed

+143
-8
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +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 25.7
33-
- Add possibility to hide subject field in signature appearance.
32+
## Enhancements in Version 25.8
33+
- Implement document page resize functionality using the Pdf.Cloud API library.
3434
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3535

36-
## Bugs fixed in Version 25.7
37-
- PostDeleteStamps removing stamps from PDF page is incorrect.
36+
## Bugs fixed in Version 25.8
37+
- Implement delete watermark from PDF document using the Pdf.Cloud API library.
3838

3939
## Installation
4040

@@ -49,15 +49,15 @@ gem build aspose_pdf_cloud.gemspec
4949
Then either install the gem locally:
5050

5151
```shell
52-
gem install ./aspose_pdf_cloud-25.7.0.gem
52+
gem install ./aspose_pdf_cloud-25.8.0.gem
5353
```
54-
(for development, run `gem install --dev ./aspose_pdf_cloud-25.7.0.gem` to install the development dependencies)
54+
(for development, run `gem install --dev ./aspose_pdf_cloud-25.8.0.gem` to install the development dependencies)
5555

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

5858
Finally add this to the Gemfile:
5959

60-
gem 'aspose_pdf_cloud', '~> 25.7.0'
60+
gem 'aspose_pdf_cloud', '~> 25.8.0'
6161

6262
### Install from Git
6363

docs/PdfApi.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Method | HTTP request | Description
212212
[**post_document_image_stamps**](PdfApi.md#post_document_image_stamps) | **POST** /pdf/\{name}/stamps/image | Add document pages image stamps.
213213
[**post_document_image_stamps_page_specified**](PdfApi.md#post_document_image_stamps_page_specified) | **POST** /pdf/\{name}/stamps/image/pagespecified | Add document image stamps to specified pages.
214214
[**post_document_page_number_stamps**](PdfApi.md#post_document_page_number_stamps) | **POST** /pdf/\{name}/stamps/pagenumber | Add document page number stamps.
215+
[**post_document_pages_resize**](PdfApi.md#post_document_pages_resize) | **POST** /pdf/\{name}/resize | Rsize PDF document.
215216
[**post_document_pages_rotate**](PdfApi.md#post_document_pages_rotate) | **POST** /pdf/\{name}/rotate | Rotate PDF document.
216217
[**post_document_text_footer**](PdfApi.md#post_document_text_footer) | **POST** /pdf/\{name}/footer/text | Add document text footer.
217218
[**post_document_text_header**](PdfApi.md#post_document_text_header) | **POST** /pdf/\{name}/header/text | Add document text header.
@@ -5661,6 +5662,34 @@ Name | Type | Description | Notes
56615662

56625663

56635664

5665+
# **post_document_pages_resize**
5666+
> AsposeResponse post_document_pages_resize(name, height, width, pages, opts)
5667+
5668+
Rsize PDF document.
5669+
5670+
### Parameters
5671+
5672+
Name | Type | Description | Notes
5673+
------------- | ------------- | ------------- | -------------
5674+
**name** | **String**| The document name. |
5675+
**height** | **Float**| Page Height |
5676+
**width** | **Float**| Page width |
5677+
**pages** | **String**| Comma separated list of pages and page ranges. (Example: 1,3-5,8) |
5678+
**storage** | **String**| The document storage. | [optional]
5679+
**folder** | **String**| The document folder. | [optional]
5680+
**password** | **String**| Base64 encoded password. | [optional]
5681+
5682+
### Return type
5683+
5684+
[**AsposeResponse**](AsposeResponse.md)
5685+
5686+
### HTTP request headers
5687+
5688+
- **Content-Type**: application/json
5689+
- **Accept**: application/json
5690+
5691+
5692+
56645693
# **post_document_pages_rotate**
56655694
> AsposeResponse post_document_pages_rotate(name, rotation_angle, pages, opts)
56665695

lib/aspose_pdf_cloud/api/pdf_api.rb

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16351,6 +16351,102 @@ def post_document_page_number_stamps_with_http_info(name, stamp, opts = {})
1635116351
return data, status_code, headers
1635216352
end
1635316353

16354+
# Rsize PDF document.
16355+
#
16356+
# @param name The document name.
16357+
# @param height Page Height
16358+
# @param width Page width
16359+
# @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16360+
# @param [Hash] opts the optional parameters
16361+
# @option opts [String] :storage The document storage.
16362+
# @option opts [String] :folder The document folder.
16363+
# @option opts [String] :password Base64 encoded password.
16364+
# @return [AsposeResponse]
16365+
def post_document_pages_resize(name, height, width, pages, opts = {})
16366+
@api_client.request_token_if_needed
16367+
data, _status_code, _headers = post_document_pages_resize_with_http_info(name, height, width, pages, opts)
16368+
rescue ApiError => error
16369+
if error.code == 401
16370+
@api_client.request_token_if_needed
16371+
data, _status_code, _headers = post_document_pages_resize_with_http_info(name, height, width, pages, opts)
16372+
else
16373+
raise
16374+
end
16375+
return data
16376+
end
16377+
16378+
# Rsize PDF document.
16379+
#
16380+
# @param name The document name.
16381+
# @param height Page Height
16382+
# @param width Page width
16383+
# @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
16384+
# @param [Hash] opts the optional parameters
16385+
# @option opts [String] :storage The document storage.
16386+
# @option opts [String] :folder The document folder.
16387+
# @option opts [String] :password Base64 encoded password.
16388+
# @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
16389+
def post_document_pages_resize_with_http_info(name, height, width, pages, opts = {})
16390+
if @api_client.config.debugging
16391+
@api_client.config.logger.debug "Calling API: PdfApi.post_document_pages_resize ..."
16392+
end
16393+
# verify the required parameter 'name' is set
16394+
if @api_client.config.client_side_validation && name.nil?
16395+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_pages_resize"
16396+
end
16397+
# verify the required parameter 'height' is set
16398+
if @api_client.config.client_side_validation && height.nil?
16399+
fail ArgumentError, "Missing the required parameter 'height' when calling PdfApi.post_document_pages_resize"
16400+
end
16401+
# verify the required parameter 'width' is set
16402+
if @api_client.config.client_side_validation && width.nil?
16403+
fail ArgumentError, "Missing the required parameter 'width' when calling PdfApi.post_document_pages_resize"
16404+
end
16405+
# verify the required parameter 'pages' is set
16406+
if @api_client.config.client_side_validation && pages.nil?
16407+
fail ArgumentError, "Missing the required parameter 'pages' when calling PdfApi.post_document_pages_resize"
16408+
end
16409+
# resource path
16410+
local_var_path = "/pdf/{name}/resize".sub('{' + 'name' + '}', name.to_s)
16411+
16412+
# query parameters
16413+
query_params = {}
16414+
query_params[:'height'] = height
16415+
query_params[:'width'] = width
16416+
query_params[:'pages'] = pages
16417+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
16418+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
16419+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16420+
16421+
# header parameters
16422+
header_params = {}
16423+
# HTTP header 'Accept' (if needed)
16424+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16425+
# HTTP header 'Content-Type'
16426+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
16427+
16428+
# form parameters
16429+
form_params = {}
16430+
# Fix header in file
16431+
post_body = nil
16432+
16433+
# http body (model)
16434+
# Fix header in file
16435+
# post_body = nil
16436+
auth_names = ['JWT']
16437+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
16438+
:header_params => header_params,
16439+
:query_params => query_params,
16440+
:form_params => form_params,
16441+
:body => post_body,
16442+
:auth_names => auth_names,
16443+
:return_type => 'AsposeResponse')
16444+
if @api_client.config.debugging
16445+
@api_client.config.logger.debug "API called: PdfApi#post_document_pages_resize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16446+
end
16447+
return data, status_code, headers
16448+
end
16449+
1635416450
# Rotate PDF document.
1635516451
#
1635616452
# @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 = "25.7.0"
23+
VERSION = "25.8.0"
2424
end

test/pdf_tests.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6786,4 +6786,14 @@ def test_post_document_pages_rotate
67866786
response = @pdf_api.post_document_pages_rotate(file_name, Rotation::ON90, '2-3', opts)
67876787
assert(response, 'Failed to organize document.')
67886788
end
6789+
6790+
def test_post_document_pages_resize
6791+
file_name = '4pages.pdf'
6792+
upload_file(file_name)
6793+
opts = {
6794+
folder: @temp_folder
6795+
}
6796+
response = @pdf_api.post_document_pages_resize(file_name, 100, 200, '2-3', opts)
6797+
assert(response, 'Failed to organize document.')
6798+
end
67896799
end

0 commit comments

Comments
 (0)