aspose_pdf_cloud 20.5.0 → 20.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -8
  3. data/docs/ApiInfo.md +10 -0
  4. data/docs/CheckBoxField.md +1 -0
  5. data/docs/ChoiceField.md +1 -0
  6. data/docs/ComboBoxField.md +1 -0
  7. data/docs/FormField.md +1 -0
  8. data/docs/ImageCompressionVersion.md +12 -0
  9. data/docs/ImageEncoding.md +13 -0
  10. data/docs/ListBoxField.md +1 -0
  11. data/docs/OptimizeOptions.md +13 -7
  12. data/docs/OutputFormat.md +11 -0
  13. data/docs/Paragraph.md +2 -2
  14. data/docs/PdfAType.md +3 -2
  15. data/docs/PdfApi.md +36 -12
  16. data/docs/RadioButtonField.md +1 -0
  17. data/docs/RadioButtonOptionField.md +1 -0
  18. data/docs/RedactionAnnotation.md +1 -1
  19. data/docs/SignatureCustomAppearance.md +1 -1
  20. data/docs/SignatureField.md +1 -0
  21. data/docs/TextBoxField.md +1 -0
  22. data/docs/TextState.md +2 -1
  23. data/docs/TextStyle.md +1 -0
  24. data/lib/aspose_pdf_cloud.rb +4 -0
  25. data/lib/aspose_pdf_cloud/api/pdf_api.rb +100 -22
  26. data/lib/aspose_pdf_cloud/models/api_info.rb +209 -0
  27. data/lib/aspose_pdf_cloud/models/check_box_field.rb +11 -1
  28. data/lib/aspose_pdf_cloud/models/choice_field.rb +11 -1
  29. data/lib/aspose_pdf_cloud/models/combo_box_field.rb +11 -1
  30. data/lib/aspose_pdf_cloud/models/form_field.rb +11 -1
  31. data/lib/aspose_pdf_cloud/models/image_compression_version.rb +45 -0
  32. data/lib/aspose_pdf_cloud/models/image_encoding.rb +46 -0
  33. data/lib/aspose_pdf_cloud/models/list_box_field.rb +11 -1
  34. data/lib/aspose_pdf_cloud/models/optimize_options.rb +60 -35
  35. data/lib/aspose_pdf_cloud/models/output_format.rb +44 -0
  36. data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -2
  37. data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -0
  38. data/lib/aspose_pdf_cloud/models/radio_button_field.rb +11 -1
  39. data/lib/aspose_pdf_cloud/models/radio_button_option_field.rb +11 -1
  40. data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +1 -1
  41. data/lib/aspose_pdf_cloud/models/signature_custom_appearance.rb +1 -1
  42. data/lib/aspose_pdf_cloud/models/signature_field.rb +11 -1
  43. data/lib/aspose_pdf_cloud/models/text_box_field.rb +11 -1
  44. data/lib/aspose_pdf_cloud/models/text_state.rb +15 -5
  45. data/lib/aspose_pdf_cloud/models/text_style.rb +14 -4
  46. data/lib/aspose_pdf_cloud/version.rb +1 -1
  47. data/test/pdf_tests.rb +8 -4
  48. data/test_data/Righteous-Regular.ttf +0 -0
  49. metadata +11 -2
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **links** | [**Array<Link>**](Link.md) | Link to the document. | [optional]
8
8
  **partial_name** | **String** | Field name. | [optional]
9
+ **full_name** | **String** | Full Field name. | [optional]
9
10
  **rect** | [**Rectangle**](Rectangle.md) | Field rectangle. | [optional]
10
11
  **value** | **String** | Field value. | [optional]
11
12
  **page_index** | **Integer** | Page index. |
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **links** | [**Array<Link>**](Link.md) | Link to the document. | [optional]
8
8
  **partial_name** | **String** | Field name. | [optional]
9
+ **full_name** | **String** | Full Field name. | [optional]
9
10
  **rect** | [**Rectangle**](Rectangle.md) | Field rectangle. | [optional]
10
11
  **value** | **String** | Field value. | [optional]
11
12
  **page_index** | **Integer** | Page index. |
@@ -5,9 +5,10 @@ Represents a text state of a text
5
5
  Name | Type | Description | Notes
6
6
  ------------ | ------------- | ------------- | -------------
7
7
  **font_size** | **Float** | Gets or sets font size of the text. |
8
- **font** | **String** | Gets or sets font of the text. | [optional]
8
+ **font** | **String** | Gets or sets font name of the text. | [optional]
9
9
  **foreground_color** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
10
10
  **background_color** | [**Color**](Color.md) | Sets background color of the text. | [optional]
11
11
  **font_style** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
12
+ **font_file** | **String** | Sets path of font file in storage. | [optional]
12
13
 
13
14
 
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
8
8
  **font** | **String** | Gets or sets font of the text. | [optional]
9
9
  **foreground_color** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
10
10
  **background_color** | [**Color**](Color.md) | Sets background color of the text. | [optional]
11
+ **font_file** | **String** | Sets path of font file in storage. | [optional]
11
12
 
12
13
 
@@ -30,6 +30,7 @@ require_relative 'aspose_pdf_cloud/models/annotation_flags'
30
30
  require_relative 'aspose_pdf_cloud/models/annotation_state'
31
31
  require_relative 'aspose_pdf_cloud/models/annotation_type'
32
32
  require_relative 'aspose_pdf_cloud/models/antialiasing_processing_type'
33
+ require_relative 'aspose_pdf_cloud/models/api_info'
33
34
  require_relative 'aspose_pdf_cloud/models/aspose_response'
34
35
  require_relative 'aspose_pdf_cloud/models/border'
35
36
  require_relative 'aspose_pdf_cloud/models/border_corner_style'
@@ -72,6 +73,8 @@ require_relative 'aspose_pdf_cloud/models/graph_info'
72
73
  require_relative 'aspose_pdf_cloud/models/horizontal_alignment'
73
74
  require_relative 'aspose_pdf_cloud/models/html_document_type'
74
75
  require_relative 'aspose_pdf_cloud/models/html_markup_generation_modes'
76
+ require_relative 'aspose_pdf_cloud/models/image_compression_version'
77
+ require_relative 'aspose_pdf_cloud/models/image_encoding'
75
78
  require_relative 'aspose_pdf_cloud/models/image_fragment'
76
79
  require_relative 'aspose_pdf_cloud/models/image_src_type'
77
80
  require_relative 'aspose_pdf_cloud/models/image_template'
@@ -90,6 +93,7 @@ require_relative 'aspose_pdf_cloud/models/merge_documents'
90
93
  require_relative 'aspose_pdf_cloud/models/object_exist'
91
94
  require_relative 'aspose_pdf_cloud/models/optimize_options'
92
95
  require_relative 'aspose_pdf_cloud/models/option'
96
+ require_relative 'aspose_pdf_cloud/models/output_format'
93
97
  require_relative 'aspose_pdf_cloud/models/page_layout'
94
98
  require_relative 'aspose_pdf_cloud/models/page_mode'
95
99
  require_relative 'aspose_pdf_cloud/models/page_word_count'
@@ -1919,6 +1919,66 @@ module AsposePdfCloud
1919
1919
  return data, status_code, headers
1920
1920
  end
1921
1921
 
1922
+ #
1923
+ #
1924
+ # @param [Hash] opts the optional parameters
1925
+ # @return [ApiInfo]
1926
+ def get_api_info(opts = {})
1927
+ @api_client.request_token_if_needed
1928
+ data, _status_code, _headers = get_api_info_with_http_info(opts)
1929
+ rescue ApiError => error
1930
+ if error.code == 401
1931
+ @api_client.request_token_if_needed
1932
+ data, _status_code, _headers = get_api_info_with_http_info(opts)
1933
+ else
1934
+ raise
1935
+ end
1936
+ return data
1937
+ end
1938
+
1939
+ #
1940
+ #
1941
+ # @param [Hash] opts the optional parameters
1942
+ # @return [Array<(ApiInfo, Fixnum, Hash)>] ApiInfo data, response status code and response headers
1943
+ def get_api_info_with_http_info(opts = {})
1944
+ if @api_client.config.debugging
1945
+ @api_client.config.logger.debug "Calling API: PdfApi.get_api_info ..."
1946
+ end
1947
+ # resource path
1948
+ local_var_path = "/pdf/info"
1949
+
1950
+ # query parameters
1951
+ query_params = {}
1952
+
1953
+ # header parameters
1954
+ header_params = {}
1955
+ # HTTP header 'Accept' (if needed)
1956
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1957
+ # HTTP header 'Content-Type'
1958
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1959
+
1960
+ # form parameters
1961
+ form_params = {}
1962
+ # Fix header in file
1963
+ post_body = nil
1964
+
1965
+ # http body (model)
1966
+ # Fix header in file
1967
+ # post_body = nil
1968
+ auth_names = ['JWT']
1969
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1970
+ :header_params => header_params,
1971
+ :query_params => query_params,
1972
+ :form_params => form_params,
1973
+ :body => post_body,
1974
+ :auth_names => auth_names,
1975
+ :return_type => 'ApiInfo')
1976
+ if @api_client.config.debugging
1977
+ @api_client.config.logger.debug "API called: PdfApi#get_api_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1978
+ end
1979
+ return data, status_code, headers
1980
+ end
1981
+
1922
1982
  # Read document bookmark.
1923
1983
  #
1924
1984
  # @param name The document name.
@@ -2522,7 +2582,7 @@ module AsposePdfCloud
2522
2582
  return data, status_code, headers
2523
2583
  end
2524
2584
 
2525
- # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
2585
+ # Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
2526
2586
  #
2527
2587
  # @param name The document name.
2528
2588
  # @param [Hash] opts the optional parameters
@@ -2542,7 +2602,7 @@ module AsposePdfCloud
2542
2602
  return data
2543
2603
  end
2544
2604
 
2545
- # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
2605
+ # Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.
2546
2606
  #
2547
2607
  # @param name The document name.
2548
2608
  # @param [Hash] opts the optional parameters
@@ -11404,8 +11464,8 @@ module AsposePdfCloud
11404
11464
  fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.get_pdf_in_storage_to_pdf_a"
11405
11465
  end
11406
11466
  # verify enum value
11407
- if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B'].include?(type)
11408
- fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B"
11467
+ if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
11468
+ fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
11409
11469
  end
11410
11470
  # resource path
11411
11471
  local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s)
@@ -14175,7 +14235,7 @@ module AsposePdfCloud
14175
14235
  return data, status_code, headers
14176
14236
  end
14177
14237
 
14178
- # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content
14238
+ # Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and returns resulting file response content
14179
14239
  #
14180
14240
  # @param name The document name.
14181
14241
  # @param [Hash] opts the optional parameters
@@ -14195,7 +14255,7 @@ module AsposePdfCloud
14195
14255
  return data
14196
14256
  end
14197
14257
 
14198
- # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content
14258
+ # Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and returns resulting file response content
14199
14259
  #
14200
14260
  # @param name The document name.
14201
14261
  # @param [Hash] opts the optional parameters
@@ -17364,7 +17424,7 @@ module AsposePdfCloud
17364
17424
  #
17365
17425
  # @param name The document name.
17366
17426
  # @param page_number The page number.
17367
- # @param links Array of link anotation.
17427
+ # @param links Array of link annotation.
17368
17428
  # @param [Hash] opts the optional parameters
17369
17429
  # @option opts [String] :storage The document storage.
17370
17430
  # @option opts [String] :folder The document folder.
@@ -17386,7 +17446,7 @@ module AsposePdfCloud
17386
17446
  #
17387
17447
  # @param name The document name.
17388
17448
  # @param page_number The page number.
17389
- # @param links Array of link anotation.
17449
+ # @param links Array of link annotation.
17390
17450
  # @param [Hash] opts the optional parameters
17391
17451
  # @option opts [String] :storage The document storage.
17392
17452
  # @option opts [String] :folder The document folder.
@@ -17783,6 +17843,7 @@ module AsposePdfCloud
17783
17843
  # @param [Hash] opts the optional parameters
17784
17844
  # @option opts [String] :storage The document storage.
17785
17845
  # @option opts [String] :folder The document folder.
17846
+ # @option opts [BOOLEAN] :apply Apply redaction immediately after adding. (default to false)
17786
17847
  # @return [AsposeResponse]
17787
17848
  def post_page_redaction_annotations(name, page_number, annotations, opts = {})
17788
17849
  @api_client.request_token_if_needed
@@ -17805,6 +17866,7 @@ module AsposePdfCloud
17805
17866
  # @param [Hash] opts the optional parameters
17806
17867
  # @option opts [String] :storage The document storage.
17807
17868
  # @option opts [String] :folder The document folder.
17869
+ # @option opts [BOOLEAN] :apply Apply redaction immediately after adding.
17808
17870
  # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
17809
17871
  def post_page_redaction_annotations_with_http_info(name, page_number, annotations, opts = {})
17810
17872
  if @api_client.config.debugging
@@ -17829,6 +17891,7 @@ module AsposePdfCloud
17829
17891
  query_params = {}
17830
17892
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
17831
17893
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
17894
+ query_params[:'apply'] = opts[:'apply'] if !opts[:'apply'].nil?
17832
17895
 
17833
17896
  # header parameters
17834
17897
  header_params = {}
@@ -20150,7 +20213,7 @@ module AsposePdfCloud
20150
20213
  # @param password The password (encrypted Base64).
20151
20214
  # @param [Hash] opts the optional parameters
20152
20215
  # @option opts [String] :storage The document storage.
20153
- # @option opts [File] :file A file to be derypted.
20216
+ # @option opts [File] :file A file to be decrypted.
20154
20217
  # @return [AsposeResponse]
20155
20218
  def put_decrypt_document(out_path, password, opts = {})
20156
20219
  @api_client.request_token_if_needed
@@ -20171,7 +20234,7 @@ module AsposePdfCloud
20171
20234
  # @param password The password (encrypted Base64).
20172
20235
  # @param [Hash] opts the optional parameters
20173
20236
  # @option opts [String] :storage The document storage.
20174
- # @option opts [File] :file A file to be derypted.
20237
+ # @option opts [File] :file A file to be decrypted.
20175
20238
  # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
20176
20239
  def put_decrypt_document_with_http_info(out_path, password, opts = {})
20177
20240
  if @api_client.config.debugging
@@ -22487,7 +22550,7 @@ module AsposePdfCloud
22487
22550
  #
22488
22551
  # @param name The document name.
22489
22552
  # @param link_id The link ID.
22490
- # @param link Link anotation.
22553
+ # @param link Link annotation.
22491
22554
  # @param [Hash] opts the optional parameters
22492
22555
  # @option opts [String] :storage The document storage.
22493
22556
  # @option opts [String] :folder The document folder.
@@ -22509,7 +22572,7 @@ module AsposePdfCloud
22509
22572
  #
22510
22573
  # @param name The document name.
22511
22574
  # @param link_id The link ID.
22512
- # @param link Link anotation.
22575
+ # @param link Link annotation.
22513
22576
  # @param [Hash] opts the optional parameters
22514
22577
  # @option opts [String] :storage The document storage.
22515
22578
  # @option opts [String] :folder The document folder.
@@ -22730,7 +22793,7 @@ module AsposePdfCloud
22730
22793
 
22731
22794
  # Merge a list of documents.
22732
22795
  #
22733
- # @param name Resulting documen name.
22796
+ # @param name Resulting document name.
22734
22797
  # @param merge_documents MergeDocuments with a list of documents.
22735
22798
  # @param [Hash] opts the optional parameters
22736
22799
  # @option opts [String] :storage Resulting document storage.
@@ -22751,7 +22814,7 @@ module AsposePdfCloud
22751
22814
 
22752
22815
  # Merge a list of documents.
22753
22816
  #
22754
- # @param name Resulting documen name.
22817
+ # @param name Resulting document name.
22755
22818
  # @param merge_documents MergeDocuments with a list of documents.
22756
22819
  # @param [Hash] opts the optional parameters
22757
22820
  # @option opts [String] :storage Resulting document storage.
@@ -23975,6 +24038,7 @@ module AsposePdfCloud
23975
24038
  # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically.
23976
24039
  # @option opts [String] :storage The document storage.
23977
24040
  # @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
24041
+ # @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. (default to Zip)
23978
24042
  # @option opts [File] :file A file to be converted.
23979
24043
  # @return [AsposeResponse]
23980
24044
  def put_pdf_in_request_to_html(out_path, opts = {})
@@ -24024,6 +24088,7 @@ module AsposePdfCloud
24024
24088
  # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically.
24025
24089
  # @option opts [String] :storage The document storage.
24026
24090
  # @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
24091
+ # @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file.
24027
24092
  # @option opts [File] :file A file to be converted.
24028
24093
  # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
24029
24094
  def put_pdf_in_request_to_html_with_http_info(out_path, opts = {})
@@ -24058,6 +24123,9 @@ module AsposePdfCloud
24058
24123
  if @api_client.config.client_side_validation && opts[:'raster_images_saving_mode'] && !['AsPngImagesEmbeddedIntoSvg', 'AsExternalPngFilesReferencedViaSvg', 'AsEmbeddedPartsOfPngPageBackground'].include?(opts[:'raster_images_saving_mode'])
24059
24124
  fail ArgumentError, 'invalid value for "raster_images_saving_mode", must be one of AsPngImagesEmbeddedIntoSvg, AsExternalPngFilesReferencedViaSvg, AsEmbeddedPartsOfPngPageBackground'
24060
24125
  end
24126
+ if @api_client.config.client_side_validation && opts[:'output_format'] && !['Zip', 'Folder'].include?(opts[:'output_format'])
24127
+ fail ArgumentError, 'invalid value for "output_format", must be one of Zip, Folder'
24128
+ end
24061
24129
  # resource path
24062
24130
  local_var_path = "/pdf/convert/html"
24063
24131
 
@@ -24094,6 +24162,7 @@ module AsposePdfCloud
24094
24162
  query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil?
24095
24163
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
24096
24164
  query_params[:'flowLayoutParagraphFullWidth'] = opts[:'flow_layout_paragraph_full_width'] if !opts[:'flow_layout_paragraph_full_width'].nil?
24165
+ query_params[:'outputFormat'] = opts[:'output_format'] if !opts[:'output_format'].nil?
24097
24166
 
24098
24167
  # header parameters
24099
24168
  header_params = {}
@@ -24316,8 +24385,8 @@ module AsposePdfCloud
24316
24385
  fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.put_pdf_in_request_to_pdf_a"
24317
24386
  end
24318
24387
  # verify enum value
24319
- if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B'].include?(type)
24320
- fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B"
24388
+ if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
24389
+ fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
24321
24390
  end
24322
24391
  # resource path
24323
24392
  local_var_path = "/pdf/convert/pdfa"
@@ -25265,6 +25334,7 @@ module AsposePdfCloud
25265
25334
  # @option opts [String] :folder The document folder.
25266
25335
  # @option opts [String] :storage The document storage.
25267
25336
  # @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
25337
+ # @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. (default to Zip)
25268
25338
  # @return [AsposeResponse]
25269
25339
  def put_pdf_in_storage_to_html(name, out_path, opts = {})
25270
25340
  @api_client.request_token_if_needed
@@ -25315,6 +25385,7 @@ module AsposePdfCloud
25315
25385
  # @option opts [String] :folder The document folder.
25316
25386
  # @option opts [String] :storage The document storage.
25317
25387
  # @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false.
25388
+ # @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is \&quot;Zip\&quot; or missed (default). In case of the \&quot;Folder\&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file.
25318
25389
  # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
25319
25390
  def put_pdf_in_storage_to_html_with_http_info(name, out_path, opts = {})
25320
25391
  if @api_client.config.debugging
@@ -25352,6 +25423,9 @@ module AsposePdfCloud
25352
25423
  if @api_client.config.client_side_validation && opts[:'raster_images_saving_mode'] && !['AsPngImagesEmbeddedIntoSvg', 'AsExternalPngFilesReferencedViaSvg', 'AsEmbeddedPartsOfPngPageBackground'].include?(opts[:'raster_images_saving_mode'])
25353
25424
  fail ArgumentError, 'invalid value for "raster_images_saving_mode", must be one of AsPngImagesEmbeddedIntoSvg, AsExternalPngFilesReferencedViaSvg, AsEmbeddedPartsOfPngPageBackground'
25354
25425
  end
25426
+ if @api_client.config.client_side_validation && opts[:'output_format'] && !['Zip', 'Folder'].include?(opts[:'output_format'])
25427
+ fail ArgumentError, 'invalid value for "output_format", must be one of Zip, Folder'
25428
+ end
25355
25429
  # resource path
25356
25430
  local_var_path = "/pdf/{name}/convert/html".sub('{' + 'name' + '}', name.to_s)
25357
25431
 
@@ -25389,6 +25463,7 @@ module AsposePdfCloud
25389
25463
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
25390
25464
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
25391
25465
  query_params[:'flowLayoutParagraphFullWidth'] = opts[:'flow_layout_paragraph_full_width'] if !opts[:'flow_layout_paragraph_full_width'].nil?
25466
+ query_params[:'outputFormat'] = opts[:'output_format'] if !opts[:'output_format'].nil?
25392
25467
 
25393
25468
  # header parameters
25394
25469
  header_params = {}
@@ -25625,8 +25700,8 @@ module AsposePdfCloud
25625
25700
  fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.put_pdf_in_storage_to_pdf_a"
25626
25701
  end
25627
25702
  # verify enum value
25628
- if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B'].include?(type)
25629
- fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B"
25703
+ if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
25704
+ fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
25630
25705
  end
25631
25706
  # resource path
25632
25707
  local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s)
@@ -26879,6 +26954,7 @@ module AsposePdfCloud
26879
26954
  # @param [Hash] opts the optional parameters
26880
26955
  # @option opts [String] :storage The document storage.
26881
26956
  # @option opts [String] :folder The document folder.
26957
+ # @option opts [BOOLEAN] :apply Apply redaction immediately after adding. (default to false)
26882
26958
  # @return [RedactionAnnotationResponse]
26883
26959
  def put_redaction_annotation(name, annotation_id, annotation, opts = {})
26884
26960
  @api_client.request_token_if_needed
@@ -26901,6 +26977,7 @@ module AsposePdfCloud
26901
26977
  # @param [Hash] opts the optional parameters
26902
26978
  # @option opts [String] :storage The document storage.
26903
26979
  # @option opts [String] :folder The document folder.
26980
+ # @option opts [BOOLEAN] :apply Apply redaction immediately after adding.
26904
26981
  # @return [Array<(RedactionAnnotationResponse, Fixnum, Hash)>] RedactionAnnotationResponse data, response status code and response headers
26905
26982
  def put_redaction_annotation_with_http_info(name, annotation_id, annotation, opts = {})
26906
26983
  if @api_client.config.debugging
@@ -26925,6 +27002,7 @@ module AsposePdfCloud
26925
27002
  query_params = {}
26926
27003
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
26927
27004
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
27005
+ query_params[:'apply'] = opts[:'apply'] if !opts[:'apply'].nil?
26928
27006
 
26929
27007
  # header parameters
26930
27008
  header_params = {}
@@ -28809,7 +28887,7 @@ module AsposePdfCloud
28809
28887
  return data, status_code, headers
28810
28888
  end
28811
28889
 
28812
- # Converts PDF document which contatins XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.
28890
+ # Converts PDF document which contains XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.
28813
28891
  #
28814
28892
  # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
28815
28893
  # @param [Hash] opts the optional parameters
@@ -28829,7 +28907,7 @@ module AsposePdfCloud
28829
28907
  return data
28830
28908
  end
28831
28909
 
28832
- # Converts PDF document which contatins XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.
28910
+ # Converts PDF document which contains XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.
28833
28911
  #
28834
28912
  # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
28835
28913
  # @param [Hash] opts the optional parameters
@@ -28883,7 +28961,7 @@ module AsposePdfCloud
28883
28961
  return data, status_code, headers
28884
28962
  end
28885
28963
 
28886
- # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage
28964
+ # Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage
28887
28965
  #
28888
28966
  # @param name The document name.
28889
28967
  # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
@@ -28904,7 +28982,7 @@ module AsposePdfCloud
28904
28982
  return data
28905
28983
  end
28906
28984
 
28907
- # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage
28985
+ # Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage
28908
28986
  #
28909
28987
  # @param name The document name.
28910
28988
  # @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf)
@@ -0,0 +1,209 @@
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2020 Aspose.PDF Cloud
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18
+ SOFTWARE.
19
+ --------------------------------------------------------------------------------------------------------------------
20
+ =end
21
+
22
+ require 'date'
23
+ require 'time'
24
+
25
+ module AsposePdfCloud
26
+ # Represents response for ApiInfo DTO
27
+ class ApiInfo
28
+ # Product name.
29
+ attr_accessor :name
30
+
31
+ # API version.
32
+ attr_accessor :version
33
+
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'name' => :'Name',
39
+ :'version' => :'Version'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'name' => :'String',
47
+ :'version' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
58
+
59
+ if attributes.has_key?(:'Name')
60
+ self.name = attributes[:'Name']
61
+ end
62
+
63
+ if attributes.has_key?(:'Version')
64
+ self.version = attributes[:'Version']
65
+ end
66
+
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properies with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ return invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ return true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(o)
85
+ return true if self.equal?(o)
86
+ self.class == o.class &&
87
+ name == o.name &&
88
+ version == o.version
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Fixnum] Hash code
99
+ def hash
100
+ [name, version].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.swagger_types.each_pair do |key, type|
109
+ if type =~ /\AArray<(.*)>/i
110
+ # check to ensure the input is an array given that the the attribute
111
+ # is documented as an array but the input is not
112
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
113
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
114
+ end
115
+ elsif !attributes[self.class.attribute_map[key]].nil?
116
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
117
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
118
+ end
119
+
120
+ self
121
+ end
122
+
123
+ # Deserializes the data based on type
124
+ # @param string type Data type
125
+ # @param string value Value to be deserialized
126
+ # @return [Object] Deserialized data
127
+ def _deserialize(type, value)
128
+ case type.to_sym
129
+ when :DateTime
130
+ DateTime.parse(value)
131
+ when :Date
132
+ Date.parse(value)
133
+ when :String
134
+ value.to_s
135
+ when :Integer
136
+ value.to_i
137
+ when :Float
138
+ value.to_f
139
+ when :BOOLEAN
140
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
141
+ true
142
+ else
143
+ false
144
+ end
145
+ when :Object
146
+ # generic object (usually a Hash), return directly
147
+ value
148
+ when /\AArray<(?<inner_type>.+)>\z/
149
+ inner_type = Regexp.last_match[:inner_type]
150
+ value.map { |v| _deserialize(inner_type, v) }
151
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
152
+ k_type = Regexp.last_match[:k_type]
153
+ v_type = Regexp.last_match[:v_type]
154
+ {}.tap do |hash|
155
+ value.each do |k, v|
156
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
157
+ end
158
+ end
159
+ else # model
160
+ temp_model = AsposePdfCloud.const_get(type).new
161
+ temp_model.build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ next if value.nil?
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map{ |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end
206
+
207
+ end
208
+
209
+ end