cloudmersive-convert-api-client 2.0.7 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/docs/EditHtmlApi.md +81 -13
- data/docs/EditPdfApi.md +58 -0
- data/lib/cloudmersive-convert-api-client/api/edit_html_api.rb +81 -12
- data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +62 -0
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/edit_html_api_spec.rb +24 -6
- data/spec/api/edit_pdf_api_spec.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8263441587dc9ffed3927aa94ea1cc20fafe3f18da91562df189d2bfb70da95f
|
4
|
+
data.tar.gz: b2f44519597e04c4c6afae67320806dca0afe3637b8781a16af38b43b880ff7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 758b6e13da30eec6bd12d01a3c7444939ba256cda8e619a93c700cc157a0d17e72016146e7e6b08eeb7d7b08fa02283ac7d5dbd37ab9fd2f6bc237c377af91ad
|
7
|
+
data.tar.gz: adc51d796e5d1735ef195b51cdd8c105f073c9f6a33383f51286bc1579edabfcc23ae1b112a051a2bf36e268aad6b3190d2cfc3b09fe8d0581c3979ef7eaebb7
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 2.0.
|
10
|
+
- Package version: 2.0.8
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-convert-api-client-2.0.
|
26
|
+
gem install ./cloudmersive-convert-api-client-2.0.8.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.0.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-2.0.8.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-convert-api-client', '~> 2.0.
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 2.0.8'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -250,6 +250,7 @@ Class | Method | HTTP request | Description
|
|
250
250
|
*CloudmersiveConvertApiClient::EditHtmlApi* | [**edit_html_html_append_image_from_url**](docs/EditHtmlApi.md#edit_html_html_append_image_from_url) | **POST** /convert/edit/html/append/image/from-url | Append an Image to an HTML Document from a URL
|
251
251
|
*CloudmersiveConvertApiClient::EditHtmlApi* | [**edit_html_html_append_image_inline**](docs/EditHtmlApi.md#edit_html_html_append_image_inline) | **POST** /convert/edit/html/append/image/inline | Append a Base64 Inline Image to an HTML Document
|
252
252
|
*CloudmersiveConvertApiClient::EditHtmlApi* | [**edit_html_html_append_paragraph**](docs/EditHtmlApi.md#edit_html_html_append_paragraph) | **POST** /convert/edit/html/append/paragraph | Append a Paragraph to an HTML Document
|
253
|
+
*CloudmersiveConvertApiClient::EditHtmlApi* | [**edit_html_html_create_blank_document**](docs/EditHtmlApi.md#edit_html_html_create_blank_document) | **POST** /convert/edit/html/create/blank | Create a Blank HTML Document
|
253
254
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_add_annotations**](docs/EditPdfApi.md#edit_pdf_add_annotations) | **POST** /convert/edit/pdf/annotations/add-item | Add one or more PDF annotations, comments in the PDF document
|
254
255
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_decrypt**](docs/EditPdfApi.md#edit_pdf_decrypt) | **POST** /convert/edit/pdf/decrypt | Decrypt and password-protect a PDF
|
255
256
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_delete_pages**](docs/EditPdfApi.md#edit_pdf_delete_pages) | **POST** /convert/edit/pdf/pages/delete | Remove, delete pages from a PDF document
|
@@ -262,6 +263,7 @@ Class | Method | HTTP request | Description
|
|
262
263
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_rasterize**](docs/EditPdfApi.md#edit_pdf_rasterize) | **POST** /convert/edit/pdf/rasterize | Rasterize a PDF to an image-based PDF
|
263
264
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_remove_all_annotations**](docs/EditPdfApi.md#edit_pdf_remove_all_annotations) | **POST** /convert/edit/pdf/annotations/remove-all | Remove all PDF annotations, including comments in the document
|
264
265
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_remove_annotation_item**](docs/EditPdfApi.md#edit_pdf_remove_annotation_item) | **POST** /convert/edit/pdf/annotations/remove-item | Remove a specific PDF annotation, comment in the document
|
266
|
+
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_resize**](docs/EditPdfApi.md#edit_pdf_resize) | **POST** /convert/edit/pdf/resize | Change PDF Document's Paper Size
|
265
267
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_rotate_all_pages**](docs/EditPdfApi.md#edit_pdf_rotate_all_pages) | **POST** /convert/edit/pdf/pages/rotate/all | Rotate all pages in a PDF document
|
266
268
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_rotate_page_range**](docs/EditPdfApi.md#edit_pdf_rotate_page_range) | **POST** /convert/edit/pdf/pages/rotate/page-range | Rotate a range, subset of pages in a PDF document
|
267
269
|
*CloudmersiveConvertApiClient::EditPdfApi* | [**edit_pdf_set_form_fields**](docs/EditPdfApi.md#edit_pdf_set_form_fields) | **POST** /convert/edit/pdf/form/set-fields | Sets ands fills PDF Form field values
|
data/docs/EditHtmlApi.md
CHANGED
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
8
8
|
[**edit_html_html_append_image_from_url**](EditHtmlApi.md#edit_html_html_append_image_from_url) | **POST** /convert/edit/html/append/image/from-url | Append an Image to an HTML Document from a URL
|
9
9
|
[**edit_html_html_append_image_inline**](EditHtmlApi.md#edit_html_html_append_image_inline) | **POST** /convert/edit/html/append/image/inline | Append a Base64 Inline Image to an HTML Document
|
10
10
|
[**edit_html_html_append_paragraph**](EditHtmlApi.md#edit_html_html_append_paragraph) | **POST** /convert/edit/html/append/paragraph | Append a Paragraph to an HTML Document
|
11
|
+
[**edit_html_html_create_blank_document**](EditHtmlApi.md#edit_html_html_create_blank_document) | **POST** /convert/edit/html/create/blank | Create a Blank HTML Document
|
11
12
|
|
12
13
|
|
13
14
|
# **edit_html_html_append_heading**
|
@@ -35,8 +36,9 @@ heading_text = 'heading_text_example' # String | The text content to be used in
|
|
35
36
|
|
36
37
|
opts = {
|
37
38
|
input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
|
38
|
-
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
39
|
-
heading_size: 56 # Integer | Optional: The heading size number. Default is 1.
|
39
|
+
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
40
|
+
heading_size: 56, # Integer | Optional: The heading size number. Default is 1. Accepts values between 1 and 6.
|
41
|
+
css_style: 'css_style_example' # String | Optional: The CSS style for the heading.
|
40
42
|
}
|
41
43
|
|
42
44
|
begin
|
@@ -54,8 +56,9 @@ Name | Type | Description | Notes
|
|
54
56
|
------------- | ------------- | ------------- | -------------
|
55
57
|
**heading_text** | **String**| The text content to be used in the header. |
|
56
58
|
**input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
|
57
|
-
**input_file_url** | **String**| Optional: URL of a file to operate on as input.
|
58
|
-
**heading_size** | **Integer**| Optional: The heading size number. Default is 1. | [optional]
|
59
|
+
**input_file_url** | **String**| Optional: URL of a file to operate on as input. | [optional]
|
60
|
+
**heading_size** | **Integer**| Optional: The heading size number. Default is 1. Accepts values between 1 and 6. | [optional]
|
61
|
+
**css_style** | **String**| Optional: The CSS style for the heading. | [optional]
|
59
62
|
|
60
63
|
### Return type
|
61
64
|
|
@@ -97,7 +100,7 @@ image_url = 'image_url_example' # String | The URL for the image.
|
|
97
100
|
|
98
101
|
opts = {
|
99
102
|
input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
|
100
|
-
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
103
|
+
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
101
104
|
css_style: 'css_style_example' # String | Optional: CSS style for the image.
|
102
105
|
}
|
103
106
|
|
@@ -116,7 +119,7 @@ Name | Type | Description | Notes
|
|
116
119
|
------------- | ------------- | ------------- | -------------
|
117
120
|
**image_url** | **String**| The URL for the image. |
|
118
121
|
**input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
|
119
|
-
**input_file_url** | **String**| Optional: URL of a file to operate on as input.
|
122
|
+
**input_file_url** | **String**| Optional: URL of a file to operate on as input. | [optional]
|
120
123
|
**css_style** | **String**| Optional: CSS style for the image. | [optional]
|
121
124
|
|
122
125
|
### Return type
|
@@ -157,11 +160,11 @@ api_instance = CloudmersiveConvertApiClient::EditHtmlApi.new
|
|
157
160
|
|
158
161
|
opts = {
|
159
162
|
input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
|
160
|
-
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
163
|
+
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
161
164
|
image_file: File.new('/path/to/file.txt'), # File | Optional: Image file to be appended as base64 inline image.
|
162
165
|
image_url: 'image_url_example', # String | Optional: Image URL to be appended as base64 inline image.
|
163
166
|
css_style: 'css_style_example', # String | Optional: CSS style for the image.
|
164
|
-
image_extension: 'image_extension_example' # String | Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading
|
167
|
+
image_extension: 'image_extension_example' # String | Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading an imageFile directly, instead of using imageUrl. If no extension can be determined, will default to JPG.
|
165
168
|
}
|
166
169
|
|
167
170
|
begin
|
@@ -178,11 +181,11 @@ end
|
|
178
181
|
Name | Type | Description | Notes
|
179
182
|
------------- | ------------- | ------------- | -------------
|
180
183
|
**input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
|
181
|
-
**input_file_url** | **String**| Optional: URL of a file to operate on as input.
|
184
|
+
**input_file_url** | **String**| Optional: URL of a file to operate on as input. | [optional]
|
182
185
|
**image_file** | **File**| Optional: Image file to be appended as base64 inline image. | [optional]
|
183
186
|
**image_url** | **String**| Optional: Image URL to be appended as base64 inline image. | [optional]
|
184
187
|
**css_style** | **String**| Optional: CSS style for the image. | [optional]
|
185
|
-
**image_extension** | **String**| Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading
|
188
|
+
**image_extension** | **String**| Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading an imageFile directly, instead of using imageUrl. If no extension can be determined, will default to JPG. | [optional]
|
186
189
|
|
187
190
|
### Return type
|
188
191
|
|
@@ -194,7 +197,7 @@ Name | Type | Description | Notes
|
|
194
197
|
|
195
198
|
### HTTP request headers
|
196
199
|
|
197
|
-
- **Content-Type**:
|
200
|
+
- **Content-Type**: multipart/form-data
|
198
201
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
199
202
|
|
200
203
|
|
@@ -224,7 +227,8 @@ paragraph_text = 'paragraph_text_example' # String | The text content to be used
|
|
224
227
|
|
225
228
|
opts = {
|
226
229
|
input_file: File.new('/path/to/file.txt'), # File | Optional: Input file to perform the operation on.
|
227
|
-
input_file_url: 'input_file_url_example' # String | Optional: URL of a file to operate on as input.
|
230
|
+
input_file_url: 'input_file_url_example', # String | Optional: URL of a file to operate on as input.
|
231
|
+
css_style: 'css_style_example' # String | Optional: The CSS style for the paragraph.
|
228
232
|
}
|
229
233
|
|
230
234
|
begin
|
@@ -242,7 +246,71 @@ Name | Type | Description | Notes
|
|
242
246
|
------------- | ------------- | ------------- | -------------
|
243
247
|
**paragraph_text** | **String**| The text content to be used in the paragraph. |
|
244
248
|
**input_file** | **File**| Optional: Input file to perform the operation on. | [optional]
|
245
|
-
**input_file_url** | **String**| Optional: URL of a file to operate on as input.
|
249
|
+
**input_file_url** | **String**| Optional: URL of a file to operate on as input. | [optional]
|
250
|
+
**css_style** | **String**| Optional: The CSS style for the paragraph. | [optional]
|
251
|
+
|
252
|
+
### Return type
|
253
|
+
|
254
|
+
**String**
|
255
|
+
|
256
|
+
### Authorization
|
257
|
+
|
258
|
+
[Apikey](../README.md#Apikey)
|
259
|
+
|
260
|
+
### HTTP request headers
|
261
|
+
|
262
|
+
- **Content-Type**: Not defined
|
263
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
# **edit_html_html_create_blank_document**
|
268
|
+
> String edit_html_html_create_blank_document(opts)
|
269
|
+
|
270
|
+
Create a Blank HTML Document
|
271
|
+
|
272
|
+
Returns a blank HTML Document format file. The file is blank, with no contents by default. Use the optional input parameters to add various starting elements. Use additional editing commands such as Append Header, Append Paragraph or Append Image from URL to populate the document.
|
273
|
+
|
274
|
+
### Example
|
275
|
+
```ruby
|
276
|
+
# load the gem
|
277
|
+
require 'cloudmersive-convert-api-client'
|
278
|
+
# setup authorization
|
279
|
+
CloudmersiveConvertApiClient.configure do |config|
|
280
|
+
# Configure API key authorization: Apikey
|
281
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
282
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
283
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
284
|
+
end
|
285
|
+
|
286
|
+
api_instance = CloudmersiveConvertApiClient::EditHtmlApi.new
|
287
|
+
|
288
|
+
opts = {
|
289
|
+
title: 'title_example', # String | Optional: The title of the HTML document
|
290
|
+
css_url: 'css_url_example', # String | Optional: A CSS style URL to be added to the document.
|
291
|
+
css_inline: 'css_inline_example', # String | Optional: An inline CSS style to be added to the document.
|
292
|
+
javascript_url: 'javascript_url_example', # String | Optional: Javascript URL to be added to the document.
|
293
|
+
javascript_inline: 'javascript_inline_example' # String | Optional: Inline Javascript to be added to the document.
|
294
|
+
}
|
295
|
+
|
296
|
+
begin
|
297
|
+
#Create a Blank HTML Document
|
298
|
+
result = api_instance.edit_html_html_create_blank_document(opts)
|
299
|
+
p result
|
300
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
301
|
+
puts "Exception when calling EditHtmlApi->edit_html_html_create_blank_document: #{e}"
|
302
|
+
end
|
303
|
+
```
|
304
|
+
|
305
|
+
### Parameters
|
306
|
+
|
307
|
+
Name | Type | Description | Notes
|
308
|
+
------------- | ------------- | ------------- | -------------
|
309
|
+
**title** | **String**| Optional: The title of the HTML document | [optional]
|
310
|
+
**css_url** | **String**| Optional: A CSS style URL to be added to the document. | [optional]
|
311
|
+
**css_inline** | **String**| Optional: An inline CSS style to be added to the document. | [optional]
|
312
|
+
**javascript_url** | **String**| Optional: Javascript URL to be added to the document. | [optional]
|
313
|
+
**javascript_inline** | **String**| Optional: Inline Javascript to be added to the document. | [optional]
|
246
314
|
|
247
315
|
### Return type
|
248
316
|
|
data/docs/EditPdfApi.md
CHANGED
@@ -16,6 +16,7 @@ Method | HTTP request | Description
|
|
16
16
|
[**edit_pdf_rasterize**](EditPdfApi.md#edit_pdf_rasterize) | **POST** /convert/edit/pdf/rasterize | Rasterize a PDF to an image-based PDF
|
17
17
|
[**edit_pdf_remove_all_annotations**](EditPdfApi.md#edit_pdf_remove_all_annotations) | **POST** /convert/edit/pdf/annotations/remove-all | Remove all PDF annotations, including comments in the document
|
18
18
|
[**edit_pdf_remove_annotation_item**](EditPdfApi.md#edit_pdf_remove_annotation_item) | **POST** /convert/edit/pdf/annotations/remove-item | Remove a specific PDF annotation, comment in the document
|
19
|
+
[**edit_pdf_resize**](EditPdfApi.md#edit_pdf_resize) | **POST** /convert/edit/pdf/resize | Change PDF Document's Paper Size
|
19
20
|
[**edit_pdf_rotate_all_pages**](EditPdfApi.md#edit_pdf_rotate_all_pages) | **POST** /convert/edit/pdf/pages/rotate/all | Rotate all pages in a PDF document
|
20
21
|
[**edit_pdf_rotate_page_range**](EditPdfApi.md#edit_pdf_rotate_page_range) | **POST** /convert/edit/pdf/pages/rotate/page-range | Rotate a range, subset of pages in a PDF document
|
21
22
|
[**edit_pdf_set_form_fields**](EditPdfApi.md#edit_pdf_set_form_fields) | **POST** /convert/edit/pdf/form/set-fields | Sets ands fills PDF Form field values
|
@@ -708,6 +709,63 @@ Name | Type | Description | Notes
|
|
708
709
|
|
709
710
|
|
710
711
|
|
712
|
+
# **edit_pdf_resize**
|
713
|
+
> String edit_pdf_resize(input_file, paper_size)
|
714
|
+
|
715
|
+
Change PDF Document's Paper Size
|
716
|
+
|
717
|
+
Resizes a PDF document's paper size.
|
718
|
+
|
719
|
+
### Example
|
720
|
+
```ruby
|
721
|
+
# load the gem
|
722
|
+
require 'cloudmersive-convert-api-client'
|
723
|
+
# setup authorization
|
724
|
+
CloudmersiveConvertApiClient.configure do |config|
|
725
|
+
# Configure API key authorization: Apikey
|
726
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
727
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
728
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
729
|
+
end
|
730
|
+
|
731
|
+
api_instance = CloudmersiveConvertApiClient::EditPdfApi.new
|
732
|
+
|
733
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
734
|
+
|
735
|
+
paper_size = 'paper_size_example' # String | The desired paper size for the resized PDF document. Size ranges from A7 (smallest) to A0 (largest).
|
736
|
+
|
737
|
+
|
738
|
+
begin
|
739
|
+
#Change PDF Document's Paper Size
|
740
|
+
result = api_instance.edit_pdf_resize(input_file, paper_size)
|
741
|
+
p result
|
742
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
743
|
+
puts "Exception when calling EditPdfApi->edit_pdf_resize: #{e}"
|
744
|
+
end
|
745
|
+
```
|
746
|
+
|
747
|
+
### Parameters
|
748
|
+
|
749
|
+
Name | Type | Description | Notes
|
750
|
+
------------- | ------------- | ------------- | -------------
|
751
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
752
|
+
**paper_size** | **String**| The desired paper size for the resized PDF document. Size ranges from A7 (smallest) to A0 (largest). |
|
753
|
+
|
754
|
+
### Return type
|
755
|
+
|
756
|
+
**String**
|
757
|
+
|
758
|
+
### Authorization
|
759
|
+
|
760
|
+
[Apikey](../README.md#Apikey)
|
761
|
+
|
762
|
+
### HTTP request headers
|
763
|
+
|
764
|
+
- **Content-Type**: multipart/form-data
|
765
|
+
- **Accept**: application/octet-stream
|
766
|
+
|
767
|
+
|
768
|
+
|
711
769
|
# **edit_pdf_rotate_all_pages**
|
712
770
|
> String edit_pdf_rotate_all_pages(input_file, rotation_angle)
|
713
771
|
|
@@ -24,8 +24,9 @@ module CloudmersiveConvertApiClient
|
|
24
24
|
# @param heading_text The text content to be used in the header.
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
27
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
28
|
-
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1.
|
27
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
28
|
+
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1. Accepts values between 1 and 6.
|
29
|
+
# @option opts [String] :css_style Optional: The CSS style for the heading.
|
29
30
|
# @return [String]
|
30
31
|
def edit_html_html_append_heading(heading_text, opts = {})
|
31
32
|
data, _status_code, _headers = edit_html_html_append_heading_with_http_info(heading_text, opts)
|
@@ -37,8 +38,9 @@ module CloudmersiveConvertApiClient
|
|
37
38
|
# @param heading_text The text content to be used in the header.
|
38
39
|
# @param [Hash] opts the optional parameters
|
39
40
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
40
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
41
|
-
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1.
|
41
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
42
|
+
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1. Accepts values between 1 and 6.
|
43
|
+
# @option opts [String] :css_style Optional: The CSS style for the heading.
|
42
44
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
43
45
|
def edit_html_html_append_heading_with_http_info(heading_text, opts = {})
|
44
46
|
if @api_client.config.debugging
|
@@ -61,6 +63,7 @@ module CloudmersiveConvertApiClient
|
|
61
63
|
header_params[:'headingText'] = heading_text
|
62
64
|
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
63
65
|
header_params[:'headingSize'] = opts[:'heading_size'] if !opts[:'heading_size'].nil?
|
66
|
+
header_params[:'cssStyle'] = opts[:'css_style'] if !opts[:'css_style'].nil?
|
64
67
|
|
65
68
|
# form parameters
|
66
69
|
form_params = {}
|
@@ -86,7 +89,7 @@ module CloudmersiveConvertApiClient
|
|
86
89
|
# @param image_url The URL for the image.
|
87
90
|
# @param [Hash] opts the optional parameters
|
88
91
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
89
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
92
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
90
93
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
91
94
|
# @return [String]
|
92
95
|
def edit_html_html_append_image_from_url(image_url, opts = {})
|
@@ -99,7 +102,7 @@ module CloudmersiveConvertApiClient
|
|
99
102
|
# @param image_url The URL for the image.
|
100
103
|
# @param [Hash] opts the optional parameters
|
101
104
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
102
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
105
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
103
106
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
104
107
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
105
108
|
def edit_html_html_append_image_from_url_with_http_info(image_url, opts = {})
|
@@ -147,11 +150,11 @@ module CloudmersiveConvertApiClient
|
|
147
150
|
# Appends a base64 inline image to the end of an HTML document from an input file or URL.
|
148
151
|
# @param [Hash] opts the optional parameters
|
149
152
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
150
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
153
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
151
154
|
# @option opts [File] :image_file Optional: Image file to be appended as base64 inline image.
|
152
155
|
# @option opts [String] :image_url Optional: Image URL to be appended as base64 inline image.
|
153
156
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
154
|
-
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading
|
157
|
+
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading an imageFile directly, instead of using imageUrl. If no extension can be determined, will default to JPG.
|
155
158
|
# @return [String]
|
156
159
|
def edit_html_html_append_image_inline(opts = {})
|
157
160
|
data, _status_code, _headers = edit_html_html_append_image_inline_with_http_info(opts)
|
@@ -162,11 +165,11 @@ module CloudmersiveConvertApiClient
|
|
162
165
|
# Appends a base64 inline image to the end of an HTML document from an input file or URL.
|
163
166
|
# @param [Hash] opts the optional parameters
|
164
167
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
165
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
168
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
166
169
|
# @option opts [File] :image_file Optional: Image file to be appended as base64 inline image.
|
167
170
|
# @option opts [String] :image_url Optional: Image URL to be appended as base64 inline image.
|
168
171
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
169
|
-
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading
|
172
|
+
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading an imageFile directly, instead of using imageUrl. If no extension can be determined, will default to JPG.
|
170
173
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
171
174
|
def edit_html_html_append_image_inline_with_http_info(opts = {})
|
172
175
|
if @api_client.config.debugging
|
@@ -182,6 +185,8 @@ module CloudmersiveConvertApiClient
|
|
182
185
|
header_params = {}
|
183
186
|
# HTTP header 'Accept' (if needed)
|
184
187
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
188
|
+
# HTTP header 'Content-Type'
|
189
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
185
190
|
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
186
191
|
header_params[:'imageUrl'] = opts[:'image_url'] if !opts[:'image_url'].nil?
|
187
192
|
header_params[:'cssStyle'] = opts[:'css_style'] if !opts[:'css_style'].nil?
|
@@ -212,7 +217,8 @@ module CloudmersiveConvertApiClient
|
|
212
217
|
# @param paragraph_text The text content to be used in the paragraph.
|
213
218
|
# @param [Hash] opts the optional parameters
|
214
219
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
215
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
220
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
221
|
+
# @option opts [String] :css_style Optional: The CSS style for the paragraph.
|
216
222
|
# @return [String]
|
217
223
|
def edit_html_html_append_paragraph(paragraph_text, opts = {})
|
218
224
|
data, _status_code, _headers = edit_html_html_append_paragraph_with_http_info(paragraph_text, opts)
|
@@ -224,7 +230,8 @@ module CloudmersiveConvertApiClient
|
|
224
230
|
# @param paragraph_text The text content to be used in the paragraph.
|
225
231
|
# @param [Hash] opts the optional parameters
|
226
232
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
227
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
233
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
234
|
+
# @option opts [String] :css_style Optional: The CSS style for the paragraph.
|
228
235
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
229
236
|
def edit_html_html_append_paragraph_with_http_info(paragraph_text, opts = {})
|
230
237
|
if @api_client.config.debugging
|
@@ -246,6 +253,7 @@ module CloudmersiveConvertApiClient
|
|
246
253
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
247
254
|
header_params[:'paragraphText'] = paragraph_text
|
248
255
|
header_params[:'inputFileUrl'] = opts[:'input_file_url'] if !opts[:'input_file_url'].nil?
|
256
|
+
header_params[:'cssStyle'] = opts[:'css_style'] if !opts[:'css_style'].nil?
|
249
257
|
|
250
258
|
# form parameters
|
251
259
|
form_params = {}
|
@@ -266,5 +274,66 @@ module CloudmersiveConvertApiClient
|
|
266
274
|
end
|
267
275
|
return data, status_code, headers
|
268
276
|
end
|
277
|
+
# Create a Blank HTML Document
|
278
|
+
# Returns a blank HTML Document format file. The file is blank, with no contents by default. Use the optional input parameters to add various starting elements. Use additional editing commands such as Append Header, Append Paragraph or Append Image from URL to populate the document.
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @option opts [String] :title Optional: The title of the HTML document
|
281
|
+
# @option opts [String] :css_url Optional: A CSS style URL to be added to the document.
|
282
|
+
# @option opts [String] :css_inline Optional: An inline CSS style to be added to the document.
|
283
|
+
# @option opts [String] :javascript_url Optional: Javascript URL to be added to the document.
|
284
|
+
# @option opts [String] :javascript_inline Optional: Inline Javascript to be added to the document.
|
285
|
+
# @return [String]
|
286
|
+
def edit_html_html_create_blank_document(opts = {})
|
287
|
+
data, _status_code, _headers = edit_html_html_create_blank_document_with_http_info(opts)
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# Create a Blank HTML Document
|
292
|
+
# Returns a blank HTML Document format file. The file is blank, with no contents by default. Use the optional input parameters to add various starting elements. Use additional editing commands such as Append Header, Append Paragraph or Append Image from URL to populate the document.
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @option opts [String] :title Optional: The title of the HTML document
|
295
|
+
# @option opts [String] :css_url Optional: A CSS style URL to be added to the document.
|
296
|
+
# @option opts [String] :css_inline Optional: An inline CSS style to be added to the document.
|
297
|
+
# @option opts [String] :javascript_url Optional: Javascript URL to be added to the document.
|
298
|
+
# @option opts [String] :javascript_inline Optional: Inline Javascript to be added to the document.
|
299
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
300
|
+
def edit_html_html_create_blank_document_with_http_info(opts = {})
|
301
|
+
if @api_client.config.debugging
|
302
|
+
@api_client.config.logger.debug 'Calling API: EditHtmlApi.edit_html_html_create_blank_document ...'
|
303
|
+
end
|
304
|
+
# resource path
|
305
|
+
local_var_path = '/convert/edit/html/create/blank'
|
306
|
+
|
307
|
+
# query parameters
|
308
|
+
query_params = {}
|
309
|
+
|
310
|
+
# header parameters
|
311
|
+
header_params = {}
|
312
|
+
# HTTP header 'Accept' (if needed)
|
313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
314
|
+
header_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
|
315
|
+
header_params[:'cssUrl'] = opts[:'css_url'] if !opts[:'css_url'].nil?
|
316
|
+
header_params[:'cssInline'] = opts[:'css_inline'] if !opts[:'css_inline'].nil?
|
317
|
+
header_params[:'javascriptUrl'] = opts[:'javascript_url'] if !opts[:'javascript_url'].nil?
|
318
|
+
header_params[:'javascriptInline'] = opts[:'javascript_inline'] if !opts[:'javascript_inline'].nil?
|
319
|
+
|
320
|
+
# form parameters
|
321
|
+
form_params = {}
|
322
|
+
|
323
|
+
# http body (model)
|
324
|
+
post_body = nil
|
325
|
+
auth_names = ['Apikey']
|
326
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
327
|
+
:header_params => header_params,
|
328
|
+
:query_params => query_params,
|
329
|
+
:form_params => form_params,
|
330
|
+
:body => post_body,
|
331
|
+
:auth_names => auth_names,
|
332
|
+
:return_type => 'String')
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug "API called: EditHtmlApi#edit_html_html_create_blank_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
|
+
end
|
336
|
+
return data, status_code, headers
|
337
|
+
end
|
269
338
|
end
|
270
339
|
end
|
@@ -746,6 +746,68 @@ module CloudmersiveConvertApiClient
|
|
746
746
|
end
|
747
747
|
return data, status_code, headers
|
748
748
|
end
|
749
|
+
# Change PDF Document's Paper Size
|
750
|
+
# Resizes a PDF document's paper size.
|
751
|
+
# @param input_file Input file to perform the operation on.
|
752
|
+
# @param paper_size The desired paper size for the resized PDF document. Size ranges from A7 (smallest) to A0 (largest).
|
753
|
+
# @param [Hash] opts the optional parameters
|
754
|
+
# @return [String]
|
755
|
+
def edit_pdf_resize(input_file, paper_size, opts = {})
|
756
|
+
data, _status_code, _headers = edit_pdf_resize_with_http_info(input_file, paper_size, opts)
|
757
|
+
data
|
758
|
+
end
|
759
|
+
|
760
|
+
# Change PDF Document's Paper Size
|
761
|
+
# Resizes a PDF document's paper size.
|
762
|
+
# @param input_file Input file to perform the operation on.
|
763
|
+
# @param paper_size The desired paper size for the resized PDF document. Size ranges from A7 (smallest) to A0 (largest).
|
764
|
+
# @param [Hash] opts the optional parameters
|
765
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
766
|
+
def edit_pdf_resize_with_http_info(input_file, paper_size, opts = {})
|
767
|
+
if @api_client.config.debugging
|
768
|
+
@api_client.config.logger.debug 'Calling API: EditPdfApi.edit_pdf_resize ...'
|
769
|
+
end
|
770
|
+
# verify the required parameter 'input_file' is set
|
771
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
772
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_resize"
|
773
|
+
end
|
774
|
+
# verify the required parameter 'paper_size' is set
|
775
|
+
if @api_client.config.client_side_validation && paper_size.nil?
|
776
|
+
fail ArgumentError, "Missing the required parameter 'paper_size' when calling EditPdfApi.edit_pdf_resize"
|
777
|
+
end
|
778
|
+
# resource path
|
779
|
+
local_var_path = '/convert/edit/pdf/resize'
|
780
|
+
|
781
|
+
# query parameters
|
782
|
+
query_params = {}
|
783
|
+
|
784
|
+
# header parameters
|
785
|
+
header_params = {}
|
786
|
+
# HTTP header 'Accept' (if needed)
|
787
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
788
|
+
# HTTP header 'Content-Type'
|
789
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
790
|
+
header_params[:'paperSize'] = paper_size
|
791
|
+
|
792
|
+
# form parameters
|
793
|
+
form_params = {}
|
794
|
+
form_params['inputFile'] = input_file
|
795
|
+
|
796
|
+
# http body (model)
|
797
|
+
post_body = nil
|
798
|
+
auth_names = ['Apikey']
|
799
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
800
|
+
:header_params => header_params,
|
801
|
+
:query_params => query_params,
|
802
|
+
:form_params => form_params,
|
803
|
+
:body => post_body,
|
804
|
+
:auth_names => auth_names,
|
805
|
+
:return_type => 'String')
|
806
|
+
if @api_client.config.debugging
|
807
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_resize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
808
|
+
end
|
809
|
+
return data, status_code, headers
|
810
|
+
end
|
749
811
|
# Rotate all pages in a PDF document
|
750
812
|
# Rotate all of the pages in a PDF document by a multiple of 90 degrees
|
751
813
|
# @param input_file Input file to perform the operation on.
|
@@ -38,8 +38,9 @@ describe 'EditHtmlApi' do
|
|
38
38
|
# @param heading_text The text content to be used in the header.
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
41
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
42
|
-
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1.
|
41
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
42
|
+
# @option opts [Integer] :heading_size Optional: The heading size number. Default is 1. Accepts values between 1 and 6.
|
43
|
+
# @option opts [String] :css_style Optional: The CSS style for the heading.
|
43
44
|
# @return [String]
|
44
45
|
describe 'edit_html_html_append_heading test' do
|
45
46
|
it 'should work' do
|
@@ -53,7 +54,7 @@ describe 'EditHtmlApi' do
|
|
53
54
|
# @param image_url The URL for the image.
|
54
55
|
# @param [Hash] opts the optional parameters
|
55
56
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
56
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
57
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
57
58
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
58
59
|
# @return [String]
|
59
60
|
describe 'edit_html_html_append_image_from_url test' do
|
@@ -67,11 +68,11 @@ describe 'EditHtmlApi' do
|
|
67
68
|
# Appends a base64 inline image to the end of an HTML document from an input file or URL.
|
68
69
|
# @param [Hash] opts the optional parameters
|
69
70
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
70
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
71
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
71
72
|
# @option opts [File] :image_file Optional: Image file to be appended as base64 inline image.
|
72
73
|
# @option opts [String] :image_url Optional: Image URL to be appended as base64 inline image.
|
73
74
|
# @option opts [String] :css_style Optional: CSS style for the image.
|
74
|
-
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading
|
75
|
+
# @option opts [String] :image_extension Optional: The extension (JPG, PNG, GIF, etc.) of the image file. Recommended if uploading an imageFile directly, instead of using imageUrl. If no extension can be determined, will default to JPG.
|
75
76
|
# @return [String]
|
76
77
|
describe 'edit_html_html_append_image_inline test' do
|
77
78
|
it 'should work' do
|
@@ -85,7 +86,8 @@ describe 'EditHtmlApi' do
|
|
85
86
|
# @param paragraph_text The text content to be used in the paragraph.
|
86
87
|
# @param [Hash] opts the optional parameters
|
87
88
|
# @option opts [File] :input_file Optional: Input file to perform the operation on.
|
88
|
-
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
89
|
+
# @option opts [String] :input_file_url Optional: URL of a file to operate on as input.
|
90
|
+
# @option opts [String] :css_style Optional: The CSS style for the paragraph.
|
89
91
|
# @return [String]
|
90
92
|
describe 'edit_html_html_append_paragraph test' do
|
91
93
|
it 'should work' do
|
@@ -93,4 +95,20 @@ describe 'EditHtmlApi' do
|
|
93
95
|
end
|
94
96
|
end
|
95
97
|
|
98
|
+
# unit tests for edit_html_html_create_blank_document
|
99
|
+
# Create a Blank HTML Document
|
100
|
+
# Returns a blank HTML Document format file. The file is blank, with no contents by default. Use the optional input parameters to add various starting elements. Use additional editing commands such as Append Header, Append Paragraph or Append Image from URL to populate the document.
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @option opts [String] :title Optional: The title of the HTML document
|
103
|
+
# @option opts [String] :css_url Optional: A CSS style URL to be added to the document.
|
104
|
+
# @option opts [String] :css_inline Optional: An inline CSS style to be added to the document.
|
105
|
+
# @option opts [String] :javascript_url Optional: Javascript URL to be added to the document.
|
106
|
+
# @option opts [String] :javascript_inline Optional: Inline Javascript to be added to the document.
|
107
|
+
# @return [String]
|
108
|
+
describe 'edit_html_html_create_blank_document test' do
|
109
|
+
it 'should work' do
|
110
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
96
114
|
end
|
@@ -188,6 +188,19 @@ describe 'EditPdfApi' do
|
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
+
# unit tests for edit_pdf_resize
|
192
|
+
# Change PDF Document's Paper Size
|
193
|
+
# Resizes a PDF document's paper size.
|
194
|
+
# @param input_file Input file to perform the operation on.
|
195
|
+
# @param paper_size The desired paper size for the resized PDF document. Size ranges from A7 (smallest) to A0 (largest).
|
196
|
+
# @param [Hash] opts the optional parameters
|
197
|
+
# @return [String]
|
198
|
+
describe 'edit_pdf_resize test' do
|
199
|
+
it 'should work' do
|
200
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
191
204
|
# unit tests for edit_pdf_rotate_all_pages
|
192
205
|
# Rotate all pages in a PDF document
|
193
206
|
# Rotate all of the pages in a PDF document by a multiple of 90 degrees
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-convert-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|