cloudmersive-convert-api-client 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/docs/AddPdfAnnotationRequest.md +9 -0
- data/docs/EditDocumentApi.md +56 -1
- data/docs/EditPdfApi.md +345 -0
- data/docs/GetPdfAnnotationsResult.md +9 -0
- data/docs/PdfAnnotation.md +19 -0
- data/docs/PresentationResult.md +10 -0
- data/docs/RemovePptxSlidesRequest.md +11 -0
- data/docs/SetPdfMetadataRequest.md +2 -2
- data/docs/SplitDocumentApi.md +65 -2
- data/docs/SplitPptxPresentationResult.md +9 -0
- data/docs/WorksheetResult.md +1 -0
- data/lib/cloudmersive-convert-api-client.rb +6 -0
- data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +57 -2
- data/lib/cloudmersive-convert-api-client/api/edit_pdf_api.rb +370 -0
- data/lib/cloudmersive-convert-api-client/api/split_document_api.rb +62 -0
- data/lib/cloudmersive-convert-api-client/models/add_pdf_annotation_request.rb +217 -0
- data/lib/cloudmersive-convert-api-client/models/get_pdf_annotations_result.rb +201 -0
- data/lib/cloudmersive-convert-api-client/models/pdf_annotation.rb +299 -0
- data/lib/cloudmersive-convert-api-client/models/presentation_result.rb +225 -0
- data/lib/cloudmersive-convert-api-client/models/remove_pptx_slides_request.rb +235 -0
- data/lib/cloudmersive-convert-api-client/models/set_pdf_metadata_request.rb +3 -1
- data/lib/cloudmersive-convert-api-client/models/split_pptx_presentation_result.rb +200 -0
- data/lib/cloudmersive-convert-api-client/models/worksheet_result.rb +30 -4
- data/lib/cloudmersive-convert-api-client/version.rb +1 -1
- data/spec/api/edit_document_api_spec.rb +13 -1
- data/spec/api/edit_pdf_api_spec.rb +77 -0
- data/spec/api/split_document_api_spec.rb +14 -0
- data/spec/models/add_pdf_annotation_request_spec.rb +48 -0
- data/spec/models/get_pdf_annotations_result_spec.rb +48 -0
- data/spec/models/pdf_annotation_spec.rb +108 -0
- data/spec/models/presentation_result_spec.rb +54 -0
- data/spec/models/remove_pptx_slides_request_spec.rb +60 -0
- data/spec/models/split_pptx_presentation_result_spec.rb +48 -0
- data/spec/models/worksheet_result_spec.rb +6 -0
- metadata +20 -2
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::GetPdfAnnotationsResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
7
|
+
**annotations** | [**Array<PdfAnnotation>**](PdfAnnotation.md) | Annotations in the PDF file, ordered by placement from start to finish in the document | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::PdfAnnotation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**title** | **String** | Title of the annotation; this is often the author of the annotation in Acrobat-created PDF files | [optional]
|
7
|
+
**annotation_type** | **String** | Type of the annotation; possible values are Text | [optional]
|
8
|
+
**page_number** | **Integer** | The 1-based index of the page containing the annotation | [optional]
|
9
|
+
**annotation_index** | **Integer** | The 0-based index of the annotation in the document | [optional]
|
10
|
+
**subject** | **String** | Subject of the annotation | [optional]
|
11
|
+
**text_contents** | **String** | Text contents of the annotation | [optional]
|
12
|
+
**creation_date** | **DateTime** | Date that the annotation was created | [optional]
|
13
|
+
**modified_date** | **DateTime** | Date that the annotation was last modified | [optional]
|
14
|
+
**left_x** | **Float** | Left X coordinate for the location of the annotation | [optional]
|
15
|
+
**top_y** | **Float** | Top Y coordination of the location of the annotation | [optional]
|
16
|
+
**width** | **Float** | Width of the annotation | [optional]
|
17
|
+
**height** | **Float** | Height of the annotation | [optional]
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::PresentationResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**slide_number** | **Integer** | Worksheet number of the converted page, starting with 1 for the left-most worksheet | [optional]
|
7
|
+
**url** | **String** | URL to the PPTX file of this slide; file is stored in an in-memory cache and will be deleted | [optional]
|
8
|
+
**presentation_contents** | **String** | Contents of the presentation in bytes | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::RemovePptxSlidesRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**input_file_bytes** | **String** | Optional: Bytes of the input file to operate on | [optional]
|
7
|
+
**input_file_url** | **String** | Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). | [optional]
|
8
|
+
**start_delete_slide_number** | **Integer** | Slide number (1-based) to start deleting slides; inclusive | [optional]
|
9
|
+
**end_delete_slide_number** | **Integer** | Slide number (1-based) to stop deleting slides; inclusive | [optional]
|
10
|
+
|
11
|
+
|
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**input_file_bytes** | **String** |
|
7
|
-
**metadata_to_set** | [**PdfMetadata**](PdfMetadata.md) |
|
6
|
+
**input_file_bytes** | **String** | Input file contents bytes for the file to modify | [optional]
|
7
|
+
**metadata_to_set** | [**PdfMetadata**](PdfMetadata.md) | PDF metadata to set on the file | [optional]
|
8
8
|
|
9
9
|
|
data/docs/SplitDocumentApi.md
CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**split_document_pdf_by_page**](SplitDocumentApi.md#split_document_pdf_by_page) | **POST** /convert/split/pdf | Split a PDF file into separate PDF files, one per page
|
8
|
+
[**split_document_pptx**](SplitDocumentApi.md#split_document_pptx) | **POST** /convert/split/pptx | Split a single PowerPoint Presentation PPTX into Separate Slides
|
8
9
|
[**split_document_xlsx**](SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
|
9
10
|
|
10
11
|
|
@@ -66,8 +67,66 @@ Name | Type | Description | Notes
|
|
66
67
|
|
67
68
|
|
68
69
|
|
70
|
+
# **split_document_pptx**
|
71
|
+
> SplitPptxPresentationResult split_document_pptx(input_file, opts)
|
72
|
+
|
73
|
+
Split a single PowerPoint Presentation PPTX into Separate Slides
|
74
|
+
|
75
|
+
Split an PowerPoint PPTX Presentation, comprised of multiple slides into separate PowerPoint PPTX presentation files, with each containing exactly one slide.
|
76
|
+
|
77
|
+
### Example
|
78
|
+
```ruby
|
79
|
+
# load the gem
|
80
|
+
require 'cloudmersive-convert-api-client'
|
81
|
+
# setup authorization
|
82
|
+
CloudmersiveConvertApiClient.configure do |config|
|
83
|
+
# Configure API key authorization: Apikey
|
84
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
85
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
86
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
87
|
+
end
|
88
|
+
|
89
|
+
api_instance = CloudmersiveConvertApiClient::SplitDocumentApi.new
|
90
|
+
|
91
|
+
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
92
|
+
|
93
|
+
opts = {
|
94
|
+
return_document_contents: true # BOOLEAN | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true.
|
95
|
+
}
|
96
|
+
|
97
|
+
begin
|
98
|
+
#Split a single PowerPoint Presentation PPTX into Separate Slides
|
99
|
+
result = api_instance.split_document_pptx(input_file, opts)
|
100
|
+
p result
|
101
|
+
rescue CloudmersiveConvertApiClient::ApiError => e
|
102
|
+
puts "Exception when calling SplitDocumentApi->split_document_pptx: #{e}"
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
### Parameters
|
107
|
+
|
108
|
+
Name | Type | Description | Notes
|
109
|
+
------------- | ------------- | ------------- | -------------
|
110
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
111
|
+
**return_document_contents** | **BOOLEAN**| Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true. | [optional]
|
112
|
+
|
113
|
+
### Return type
|
114
|
+
|
115
|
+
[**SplitPptxPresentationResult**](SplitPptxPresentationResult.md)
|
116
|
+
|
117
|
+
### Authorization
|
118
|
+
|
119
|
+
[Apikey](../README.md#Apikey)
|
120
|
+
|
121
|
+
### HTTP request headers
|
122
|
+
|
123
|
+
- **Content-Type**: multipart/form-data
|
124
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
125
|
+
|
126
|
+
|
127
|
+
|
69
128
|
# **split_document_xlsx**
|
70
|
-
> SplitXlsxWorksheetResult split_document_xlsx(input_file)
|
129
|
+
> SplitXlsxWorksheetResult split_document_xlsx(input_file, opts)
|
71
130
|
|
72
131
|
Split a single Excel XLSX into Separate Worksheets
|
73
132
|
|
@@ -89,10 +148,13 @@ api_instance = CloudmersiveConvertApiClient::SplitDocumentApi.new
|
|
89
148
|
|
90
149
|
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
91
150
|
|
151
|
+
opts = {
|
152
|
+
return_document_contents: true # BOOLEAN | Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true.
|
153
|
+
}
|
92
154
|
|
93
155
|
begin
|
94
156
|
#Split a single Excel XLSX into Separate Worksheets
|
95
|
-
result = api_instance.split_document_xlsx(input_file)
|
157
|
+
result = api_instance.split_document_xlsx(input_file, opts)
|
96
158
|
p result
|
97
159
|
rescue CloudmersiveConvertApiClient::ApiError => e
|
98
160
|
puts "Exception when calling SplitDocumentApi->split_document_xlsx: #{e}"
|
@@ -104,6 +166,7 @@ end
|
|
104
166
|
Name | Type | Description | Notes
|
105
167
|
------------- | ------------- | ------------- | -------------
|
106
168
|
**input_file** | **File**| Input file to perform the operation on. |
|
169
|
+
**return_document_contents** | **BOOLEAN**| Set to true to return the contents of each Worksheet directly, set to false to only return URLs to each resulting worksheet. Default is true. | [optional]
|
107
170
|
|
108
171
|
### Return type
|
109
172
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveConvertApiClient::SplitPptxPresentationResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**result_presentations** | [**Array<PresentationResult>**](PresentationResult.md) | | [optional]
|
7
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
8
|
+
|
9
|
+
|
data/docs/WorksheetResult.md
CHANGED
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
|
|
6
6
|
**worksheet_number** | **Integer** | Worksheet number of the converted page, starting with 1 for the left-most worksheet | [optional]
|
7
7
|
**worksheet_name** | **String** | The name of the worksheet | [optional]
|
8
8
|
**url** | **String** | URL to the XLSX file of this worksheet; file is stored in an in-memory cache and will be deleted | [optional]
|
9
|
+
**worksheet_contents** | **String** | Contents of the worksheet in bytes | [optional]
|
9
10
|
|
10
11
|
|
@@ -17,6 +17,7 @@ require 'cloudmersive-convert-api-client/version'
|
|
17
17
|
require 'cloudmersive-convert-api-client/configuration'
|
18
18
|
|
19
19
|
# Models
|
20
|
+
require 'cloudmersive-convert-api-client/models/add_pdf_annotation_request'
|
20
21
|
require 'cloudmersive-convert-api-client/models/alternate_file_format_candidate'
|
21
22
|
require 'cloudmersive-convert-api-client/models/autodetect_document_validation_result'
|
22
23
|
require 'cloudmersive-convert-api-client/models/autodetect_get_info_result'
|
@@ -76,6 +77,7 @@ require 'cloudmersive-convert-api-client/models/get_docx_table_row_response'
|
|
76
77
|
require 'cloudmersive-convert-api-client/models/get_docx_tables_request'
|
77
78
|
require 'cloudmersive-convert-api-client/models/get_docx_tables_response'
|
78
79
|
require 'cloudmersive-convert-api-client/models/get_image_info_result'
|
80
|
+
require 'cloudmersive-convert-api-client/models/get_pdf_annotations_result'
|
79
81
|
require 'cloudmersive-convert-api-client/models/get_xlsx_cell_request'
|
80
82
|
require 'cloudmersive-convert-api-client/models/get_xlsx_cell_response'
|
81
83
|
require 'cloudmersive-convert-api-client/models/get_xlsx_columns_request'
|
@@ -107,6 +109,7 @@ require 'cloudmersive-convert-api-client/models/insert_xlsx_worksheet_request'
|
|
107
109
|
require 'cloudmersive-convert-api-client/models/insert_xlsx_worksheet_response'
|
108
110
|
require 'cloudmersive-convert-api-client/models/multipage_image_format_conversion_result'
|
109
111
|
require 'cloudmersive-convert-api-client/models/page_conversion_result'
|
112
|
+
require 'cloudmersive-convert-api-client/models/pdf_annotation'
|
110
113
|
require 'cloudmersive-convert-api-client/models/pdf_document'
|
111
114
|
require 'cloudmersive-convert-api-client/models/pdf_form_field'
|
112
115
|
require 'cloudmersive-convert-api-client/models/pdf_form_fields'
|
@@ -114,15 +117,18 @@ require 'cloudmersive-convert-api-client/models/pdf_metadata'
|
|
114
117
|
require 'cloudmersive-convert-api-client/models/pdf_page_text'
|
115
118
|
require 'cloudmersive-convert-api-client/models/pdf_text_by_page_result'
|
116
119
|
require 'cloudmersive-convert-api-client/models/pdf_to_png_result'
|
120
|
+
require 'cloudmersive-convert-api-client/models/presentation_result'
|
117
121
|
require 'cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_request'
|
118
122
|
require 'cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_response'
|
119
123
|
require 'cloudmersive-convert-api-client/models/remove_docx_pages_request'
|
124
|
+
require 'cloudmersive-convert-api-client/models/remove_pptx_slides_request'
|
120
125
|
require 'cloudmersive-convert-api-client/models/replace_string_request'
|
121
126
|
require 'cloudmersive-convert-api-client/models/screenshot_request'
|
122
127
|
require 'cloudmersive-convert-api-client/models/set_form_field_value'
|
123
128
|
require 'cloudmersive-convert-api-client/models/set_pdf_form_fields_request'
|
124
129
|
require 'cloudmersive-convert-api-client/models/set_pdf_metadata_request'
|
125
130
|
require 'cloudmersive-convert-api-client/models/split_pdf_result'
|
131
|
+
require 'cloudmersive-convert-api-client/models/split_pptx_presentation_result'
|
126
132
|
require 'cloudmersive-convert-api-client/models/split_xlsx_worksheet_result'
|
127
133
|
require 'cloudmersive-convert-api-client/models/text_conversion_result'
|
128
134
|
require 'cloudmersive-convert-api-client/models/update_docx_table_cell_request'
|
@@ -187,7 +187,7 @@ module CloudmersiveConvertApiClient
|
|
187
187
|
end
|
188
188
|
|
189
189
|
# Delete, remove pages from a Word DOCX document
|
190
|
-
# Returns the
|
190
|
+
# Returns the edited Word Document in the Word Document (DOCX) format file with the specified pages removed
|
191
191
|
# @param req_config Document input request
|
192
192
|
# @param [Hash] opts the optional parameters
|
193
193
|
# @return [String]
|
@@ -197,7 +197,7 @@ module CloudmersiveConvertApiClient
|
|
197
197
|
end
|
198
198
|
|
199
199
|
# Delete, remove pages from a Word DOCX document
|
200
|
-
# Returns the
|
200
|
+
# Returns the edited Word Document in the Word Document (DOCX) format file with the specified pages removed
|
201
201
|
# @param req_config Document input request
|
202
202
|
# @param [Hash] opts the optional parameters
|
203
203
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
@@ -1451,6 +1451,61 @@ module CloudmersiveConvertApiClient
|
|
1451
1451
|
return data, status_code, headers
|
1452
1452
|
end
|
1453
1453
|
|
1454
|
+
# Delete, remove slides from a PowerPoint PPTX presentation document
|
1455
|
+
# Edits the input PowerPoint PPTX presentation document to remove the specified slides
|
1456
|
+
# @param req_config Presentation input request
|
1457
|
+
# @param [Hash] opts the optional parameters
|
1458
|
+
# @return [String]
|
1459
|
+
def edit_document_pptx_delete_slides(req_config, opts = {})
|
1460
|
+
data, _status_code, _headers = edit_document_pptx_delete_slides_with_http_info(req_config, opts)
|
1461
|
+
return data
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
# Delete, remove slides from a PowerPoint PPTX presentation document
|
1465
|
+
# Edits the input PowerPoint PPTX presentation document to remove the specified slides
|
1466
|
+
# @param req_config Presentation input request
|
1467
|
+
# @param [Hash] opts the optional parameters
|
1468
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
1469
|
+
def edit_document_pptx_delete_slides_with_http_info(req_config, opts = {})
|
1470
|
+
if @api_client.config.debugging
|
1471
|
+
@api_client.config.logger.debug "Calling API: EditDocumentApi.edit_document_pptx_delete_slides ..."
|
1472
|
+
end
|
1473
|
+
# verify the required parameter 'req_config' is set
|
1474
|
+
if @api_client.config.client_side_validation && req_config.nil?
|
1475
|
+
fail ArgumentError, "Missing the required parameter 'req_config' when calling EditDocumentApi.edit_document_pptx_delete_slides"
|
1476
|
+
end
|
1477
|
+
# resource path
|
1478
|
+
local_var_path = "/convert/edit/pptx/delete-slides"
|
1479
|
+
|
1480
|
+
# query parameters
|
1481
|
+
query_params = {}
|
1482
|
+
|
1483
|
+
# header parameters
|
1484
|
+
header_params = {}
|
1485
|
+
# HTTP header 'Accept' (if needed)
|
1486
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
1487
|
+
# HTTP header 'Content-Type'
|
1488
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
1489
|
+
|
1490
|
+
# form parameters
|
1491
|
+
form_params = {}
|
1492
|
+
|
1493
|
+
# http body (model)
|
1494
|
+
post_body = @api_client.object_to_http_body(req_config)
|
1495
|
+
auth_names = ['Apikey']
|
1496
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1497
|
+
:header_params => header_params,
|
1498
|
+
:query_params => query_params,
|
1499
|
+
:form_params => form_params,
|
1500
|
+
:body => post_body,
|
1501
|
+
:auth_names => auth_names,
|
1502
|
+
:return_type => 'String')
|
1503
|
+
if @api_client.config.debugging
|
1504
|
+
@api_client.config.logger.debug "API called: EditDocumentApi#edit_document_pptx_delete_slides\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1505
|
+
end
|
1506
|
+
return data, status_code, headers
|
1507
|
+
end
|
1508
|
+
|
1454
1509
|
# Replace string in PowerPoint PPTX presentation
|
1455
1510
|
# Replace all instances of a string in an Office PowerPoint Document (pptx)
|
1456
1511
|
# @param req_config Replacement document configuration input
|
@@ -20,6 +20,61 @@ module CloudmersiveConvertApiClient
|
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
22
|
|
23
|
+
# Add one or more PDF annotations, comments in the PDF document
|
24
|
+
# Adds one or more annotations, comments to a PDF document.
|
25
|
+
# @param request
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [String]
|
28
|
+
def edit_pdf_add_annotations(request, opts = {})
|
29
|
+
data, _status_code, _headers = edit_pdf_add_annotations_with_http_info(request, opts)
|
30
|
+
return data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Add one or more PDF annotations, comments in the PDF document
|
34
|
+
# Adds one or more annotations, comments to a PDF document.
|
35
|
+
# @param request
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
38
|
+
def edit_pdf_add_annotations_with_http_info(request, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_add_annotations ..."
|
41
|
+
end
|
42
|
+
# verify the required parameter 'request' is set
|
43
|
+
if @api_client.config.client_side_validation && request.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling EditPdfApi.edit_pdf_add_annotations"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = "/convert/edit/pdf/annotations/add-item"
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = @api_client.object_to_http_body(request)
|
64
|
+
auth_names = ['Apikey']
|
65
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => 'String')
|
72
|
+
if @api_client.config.debugging
|
73
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_add_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
74
|
+
end
|
75
|
+
return data, status_code, headers
|
76
|
+
end
|
77
|
+
|
23
78
|
# Decrypt and password-protect a PDF
|
24
79
|
# Decrypt a PDF document with a password. Decrypted PDF will no longer require a password to open.
|
25
80
|
# @param password Valid password for the PDF file
|
@@ -218,6 +273,62 @@ module CloudmersiveConvertApiClient
|
|
218
273
|
return data, status_code, headers
|
219
274
|
end
|
220
275
|
|
276
|
+
# Get PDF annotations, including comments in the document
|
277
|
+
# Enumerates the annotations, including comments and notes, in a PDF document.
|
278
|
+
# @param input_file Input file to perform the operation on.
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [GetPdfAnnotationsResult]
|
281
|
+
def edit_pdf_get_annotations(input_file, opts = {})
|
282
|
+
data, _status_code, _headers = edit_pdf_get_annotations_with_http_info(input_file, opts)
|
283
|
+
return data
|
284
|
+
end
|
285
|
+
|
286
|
+
# Get PDF annotations, including comments in the document
|
287
|
+
# Enumerates the annotations, including comments and notes, in a PDF document.
|
288
|
+
# @param input_file Input file to perform the operation on.
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @return [Array<(GetPdfAnnotationsResult, Fixnum, Hash)>] GetPdfAnnotationsResult data, response status code and response headers
|
291
|
+
def edit_pdf_get_annotations_with_http_info(input_file, opts = {})
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_get_annotations ..."
|
294
|
+
end
|
295
|
+
# verify the required parameter 'input_file' is set
|
296
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
297
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_get_annotations"
|
298
|
+
end
|
299
|
+
# resource path
|
300
|
+
local_var_path = "/convert/edit/pdf/annotations/list"
|
301
|
+
|
302
|
+
# query parameters
|
303
|
+
query_params = {}
|
304
|
+
|
305
|
+
# header parameters
|
306
|
+
header_params = {}
|
307
|
+
# HTTP header 'Accept' (if needed)
|
308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
309
|
+
# HTTP header 'Content-Type'
|
310
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
311
|
+
|
312
|
+
# form parameters
|
313
|
+
form_params = {}
|
314
|
+
form_params["inputFile"] = input_file
|
315
|
+
|
316
|
+
# http body (model)
|
317
|
+
post_body = nil
|
318
|
+
auth_names = ['Apikey']
|
319
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
320
|
+
:header_params => header_params,
|
321
|
+
:query_params => query_params,
|
322
|
+
:form_params => form_params,
|
323
|
+
:body => post_body,
|
324
|
+
:auth_names => auth_names,
|
325
|
+
:return_type => 'GetPdfAnnotationsResult')
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_get_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
328
|
+
end
|
329
|
+
return data, status_code, headers
|
330
|
+
end
|
331
|
+
|
221
332
|
# Gets PDF Form fields and values
|
222
333
|
# Encrypt a PDF document with a password. Set an owner password to control owner (editor/creator) permissions, and set a user (reader) password to control the viewer of the PDF. Set the password fields null to omit the given password.
|
223
334
|
# @param input_file Input file to perform the operation on.
|
@@ -526,6 +637,265 @@ module CloudmersiveConvertApiClient
|
|
526
637
|
return data, status_code, headers
|
527
638
|
end
|
528
639
|
|
640
|
+
# Remove all PDF annotations, including comments in the document
|
641
|
+
# Removes all of the annotations, including comments and notes, in a PDF document.
|
642
|
+
# @param input_file Input file to perform the operation on.
|
643
|
+
# @param [Hash] opts the optional parameters
|
644
|
+
# @return [String]
|
645
|
+
def edit_pdf_remove_all_annotations(input_file, opts = {})
|
646
|
+
data, _status_code, _headers = edit_pdf_remove_all_annotations_with_http_info(input_file, opts)
|
647
|
+
return data
|
648
|
+
end
|
649
|
+
|
650
|
+
# Remove all PDF annotations, including comments in the document
|
651
|
+
# Removes all of the annotations, including comments and notes, in a PDF document.
|
652
|
+
# @param input_file Input file to perform the operation on.
|
653
|
+
# @param [Hash] opts the optional parameters
|
654
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
655
|
+
def edit_pdf_remove_all_annotations_with_http_info(input_file, opts = {})
|
656
|
+
if @api_client.config.debugging
|
657
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_remove_all_annotations ..."
|
658
|
+
end
|
659
|
+
# verify the required parameter 'input_file' is set
|
660
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
661
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_remove_all_annotations"
|
662
|
+
end
|
663
|
+
# resource path
|
664
|
+
local_var_path = "/convert/edit/pdf/annotations/remove-all"
|
665
|
+
|
666
|
+
# query parameters
|
667
|
+
query_params = {}
|
668
|
+
|
669
|
+
# header parameters
|
670
|
+
header_params = {}
|
671
|
+
# HTTP header 'Accept' (if needed)
|
672
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
673
|
+
# HTTP header 'Content-Type'
|
674
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
675
|
+
|
676
|
+
# form parameters
|
677
|
+
form_params = {}
|
678
|
+
form_params["inputFile"] = input_file
|
679
|
+
|
680
|
+
# http body (model)
|
681
|
+
post_body = nil
|
682
|
+
auth_names = ['Apikey']
|
683
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
684
|
+
:header_params => header_params,
|
685
|
+
:query_params => query_params,
|
686
|
+
:form_params => form_params,
|
687
|
+
:body => post_body,
|
688
|
+
:auth_names => auth_names,
|
689
|
+
:return_type => 'String')
|
690
|
+
if @api_client.config.debugging
|
691
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_remove_all_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
692
|
+
end
|
693
|
+
return data, status_code, headers
|
694
|
+
end
|
695
|
+
|
696
|
+
# Remove a specific PDF annotation, comment in the document
|
697
|
+
# Removes a specific annotation in a PDF document, using the AnnotationIndex. To enumerate AnnotationIndex for all of the annotations in the PDF document, use the /edit/pdf/annotations/list API.
|
698
|
+
# @param input_file Input file to perform the operation on.
|
699
|
+
# @param annotation_index The 0-based index of the annotation in the document
|
700
|
+
# @param [Hash] opts the optional parameters
|
701
|
+
# @return [String]
|
702
|
+
def edit_pdf_remove_annotation_item(input_file, annotation_index, opts = {})
|
703
|
+
data, _status_code, _headers = edit_pdf_remove_annotation_item_with_http_info(input_file, annotation_index, opts)
|
704
|
+
return data
|
705
|
+
end
|
706
|
+
|
707
|
+
# Remove a specific PDF annotation, comment in the document
|
708
|
+
# Removes a specific annotation in a PDF document, using the AnnotationIndex. To enumerate AnnotationIndex for all of the annotations in the PDF document, use the /edit/pdf/annotations/list API.
|
709
|
+
# @param input_file Input file to perform the operation on.
|
710
|
+
# @param annotation_index The 0-based index of the annotation in the document
|
711
|
+
# @param [Hash] opts the optional parameters
|
712
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
713
|
+
def edit_pdf_remove_annotation_item_with_http_info(input_file, annotation_index, opts = {})
|
714
|
+
if @api_client.config.debugging
|
715
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_remove_annotation_item ..."
|
716
|
+
end
|
717
|
+
# verify the required parameter 'input_file' is set
|
718
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
719
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_remove_annotation_item"
|
720
|
+
end
|
721
|
+
# verify the required parameter 'annotation_index' is set
|
722
|
+
if @api_client.config.client_side_validation && annotation_index.nil?
|
723
|
+
fail ArgumentError, "Missing the required parameter 'annotation_index' when calling EditPdfApi.edit_pdf_remove_annotation_item"
|
724
|
+
end
|
725
|
+
# resource path
|
726
|
+
local_var_path = "/convert/edit/pdf/annotations/remove-item"
|
727
|
+
|
728
|
+
# query parameters
|
729
|
+
query_params = {}
|
730
|
+
|
731
|
+
# header parameters
|
732
|
+
header_params = {}
|
733
|
+
# HTTP header 'Accept' (if needed)
|
734
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
735
|
+
# HTTP header 'Content-Type'
|
736
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
737
|
+
header_params[:'annotationIndex'] = annotation_index
|
738
|
+
|
739
|
+
# form parameters
|
740
|
+
form_params = {}
|
741
|
+
form_params["inputFile"] = input_file
|
742
|
+
|
743
|
+
# http body (model)
|
744
|
+
post_body = nil
|
745
|
+
auth_names = ['Apikey']
|
746
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
747
|
+
:header_params => header_params,
|
748
|
+
:query_params => query_params,
|
749
|
+
:form_params => form_params,
|
750
|
+
:body => post_body,
|
751
|
+
:auth_names => auth_names,
|
752
|
+
:return_type => 'String')
|
753
|
+
if @api_client.config.debugging
|
754
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_remove_annotation_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
755
|
+
end
|
756
|
+
return data, status_code, headers
|
757
|
+
end
|
758
|
+
|
759
|
+
# Rotate all pages in a PDF document
|
760
|
+
# Rotate all of the pages in a PDF document by a multiple of 90 degrees
|
761
|
+
# @param input_file Input file to perform the operation on.
|
762
|
+
# @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
|
763
|
+
# @param [Hash] opts the optional parameters
|
764
|
+
# @return [String]
|
765
|
+
def edit_pdf_rotate_all_pages(input_file, rotation_angle, opts = {})
|
766
|
+
data, _status_code, _headers = edit_pdf_rotate_all_pages_with_http_info(input_file, rotation_angle, opts)
|
767
|
+
return data
|
768
|
+
end
|
769
|
+
|
770
|
+
# Rotate all pages in a PDF document
|
771
|
+
# Rotate all of the pages in a PDF document by a multiple of 90 degrees
|
772
|
+
# @param input_file Input file to perform the operation on.
|
773
|
+
# @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
|
774
|
+
# @param [Hash] opts the optional parameters
|
775
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
776
|
+
def edit_pdf_rotate_all_pages_with_http_info(input_file, rotation_angle, opts = {})
|
777
|
+
if @api_client.config.debugging
|
778
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_rotate_all_pages ..."
|
779
|
+
end
|
780
|
+
# verify the required parameter 'input_file' is set
|
781
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
782
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_rotate_all_pages"
|
783
|
+
end
|
784
|
+
# verify the required parameter 'rotation_angle' is set
|
785
|
+
if @api_client.config.client_side_validation && rotation_angle.nil?
|
786
|
+
fail ArgumentError, "Missing the required parameter 'rotation_angle' when calling EditPdfApi.edit_pdf_rotate_all_pages"
|
787
|
+
end
|
788
|
+
# resource path
|
789
|
+
local_var_path = "/convert/edit/pdf/pages/rotate/all"
|
790
|
+
|
791
|
+
# query parameters
|
792
|
+
query_params = {}
|
793
|
+
|
794
|
+
# header parameters
|
795
|
+
header_params = {}
|
796
|
+
# HTTP header 'Accept' (if needed)
|
797
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
798
|
+
# HTTP header 'Content-Type'
|
799
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
800
|
+
header_params[:'rotationAngle'] = rotation_angle
|
801
|
+
|
802
|
+
# form parameters
|
803
|
+
form_params = {}
|
804
|
+
form_params["inputFile"] = input_file
|
805
|
+
|
806
|
+
# http body (model)
|
807
|
+
post_body = nil
|
808
|
+
auth_names = ['Apikey']
|
809
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
810
|
+
:header_params => header_params,
|
811
|
+
:query_params => query_params,
|
812
|
+
:form_params => form_params,
|
813
|
+
:body => post_body,
|
814
|
+
:auth_names => auth_names,
|
815
|
+
:return_type => 'String')
|
816
|
+
if @api_client.config.debugging
|
817
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_rotate_all_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
818
|
+
end
|
819
|
+
return data, status_code, headers
|
820
|
+
end
|
821
|
+
|
822
|
+
# Rotate a range, subset of pages in a PDF document
|
823
|
+
# Rotate a range of specific pages in a PDF document by a multiple of 90 degrees
|
824
|
+
# @param input_file Input file to perform the operation on.
|
825
|
+
# @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
|
826
|
+
# @param page_start Page number (1 based) to start rotating pages from (inclusive).
|
827
|
+
# @param page_end Page number (1 based) to stop rotating pages from (inclusive).
|
828
|
+
# @param [Hash] opts the optional parameters
|
829
|
+
# @return [String]
|
830
|
+
def edit_pdf_rotate_page_range(input_file, rotation_angle, page_start, page_end, opts = {})
|
831
|
+
data, _status_code, _headers = edit_pdf_rotate_page_range_with_http_info(input_file, rotation_angle, page_start, page_end, opts)
|
832
|
+
return data
|
833
|
+
end
|
834
|
+
|
835
|
+
# Rotate a range, subset of pages in a PDF document
|
836
|
+
# Rotate a range of specific pages in a PDF document by a multiple of 90 degrees
|
837
|
+
# @param input_file Input file to perform the operation on.
|
838
|
+
# @param rotation_angle The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.
|
839
|
+
# @param page_start Page number (1 based) to start rotating pages from (inclusive).
|
840
|
+
# @param page_end Page number (1 based) to stop rotating pages from (inclusive).
|
841
|
+
# @param [Hash] opts the optional parameters
|
842
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
843
|
+
def edit_pdf_rotate_page_range_with_http_info(input_file, rotation_angle, page_start, page_end, opts = {})
|
844
|
+
if @api_client.config.debugging
|
845
|
+
@api_client.config.logger.debug "Calling API: EditPdfApi.edit_pdf_rotate_page_range ..."
|
846
|
+
end
|
847
|
+
# verify the required parameter 'input_file' is set
|
848
|
+
if @api_client.config.client_side_validation && input_file.nil?
|
849
|
+
fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_rotate_page_range"
|
850
|
+
end
|
851
|
+
# verify the required parameter 'rotation_angle' is set
|
852
|
+
if @api_client.config.client_side_validation && rotation_angle.nil?
|
853
|
+
fail ArgumentError, "Missing the required parameter 'rotation_angle' when calling EditPdfApi.edit_pdf_rotate_page_range"
|
854
|
+
end
|
855
|
+
# verify the required parameter 'page_start' is set
|
856
|
+
if @api_client.config.client_side_validation && page_start.nil?
|
857
|
+
fail ArgumentError, "Missing the required parameter 'page_start' when calling EditPdfApi.edit_pdf_rotate_page_range"
|
858
|
+
end
|
859
|
+
# verify the required parameter 'page_end' is set
|
860
|
+
if @api_client.config.client_side_validation && page_end.nil?
|
861
|
+
fail ArgumentError, "Missing the required parameter 'page_end' when calling EditPdfApi.edit_pdf_rotate_page_range"
|
862
|
+
end
|
863
|
+
# resource path
|
864
|
+
local_var_path = "/convert/edit/pdf/pages/rotate/page-range"
|
865
|
+
|
866
|
+
# query parameters
|
867
|
+
query_params = {}
|
868
|
+
|
869
|
+
# header parameters
|
870
|
+
header_params = {}
|
871
|
+
# HTTP header 'Accept' (if needed)
|
872
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
873
|
+
# HTTP header 'Content-Type'
|
874
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
875
|
+
header_params[:'rotationAngle'] = rotation_angle
|
876
|
+
header_params[:'pageStart'] = page_start
|
877
|
+
header_params[:'pageEnd'] = page_end
|
878
|
+
|
879
|
+
# form parameters
|
880
|
+
form_params = {}
|
881
|
+
form_params["inputFile"] = input_file
|
882
|
+
|
883
|
+
# http body (model)
|
884
|
+
post_body = nil
|
885
|
+
auth_names = ['Apikey']
|
886
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
887
|
+
:header_params => header_params,
|
888
|
+
:query_params => query_params,
|
889
|
+
:form_params => form_params,
|
890
|
+
:body => post_body,
|
891
|
+
:auth_names => auth_names,
|
892
|
+
:return_type => 'String')
|
893
|
+
if @api_client.config.debugging
|
894
|
+
@api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_rotate_page_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
895
|
+
end
|
896
|
+
return data, status_code, headers
|
897
|
+
end
|
898
|
+
|
529
899
|
# Sets ands fills PDF Form field values
|
530
900
|
# Fill in the form fields in a PDF form with specific values. Use form/get-fields to enumerate the available fields and their data types in an input form.
|
531
901
|
# @param field_values
|