Skip to content

Commit bd71f74

Browse files
authored
Merge pull request #89 from aspose-pdf-cloud/develop
update to 25.4
2 parents 87104d8 + 1bcd4a1 commit bd71f74

File tree

10 files changed

+1128
-5
lines changed

10 files changed

+1128
-5
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ 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.3
32+
## Enhancements in Version 25.4
33+
- Add method for adding Stamp per page in batch.
3334
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3435

3536
## Installation
@@ -45,15 +46,15 @@ gem build aspose_pdf_cloud.gemspec
4546
Then either install the gem locally:
4647

4748
```shell
48-
gem install ./aspose_pdf_cloud-25.3.0.gem
49+
gem install ./aspose_pdf_cloud-25.4.0.gem
4950
```
50-
(for development, run `gem install --dev ./aspose_pdf_cloud-25.3.0.gem` to install the development dependencies)
51+
(for development, run `gem install --dev ./aspose_pdf_cloud-25.4.0.gem` to install the development dependencies)
5152

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

5455
Finally add this to the Gemfile:
5556

56-
gem 'aspose_pdf_cloud', '~> 25.3.0'
57+
gem 'aspose_pdf_cloud', '~> 25.4.0'
5758

5859
### Install from Git
5960

docs/ImageStampPageSpecified.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AsposePdfCloud::ImageStampPageSpecified
2+
Represents Pdf stamps.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional]
8+
**background** | **BOOLEAN** | Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top. | [optional]
9+
**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets Horizontal alignment of stamp on the page. | [optional]
10+
**opacity** | **Float** | Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0. | [optional]
11+
**rotate** | [**Rotation**](Rotation.md) | Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None. | [optional]
12+
**rotate_angle** | **Float** | Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle. | [optional]
13+
**x_indent** | **Float** | Horizontal stamp coordinate, starting from the left. | [optional]
14+
**y_indent** | **Float** | Vertical stamp coordinate, starting from the bottom. | [optional]
15+
**zoom** | **Float** | Zooming factor of the stamp. Allows to scale stamp. | [optional]
16+
**file_name** | **String** | Gets or sets the file name. | [optional]
17+
**width** | **Float** | Gets or sets image width. Setting this property allos to scal image horizontally. | [optional]
18+
**height** | **Float** | Gets or sets image height. Setting this image allows to scale image vertically. | [optional]
19+
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets or sets vertical alignment of stamp on page. | [optional]
20+
**bottom_margin** | **Float** | Gets or sets bottom margin of stamp. | [optional]
21+
**left_margin** | **Float** | Gets or sets left margin of stamp. | [optional]
22+
**top_margin** | **Float** | Gets or sets top margin of stamp. | [optional]
23+
**right_margin** | **Float** | Gets or sets right margin of stamp. | [optional]
24+
**page_number** | **Integer** | Page number. |
25+
26+

docs/PdfApi.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,13 @@ Method | HTTP request | Description
209209
[**post_document_image_footer**](PdfApi.md#post_document_image_footer) | **POST** /pdf/\{name}/footer/image | Add document image footer.
210210
[**post_document_image_header**](PdfApi.md#post_document_image_header) | **POST** /pdf/\{name}/header/image | Add document image header.
211211
[**post_document_image_stamps**](PdfApi.md#post_document_image_stamps) | **POST** /pdf/\{name}/stamps/image | Add document pages image stamps.
212+
[**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.
212213
[**post_document_page_number_stamps**](PdfApi.md#post_document_page_number_stamps) | **POST** /pdf/\{name}/stamps/pagenumber | Add document page number stamps.
213214
[**post_document_text_footer**](PdfApi.md#post_document_text_footer) | **POST** /pdf/\{name}/footer/text | Add document text footer.
214215
[**post_document_text_header**](PdfApi.md#post_document_text_header) | **POST** /pdf/\{name}/header/text | Add document text header.
215216
[**post_document_text_replace**](PdfApi.md#post_document_text_replace) | **POST** /pdf/\{name}/text/replace | Document's replace text method.
216217
[**post_document_text_stamps**](PdfApi.md#post_document_text_stamps) | **POST** /pdf/\{name}/stamps/text | Add document pages text stamps.
218+
[**post_document_text_stamps_page_specified**](PdfApi.md#post_document_text_stamps_page_specified) | **POST** /pdf/\{name}/stamps/text/pagespecified | Add document text stamps to specified pages.
217219
[**post_encrypt_document_in_storage**](PdfApi.md#post_encrypt_document_in_storage) | **POST** /pdf/\{name}/encrypt | Encrypt document in storage.
218220
[**post_flatten_document**](PdfApi.md#post_flatten_document) | **POST** /pdf/\{name}/flatten | Flatten the document.
219221
[**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.
@@ -5572,6 +5574,32 @@ Name | Type | Description | Notes
55725574

55735575

55745576

5577+
# **post_document_image_stamps_page_specified**
5578+
> AsposeResponse post_document_image_stamps_page_specified(name, stamps, opts)
5579+
5580+
Add document image stamps to specified pages.
5581+
5582+
### Parameters
5583+
5584+
Name | Type | Description | Notes
5585+
------------- | ------------- | ------------- | -------------
5586+
**name** | **String**| The document name. |
5587+
**stamps** | [**Array<ImageStampPageSpecified>**](ImageStampPageSpecified.md)| The array of stamps. |
5588+
**storage** | **String**| The document storage. | [optional]
5589+
**folder** | **String**| The document folder. | [optional]
5590+
**password** | **String**| Base64 encoded password. | [optional]
5591+
5592+
### Return type
5593+
5594+
[**AsposeResponse**](AsposeResponse.md)
5595+
5596+
### HTTP request headers
5597+
5598+
- **Content-Type**: application/json
5599+
- **Accept**: application/json
5600+
5601+
5602+
55755603
# **post_document_page_number_stamps**
55765604
> AsposeResponse post_document_page_number_stamps(name, stamp, opts)
55775605
@@ -5705,6 +5733,32 @@ Name | Type | Description | Notes
57055733

57065734

57075735

5736+
# **post_document_text_stamps_page_specified**
5737+
> AsposeResponse post_document_text_stamps_page_specified(name, stamps, opts)
5738+
5739+
Add document text stamps to specified pages.
5740+
5741+
### Parameters
5742+
5743+
Name | Type | Description | Notes
5744+
------------- | ------------- | ------------- | -------------
5745+
**name** | **String**| The document name. |
5746+
**stamps** | [**Array<TextStampPageSpecified>**](TextStampPageSpecified.md)| The array of stamps. |
5747+
**storage** | **String**| The document storage. | [optional]
5748+
**folder** | **String**| The document folder. | [optional]
5749+
**password** | **String**| Base64 encoded password. | [optional]
5750+
5751+
### Return type
5752+
5753+
[**AsposeResponse**](AsposeResponse.md)
5754+
5755+
### HTTP request headers
5756+
5757+
- **Content-Type**: application/json
5758+
- **Accept**: application/json
5759+
5760+
5761+
57085762
# **post_encrypt_document_in_storage**
57095763
> AsposeResponse post_encrypt_document_in_storage(name, user_password, owner_password, crypto_algorithm, opts)
57105764

docs/TextStampPageSpecified.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AsposePdfCloud::TextStampPageSpecified
2+
Represents Pdf stamps.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional]
8+
**background** | **BOOLEAN** | Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top. | [optional]
9+
**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets Horizontal alignment of stamp on the page. | [optional]
10+
**opacity** | **Float** | Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0. | [optional]
11+
**rotate** | [**Rotation**](Rotation.md) | Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None. | [optional]
12+
**rotate_angle** | **Float** | Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle. | [optional]
13+
**x_indent** | **Float** | Horizontal stamp coordinate, starting from the left. | [optional]
14+
**y_indent** | **Float** | Vertical stamp coordinate, starting from the bottom. | [optional]
15+
**zoom** | **Float** | Zooming factor of the stamp. Allows to scale stamp. | [optional]
16+
**text_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Alignment of the text inside the stamp. | [optional]
17+
**value** | **String** | Gets or sets string value which is used as stamp on the page. | [optional]
18+
**text_state** | [**TextState**](TextState.md) | Gets text properties of the stamp. See TextState for details. | [optional]
19+
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets or sets vertical alignment of stamp on page. | [optional]
20+
**bottom_margin** | **Float** | Gets or sets bottom margin of stamp. | [optional]
21+
**left_margin** | **Float** | Gets or sets left margin of stamp. | [optional]
22+
**top_margin** | **Float** | Gets or sets top margin of stamp. | [optional]
23+
**right_margin** | **Float** | Gets or sets right margin of stamp. | [optional]
24+
**page_number** | **Integer** | Page number. |
25+
26+

lib/aspose_pdf_cloud.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
require_relative 'aspose_pdf_cloud/models/file_attachment_annotation'
301301
require_relative 'aspose_pdf_cloud/models/free_text_annotation'
302302
require_relative 'aspose_pdf_cloud/models/highlight_annotation'
303+
require_relative 'aspose_pdf_cloud/models/image_stamp_page_specified'
303304
require_relative 'aspose_pdf_cloud/models/ink_annotation'
304305
require_relative 'aspose_pdf_cloud/models/line_annotation'
305306
require_relative 'aspose_pdf_cloud/models/list_box_field'
@@ -311,6 +312,7 @@
311312
require_relative 'aspose_pdf_cloud/models/stamp_annotation'
312313
require_relative 'aspose_pdf_cloud/models/strike_out_annotation'
313314
require_relative 'aspose_pdf_cloud/models/text_annotation'
315+
require_relative 'aspose_pdf_cloud/models/text_stamp_page_specified'
314316
require_relative 'aspose_pdf_cloud/models/underline_annotation'
315317
require_relative 'aspose_pdf_cloud/models/circle_annotation'
316318
require_relative 'aspose_pdf_cloud/models/poly_line_annotation'

lib/aspose_pdf_cloud/api/pdf_api.rb

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16083,6 +16083,86 @@ def post_document_image_stamps_with_http_info(name, stamps, opts = {})
1608316083
return data, status_code, headers
1608416084
end
1608516085

16086+
# Add document image stamps to specified pages.
16087+
#
16088+
# @param name The document name.
16089+
# @param stamps The array of stamps.
16090+
# @param [Hash] opts the optional parameters
16091+
# @option opts [String] :storage The document storage.
16092+
# @option opts [String] :folder The document folder.
16093+
# @option opts [String] :password Base64 encoded password.
16094+
# @return [AsposeResponse]
16095+
def post_document_image_stamps_page_specified(name, stamps, opts = {})
16096+
@api_client.request_token_if_needed
16097+
data, _status_code, _headers = post_document_image_stamps_page_specified_with_http_info(name, stamps, opts)
16098+
rescue ApiError => error
16099+
if error.code == 401
16100+
@api_client.request_token_if_needed
16101+
data, _status_code, _headers = post_document_image_stamps_page_specified_with_http_info(name, stamps, opts)
16102+
else
16103+
raise
16104+
end
16105+
return data
16106+
end
16107+
16108+
# Add document image stamps to specified pages.
16109+
#
16110+
# @param name The document name.
16111+
# @param stamps The array of stamps.
16112+
# @param [Hash] opts the optional parameters
16113+
# @option opts [String] :storage The document storage.
16114+
# @option opts [String] :folder The document folder.
16115+
# @option opts [String] :password Base64 encoded password.
16116+
# @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
16117+
def post_document_image_stamps_page_specified_with_http_info(name, stamps, opts = {})
16118+
if @api_client.config.debugging
16119+
@api_client.config.logger.debug "Calling API: PdfApi.post_document_image_stamps_page_specified ..."
16120+
end
16121+
# verify the required parameter 'name' is set
16122+
if @api_client.config.client_side_validation && name.nil?
16123+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_image_stamps_page_specified"
16124+
end
16125+
# verify the required parameter 'stamps' is set
16126+
if @api_client.config.client_side_validation && stamps.nil?
16127+
fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_document_image_stamps_page_specified"
16128+
end
16129+
# resource path
16130+
local_var_path = "/pdf/{name}/stamps/image/pagespecified".sub('{' + 'name' + '}', name.to_s)
16131+
16132+
# query parameters
16133+
query_params = {}
16134+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
16135+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
16136+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16137+
16138+
# header parameters
16139+
header_params = {}
16140+
# HTTP header 'Accept' (if needed)
16141+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16142+
# HTTP header 'Content-Type'
16143+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
16144+
16145+
# form parameters
16146+
form_params = {}
16147+
# Fix header in file
16148+
post_body = nil
16149+
16150+
# http body (model)
16151+
post_body = @api_client.object_to_http_body(stamps)
16152+
auth_names = ['JWT']
16153+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
16154+
:header_params => header_params,
16155+
:query_params => query_params,
16156+
:form_params => form_params,
16157+
:body => post_body,
16158+
:auth_names => auth_names,
16159+
:return_type => 'AsposeResponse')
16160+
if @api_client.config.debugging
16161+
@api_client.config.logger.debug "API called: PdfApi#post_document_image_stamps_page_specified\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16162+
end
16163+
return data, status_code, headers
16164+
end
16165+
1608616166
# Add document page number stamps.
1608716167
#
1608816168
# @param name The document name.
@@ -16492,6 +16572,86 @@ def post_document_text_stamps_with_http_info(name, stamps, opts = {})
1649216572
return data, status_code, headers
1649316573
end
1649416574

16575+
# Add document text stamps to specified pages.
16576+
#
16577+
# @param name The document name.
16578+
# @param stamps The array of stamps.
16579+
# @param [Hash] opts the optional parameters
16580+
# @option opts [String] :storage The document storage.
16581+
# @option opts [String] :folder The document folder.
16582+
# @option opts [String] :password Base64 encoded password.
16583+
# @return [AsposeResponse]
16584+
def post_document_text_stamps_page_specified(name, stamps, opts = {})
16585+
@api_client.request_token_if_needed
16586+
data, _status_code, _headers = post_document_text_stamps_page_specified_with_http_info(name, stamps, opts)
16587+
rescue ApiError => error
16588+
if error.code == 401
16589+
@api_client.request_token_if_needed
16590+
data, _status_code, _headers = post_document_text_stamps_page_specified_with_http_info(name, stamps, opts)
16591+
else
16592+
raise
16593+
end
16594+
return data
16595+
end
16596+
16597+
# Add document text stamps to specified pages.
16598+
#
16599+
# @param name The document name.
16600+
# @param stamps The array of stamps.
16601+
# @param [Hash] opts the optional parameters
16602+
# @option opts [String] :storage The document storage.
16603+
# @option opts [String] :folder The document folder.
16604+
# @option opts [String] :password Base64 encoded password.
16605+
# @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
16606+
def post_document_text_stamps_page_specified_with_http_info(name, stamps, opts = {})
16607+
if @api_client.config.debugging
16608+
@api_client.config.logger.debug "Calling API: PdfApi.post_document_text_stamps_page_specified ..."
16609+
end
16610+
# verify the required parameter 'name' is set
16611+
if @api_client.config.client_side_validation && name.nil?
16612+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_stamps_page_specified"
16613+
end
16614+
# verify the required parameter 'stamps' is set
16615+
if @api_client.config.client_side_validation && stamps.nil?
16616+
fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_document_text_stamps_page_specified"
16617+
end
16618+
# resource path
16619+
local_var_path = "/pdf/{name}/stamps/text/pagespecified".sub('{' + 'name' + '}', name.to_s)
16620+
16621+
# query parameters
16622+
query_params = {}
16623+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
16624+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
16625+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
16626+
16627+
# header parameters
16628+
header_params = {}
16629+
# HTTP header 'Accept' (if needed)
16630+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16631+
# HTTP header 'Content-Type'
16632+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
16633+
16634+
# form parameters
16635+
form_params = {}
16636+
# Fix header in file
16637+
post_body = nil
16638+
16639+
# http body (model)
16640+
post_body = @api_client.object_to_http_body(stamps)
16641+
auth_names = ['JWT']
16642+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
16643+
:header_params => header_params,
16644+
:query_params => query_params,
16645+
:form_params => form_params,
16646+
:body => post_body,
16647+
:auth_names => auth_names,
16648+
:return_type => 'AsposeResponse')
16649+
if @api_client.config.debugging
16650+
@api_client.config.logger.debug "API called: PdfApi#post_document_text_stamps_page_specified\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16651+
end
16652+
return data, status_code, headers
16653+
end
16654+
1649516655
# Encrypt document in storage.
1649616656
#
1649716657
# @param name Document name.

0 commit comments

Comments
 (0)