aspose_pdf_cloud 19.9.0 → 19.10.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.
@@ -20,5 +20,5 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  module AsposePdfCloud
23
- VERSION = "19.9.0"
23
+ VERSION = "19.10.0"
24
24
  end
@@ -3920,6 +3920,206 @@ class PdfTests < Minitest::Test
3920
3920
  assert(response, 'Failed to update text box field.')
3921
3921
  end
3922
3922
 
3923
+ def test_get_document_check_box_fields
3924
+ file_name = 'PdfWithAcroForm.pdf'
3925
+ upload_file(file_name)
3926
+
3927
+ opts = {
3928
+ :folder => @temp_folder
3929
+ }
3930
+
3931
+ response = @pdf_api.get_document_check_box_fields(file_name, opts)
3932
+ assert(response, 'Failed to read document check box fields.')
3933
+ end
3934
+
3935
+ def test_get_page_check_box_fields
3936
+ file_name = 'PdfWithAcroForm.pdf'
3937
+ upload_file(file_name)
3938
+
3939
+ page_number = 1
3940
+ opts = {
3941
+ :folder => @temp_folder
3942
+ }
3943
+
3944
+ response = @pdf_api.get_page_check_box_fields(file_name, page_number, opts)
3945
+ assert(response, 'Failed to read page check box fields.')
3946
+ end
3947
+
3948
+ def test_get_check_box_field
3949
+ file_name = 'PdfWithAcroForm.pdf'
3950
+ upload_file(file_name)
3951
+
3952
+ field_name = 'checkboxField'
3953
+ opts = {
3954
+ :folder => @temp_folder
3955
+ }
3956
+
3957
+ response = @pdf_api.get_check_box_field(file_name, field_name, opts)
3958
+ assert(response, 'Failed to read check box field.')
3959
+ end
3960
+
3961
+ def test_post_check_box_fields
3962
+ file_name = '4pages.pdf'
3963
+ upload_file(file_name)
3964
+
3965
+ field = CheckBoxField.new
3966
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
3967
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
3968
+ field.export_value = 'true'
3969
+ field.partial_name = 'testField'
3970
+ field.page_index = 1
3971
+ field.is_group = false
3972
+ field.checked = true
3973
+ field.style = BoxStyle::CROSS
3974
+
3975
+ opts = {
3976
+ :folder => @temp_folder
3977
+ }
3978
+
3979
+ response = @pdf_api.post_check_box_fields(file_name, [field], opts)
3980
+ assert(response, 'Failed to insert check box fields.')
3981
+ end
3982
+
3983
+ def test_put_check_box_field
3984
+ file_name = 'PdfWithAcroForm.pdf'
3985
+ upload_file(file_name)
3986
+
3987
+ field_name = 'checkboxField'
3988
+
3989
+ field = CheckBoxField.new
3990
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
3991
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
3992
+ field.export_value = 'true'
3993
+ field.partial_name = 'testField'
3994
+ field.page_index = 1
3995
+ field.is_group = false
3996
+ field.checked = true
3997
+ field.style = BoxStyle::CROSS
3998
+
3999
+ opts = {
4000
+ :folder => @temp_folder
4001
+ }
4002
+
4003
+ response = @pdf_api.put_text_box_field(file_name, field_name, field, opts)
4004
+ assert(response, 'Failed to update check box field.')
4005
+ end
4006
+
4007
+ def test_get_document_radio_button_fields
4008
+ file_name = 'PdfWithAcroForm.pdf'
4009
+ upload_file(file_name)
4010
+
4011
+ opts = {
4012
+ :folder => @temp_folder
4013
+ }
4014
+
4015
+ response = @pdf_api.get_document_radio_button_fields(file_name, opts)
4016
+ assert(response, 'Failed to read document radio button fields.')
4017
+ end
4018
+
4019
+ def test_get_page_radio_button_fields
4020
+ file_name = 'PdfWithAcroForm.pdf'
4021
+ upload_file(file_name)
4022
+
4023
+ page_number = 1
4024
+ opts = {
4025
+ :folder => @temp_folder
4026
+ }
4027
+
4028
+ response = @pdf_api.get_page_radio_button_fields(file_name, page_number, opts)
4029
+ assert(response, 'Failed to read page radio button fields.')
4030
+ end
4031
+
4032
+ def test_get_radio_button_field
4033
+ file_name = 'PdfWithAcroForm.pdf'
4034
+ upload_file(file_name)
4035
+
4036
+ field_name = 'radiobuttonField'
4037
+ opts = {
4038
+ :folder => @temp_folder
4039
+ }
4040
+
4041
+ response = @pdf_api.get_radio_button_field(file_name, field_name, opts)
4042
+ assert(response, 'Failed to read radio button field.')
4043
+ end
4044
+
4045
+ def test_post_radio_button_fields
4046
+ file_name = '4pages.pdf'
4047
+ upload_file(file_name)
4048
+
4049
+ field = RadioButtonField.new
4050
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
4051
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 160, :URY => 140})
4052
+ field.partial_name = 'testField'
4053
+ field.page_index = 1
4054
+ field.is_group = false
4055
+ field.selected = 1
4056
+ field.style = BoxStyle::CROSS
4057
+ field.margin = MarginInfo.new({:Bottom => 0, :Left => 0, :Right => 0, :Top => 0})
4058
+ field.radio_button_options_field = [
4059
+ RadioButtonOptionField.new({
4060
+ :PageIndex => 1,
4061
+ :IsGroup => false,
4062
+ :OptionName => '1',
4063
+ :Rect => Rectangle.new({:LLX => 100, :LLY => 130, :URX => 160, :URY => 140}),
4064
+ :Style => BoxStyle::SQUARE
4065
+ }),
4066
+ RadioButtonOptionField.new({
4067
+ :PageIndex => 1,
4068
+ :IsGroup => false,
4069
+ :OptionName => '2',
4070
+ :Rect => Rectangle.new({:LLX => 150, :LLY => 120, :URX => 160, :URY => 130}),
4071
+ :Style => BoxStyle::SQUARE
4072
+ })
4073
+ ]
4074
+
4075
+ opts = {
4076
+ :folder => @temp_folder
4077
+ }
4078
+
4079
+ response = @pdf_api.post_radio_button_fields(file_name, [field], opts)
4080
+ assert(response, 'Failed to insert radio button fields.')
4081
+ end
4082
+
4083
+ def test_put_radio_button_field
4084
+ file_name = 'PdfWithAcroForm.pdf'
4085
+ upload_file(file_name)
4086
+
4087
+ field_name = 'radiobuttonField'
4088
+
4089
+ field = RadioButtonField.new
4090
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
4091
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 160, :URY => 140})
4092
+ field.partial_name = 'testField'
4093
+ field.page_index = 1
4094
+ field.is_group = false
4095
+ field.selected = 1
4096
+ field.style = BoxStyle::CROSS
4097
+ field.margin = MarginInfo.new({:Bottom => 0, :Left => 0, :Right => 0, :Top => 0})
4098
+ field.radio_button_options_field = [
4099
+ RadioButtonOptionField.new({
4100
+ :PageIndex => 1,
4101
+ :IsGroup => false,
4102
+ :OptionName => '1',
4103
+ :Rect => Rectangle.new({:LLX => 100, :LLY => 130, :URX => 160, :URY => 140}),
4104
+ :Style => BoxStyle::SQUARE
4105
+ }),
4106
+ RadioButtonOptionField.new({
4107
+ :PageIndex => 1,
4108
+ :IsGroup => false,
4109
+ :OptionName => '2',
4110
+ :Rect => Rectangle.new({:LLX => 150, :LLY => 120, :URX => 160, :URY => 130}),
4111
+ :Style => BoxStyle::SQUARE
4112
+ })
4113
+ ]
4114
+
4115
+ opts = {
4116
+ :folder => @temp_folder
4117
+ }
4118
+
4119
+ response = @pdf_api.put_radio_button_field(file_name, field_name, field, opts)
4120
+ assert(response, 'Failed to update radio button field.')
4121
+ end
4122
+
3923
4123
  # Stamp Tests
3924
4124
 
3925
4125
  def test_get_document_stamps
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_pdf_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.9.0
4
+ version: 19.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aspose PDF Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-01 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -89,6 +89,7 @@ files:
89
89
  - docs/BookmarksResponse.md
90
90
  - docs/BorderCornerStyle.md
91
91
  - docs/BorderInfo.md
92
+ - docs/BoxStyle.md
92
93
  - docs/CapStyle.md
93
94
  - docs/CaptionPosition.md
94
95
  - docs/CaretAnnotation.md
@@ -98,6 +99,11 @@ files:
98
99
  - docs/CaretSymbol.md
99
100
  - docs/Cell.md
100
101
  - docs/CellRecognized.md
102
+ - docs/CheckBoxField.md
103
+ - docs/CheckBoxFieldResponse.md
104
+ - docs/CheckBoxFields.md
105
+ - docs/CheckBoxFieldsResponse.md
106
+ - docs/ChoiceField.md
101
107
  - docs/CircleAnnotation.md
102
108
  - docs/CircleAnnotationResponse.md
103
109
  - docs/CircleAnnotations.md
@@ -195,6 +201,7 @@ files:
195
201
  - docs/MovieAnnotationsResponse.md
196
202
  - docs/ObjectExist.md
197
203
  - docs/OptimizeOptions.md
204
+ - docs/Option.md
198
205
  - docs/Page.md
199
206
  - docs/PageNumberStamp.md
200
207
  - docs/PageWordCount.md
@@ -222,6 +229,11 @@ files:
222
229
  - docs/PopupAnnotations.md
223
230
  - docs/PopupAnnotationsResponse.md
224
231
  - docs/Position.md
232
+ - docs/RadioButtonField.md
233
+ - docs/RadioButtonFieldResponse.md
234
+ - docs/RadioButtonFields.md
235
+ - docs/RadioButtonFieldsResponse.md
236
+ - docs/RadioButtonOptionField.md
225
237
  - docs/RasterImagesSavingModes.md
226
238
  - docs/Rectangle.md
227
239
  - docs/RedactionAnnotation.md
@@ -340,6 +352,7 @@ files:
340
352
  - lib/aspose_pdf_cloud/models/bookmarks_response.rb
341
353
  - lib/aspose_pdf_cloud/models/border_corner_style.rb
342
354
  - lib/aspose_pdf_cloud/models/border_info.rb
355
+ - lib/aspose_pdf_cloud/models/box_style.rb
343
356
  - lib/aspose_pdf_cloud/models/cap_style.rb
344
357
  - lib/aspose_pdf_cloud/models/caption_position.rb
345
358
  - lib/aspose_pdf_cloud/models/caret_annotation.rb
@@ -349,6 +362,11 @@ files:
349
362
  - lib/aspose_pdf_cloud/models/caret_symbol.rb
350
363
  - lib/aspose_pdf_cloud/models/cell.rb
351
364
  - lib/aspose_pdf_cloud/models/cell_recognized.rb
365
+ - lib/aspose_pdf_cloud/models/check_box_field.rb
366
+ - lib/aspose_pdf_cloud/models/check_box_field_response.rb
367
+ - lib/aspose_pdf_cloud/models/check_box_fields.rb
368
+ - lib/aspose_pdf_cloud/models/check_box_fields_response.rb
369
+ - lib/aspose_pdf_cloud/models/choice_field.rb
352
370
  - lib/aspose_pdf_cloud/models/circle_annotation.rb
353
371
  - lib/aspose_pdf_cloud/models/circle_annotation_response.rb
354
372
  - lib/aspose_pdf_cloud/models/circle_annotations.rb
@@ -446,6 +464,7 @@ files:
446
464
  - lib/aspose_pdf_cloud/models/movie_annotations_response.rb
447
465
  - lib/aspose_pdf_cloud/models/object_exist.rb
448
466
  - lib/aspose_pdf_cloud/models/optimize_options.rb
467
+ - lib/aspose_pdf_cloud/models/option.rb
449
468
  - lib/aspose_pdf_cloud/models/page.rb
450
469
  - lib/aspose_pdf_cloud/models/page_number_stamp.rb
451
470
  - lib/aspose_pdf_cloud/models/page_word_count.rb
@@ -472,6 +491,11 @@ files:
472
491
  - lib/aspose_pdf_cloud/models/popup_annotations.rb
473
492
  - lib/aspose_pdf_cloud/models/popup_annotations_response.rb
474
493
  - lib/aspose_pdf_cloud/models/position.rb
494
+ - lib/aspose_pdf_cloud/models/radio_button_field.rb
495
+ - lib/aspose_pdf_cloud/models/radio_button_field_response.rb
496
+ - lib/aspose_pdf_cloud/models/radio_button_fields.rb
497
+ - lib/aspose_pdf_cloud/models/radio_button_fields_response.rb
498
+ - lib/aspose_pdf_cloud/models/radio_button_option_field.rb
475
499
  - lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb
476
500
  - lib/aspose_pdf_cloud/models/rectangle.rb
477
501
  - lib/aspose_pdf_cloud/models/redaction_annotation.rb