aspose_pdf_cloud 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +41 -0
  4. data/aspose_pdf_cloud.gemspec +26 -0
  5. data/lib/aspose_pdf_cloud.rb +91 -0
  6. data/lib/aspose_pdf_cloud/api/pdf_api.rb +3318 -0
  7. data/lib/aspose_pdf_cloud/api_client.rb +335 -0
  8. data/lib/aspose_pdf_cloud/api_error.rb +24 -0
  9. data/lib/aspose_pdf_cloud/configuration.rb +166 -0
  10. data/lib/aspose_pdf_cloud/models/annotation.rb +87 -0
  11. data/lib/aspose_pdf_cloud/models/annotation_response.rb +61 -0
  12. data/lib/aspose_pdf_cloud/models/annotations.rb +49 -0
  13. data/lib/aspose_pdf_cloud/models/annotations_response.rb +61 -0
  14. data/lib/aspose_pdf_cloud/models/append_document.rb +53 -0
  15. data/lib/aspose_pdf_cloud/models/attachment.rb +95 -0
  16. data/lib/aspose_pdf_cloud/models/attachment_response.rb +61 -0
  17. data/lib/aspose_pdf_cloud/models/attachments.rb +49 -0
  18. data/lib/aspose_pdf_cloud/models/attachments_response.rb +61 -0
  19. data/lib/aspose_pdf_cloud/models/barcode_response_list.rb +45 -0
  20. data/lib/aspose_pdf_cloud/models/base_object.rb +86 -0
  21. data/lib/aspose_pdf_cloud/models/base_response.rb +61 -0
  22. data/lib/aspose_pdf_cloud/models/bookmarks.rb +49 -0
  23. data/lib/aspose_pdf_cloud/models/bookmarks_response.rb +61 -0
  24. data/lib/aspose_pdf_cloud/models/color.rb +61 -0
  25. data/lib/aspose_pdf_cloud/models/document.rb +55 -0
  26. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +61 -0
  27. data/lib/aspose_pdf_cloud/models/document_properties.rb +49 -0
  28. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +61 -0
  29. data/lib/aspose_pdf_cloud/models/document_property.rb +63 -0
  30. data/lib/aspose_pdf_cloud/models/document_property_response.rb +61 -0
  31. data/lib/aspose_pdf_cloud/models/document_response.rb +61 -0
  32. data/lib/aspose_pdf_cloud/models/document_text_replace_response.rb +69 -0
  33. data/lib/aspose_pdf_cloud/models/field.rb +83 -0
  34. data/lib/aspose_pdf_cloud/models/field_response.rb +61 -0
  35. data/lib/aspose_pdf_cloud/models/fields.rb +49 -0
  36. data/lib/aspose_pdf_cloud/models/fields_response.rb +61 -0
  37. data/lib/aspose_pdf_cloud/models/image.rb +55 -0
  38. data/lib/aspose_pdf_cloud/models/image_response.rb +61 -0
  39. data/lib/aspose_pdf_cloud/models/images.rb +49 -0
  40. data/lib/aspose_pdf_cloud/models/images_response.rb +61 -0
  41. data/lib/aspose_pdf_cloud/models/link.rb +61 -0
  42. data/lib/aspose_pdf_cloud/models/link_annotation.rb +71 -0
  43. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +61 -0
  44. data/lib/aspose_pdf_cloud/models/link_annotations.rb +49 -0
  45. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +61 -0
  46. data/lib/aspose_pdf_cloud/models/link_element.rb +39 -0
  47. data/lib/aspose_pdf_cloud/models/merge_documents.rb +39 -0
  48. data/lib/aspose_pdf_cloud/models/page.rb +63 -0
  49. data/lib/aspose_pdf_cloud/models/page_response.rb +61 -0
  50. data/lib/aspose_pdf_cloud/models/page_text_replace_response.rb +69 -0
  51. data/lib/aspose_pdf_cloud/models/page_word_count.rb +45 -0
  52. data/lib/aspose_pdf_cloud/models/pages.rb +49 -0
  53. data/lib/aspose_pdf_cloud/models/rectangle.rb +61 -0
  54. data/lib/aspose_pdf_cloud/models/signature.rb +109 -0
  55. data/lib/aspose_pdf_cloud/models/split_result.rb +39 -0
  56. data/lib/aspose_pdf_cloud/models/split_result_document.rb +69 -0
  57. data/lib/aspose_pdf_cloud/models/split_result_response.rb +61 -0
  58. data/lib/aspose_pdf_cloud/models/stamp.rb +205 -0
  59. data/lib/aspose_pdf_cloud/models/text_format.rb +63 -0
  60. data/lib/aspose_pdf_cloud/models/text_format_response.rb +61 -0
  61. data/lib/aspose_pdf_cloud/models/text_item.rb +55 -0
  62. data/lib/aspose_pdf_cloud/models/text_item_response.rb +61 -0
  63. data/lib/aspose_pdf_cloud/models/text_items.rb +49 -0
  64. data/lib/aspose_pdf_cloud/models/text_items_response.rb +61 -0
  65. data/lib/aspose_pdf_cloud/models/text_replace.rb +53 -0
  66. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +39 -0
  67. data/lib/aspose_pdf_cloud/models/text_state.rb +69 -0
  68. data/lib/aspose_pdf_cloud/models/tiff_export_options.rb +157 -0
  69. data/lib/aspose_pdf_cloud/models/word_count.rb +39 -0
  70. data/lib/aspose_pdf_cloud/models/word_count_response.rb +61 -0
  71. data/lib/aspose_pdf_cloud/version.rb +3 -0
  72. data/test/data/Sample-Annotation-Property.pdf +0 -0
  73. data/test/data/Sample-Annotation.pdf +0 -0
  74. data/test/data/Sample-Bookmark.pdf +0 -0
  75. data/test/data/Sample.pdf +0 -0
  76. data/test/data/SampleAttachment.pdf +0 -0
  77. data/test/data/SampleBarCodeImage.pdf +0 -0
  78. data/test/data/SampleImage.pdf +0 -0
  79. data/test/data/aspose-cloud.png +0 -0
  80. data/test/data/pkc7-sample.pfx +0 -0
  81. data/test/data/sample-field.pdf +0 -0
  82. data/test/data/sample-home.jpg +0 -0
  83. data/test/data/sample-input-2.pdf +0 -0
  84. data/test/data/sample-input.pdf +0 -0
  85. data/test/data/sample-merged.pdf +0 -0
  86. data/test/data/sample.tiff +0 -0
  87. data/test/pdf_tests.rb +623 -0
  88. metadata +216 -0
@@ -0,0 +1,61 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class SplitResultResponse < BaseObject
4
+ attr_accessor :result, :status, :code
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'result' => :'Result',
11
+
12
+ #
13
+ :'status' => :'Status',
14
+
15
+ #
16
+ :'code' => :'Code'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'result' => :'SplitResult',
25
+ :'status' => :'String',
26
+ :'code' => :'String'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'Result']
39
+ self.result = attributes[:'Result']
40
+ end
41
+
42
+ if attributes[:'Status']
43
+ self.status = attributes[:'Status']
44
+ end
45
+
46
+ if attributes[:'Code']
47
+ self.code = attributes[:'Code']
48
+ end
49
+
50
+ end
51
+
52
+ def status=(status)
53
+ allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
54
+ if status && !allowed_values.include?(status)
55
+ fail "invalid value for 'status', must be one of #{allowed_values}"
56
+ end
57
+ @status = status
58
+ end
59
+
60
+ end
61
+ end
@@ -0,0 +1,205 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class Stamp < BaseObject
4
+ attr_accessor :type, :background, :bottom_margin, :horizontal_alignment, :left_margin, :opacity, :right_margin, :rotate, :rotate_angle, :top_margin, :vertical_alignment, :x_indent, :y_indent, :zoom, :text_alignment, :value, :text_state, :file_name, :width, :height, :page_index, :starting_number
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'type' => :'Type',
11
+
12
+ #
13
+ :'background' => :'Background',
14
+
15
+ #
16
+ :'bottom_margin' => :'BottomMargin',
17
+
18
+ #
19
+ :'horizontal_alignment' => :'HorizontalAlignment',
20
+
21
+ #
22
+ :'left_margin' => :'LeftMargin',
23
+
24
+ #
25
+ :'opacity' => :'Opacity',
26
+
27
+ #
28
+ :'right_margin' => :'RightMargin',
29
+
30
+ #
31
+ :'rotate' => :'Rotate',
32
+
33
+ #
34
+ :'rotate_angle' => :'RotateAngle',
35
+
36
+ #
37
+ :'top_margin' => :'TopMargin',
38
+
39
+ #
40
+ :'vertical_alignment' => :'VerticalAlignment',
41
+
42
+ #
43
+ :'x_indent' => :'XIndent',
44
+
45
+ #
46
+ :'y_indent' => :'YIndent',
47
+
48
+ #
49
+ :'zoom' => :'Zoom',
50
+
51
+ #
52
+ :'text_alignment' => :'TextAlignment',
53
+
54
+ #
55
+ :'value' => :'Value',
56
+
57
+ #
58
+ :'text_state' => :'TextState',
59
+
60
+ #
61
+ :'file_name' => :'FileName',
62
+
63
+ #
64
+ :'width' => :'Width',
65
+
66
+ #
67
+ :'height' => :'Height',
68
+
69
+ #
70
+ :'page_index' => :'PageIndex',
71
+
72
+ #
73
+ :'starting_number' => :'StartingNumber'
74
+
75
+ }
76
+ end
77
+
78
+ # attribute type
79
+ def self.swagger_types
80
+ {
81
+ :'type' => :'String',
82
+ :'background' => :'BOOLEAN',
83
+ :'bottom_margin' => :'Float',
84
+ :'horizontal_alignment' => :'String',
85
+ :'left_margin' => :'Float',
86
+ :'opacity' => :'Float',
87
+ :'right_margin' => :'Float',
88
+ :'rotate' => :'String',
89
+ :'rotate_angle' => :'Float',
90
+ :'top_margin' => :'Float',
91
+ :'vertical_alignment' => :'String',
92
+ :'x_indent' => :'Float',
93
+ :'y_indent' => :'Float',
94
+ :'zoom' => :'Float',
95
+ :'text_alignment' => :'String',
96
+ :'value' => :'String',
97
+ :'text_state' => :'TextState',
98
+ :'file_name' => :'String',
99
+ :'width' => :'Float',
100
+ :'height' => :'Float',
101
+ :'page_index' => :'Integer',
102
+ :'starting_number' => :'Integer'
103
+
104
+ }
105
+ end
106
+
107
+ def initialize(attributes = {})
108
+ return if !attributes.is_a?(Hash) || attributes.empty?
109
+
110
+ # convert string to symbol for hash key
111
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
112
+
113
+
114
+ if attributes[:'Type']
115
+ self.type = attributes[:'Type']
116
+ end
117
+
118
+ if attributes[:'Background']
119
+ self.background = attributes[:'Background']
120
+ end
121
+
122
+ if attributes[:'BottomMargin']
123
+ self.bottom_margin = attributes[:'BottomMargin']
124
+ end
125
+
126
+ if attributes[:'HorizontalAlignment']
127
+ self.horizontal_alignment = attributes[:'HorizontalAlignment']
128
+ end
129
+
130
+ if attributes[:'LeftMargin']
131
+ self.left_margin = attributes[:'LeftMargin']
132
+ end
133
+
134
+ if attributes[:'Opacity']
135
+ self.opacity = attributes[:'Opacity']
136
+ end
137
+
138
+ if attributes[:'RightMargin']
139
+ self.right_margin = attributes[:'RightMargin']
140
+ end
141
+
142
+ if attributes[:'Rotate']
143
+ self.rotate = attributes[:'Rotate']
144
+ end
145
+
146
+ if attributes[:'RotateAngle']
147
+ self.rotate_angle = attributes[:'RotateAngle']
148
+ end
149
+
150
+ if attributes[:'TopMargin']
151
+ self.top_margin = attributes[:'TopMargin']
152
+ end
153
+
154
+ if attributes[:'VerticalAlignment']
155
+ self.vertical_alignment = attributes[:'VerticalAlignment']
156
+ end
157
+
158
+ if attributes[:'XIndent']
159
+ self.x_indent = attributes[:'XIndent']
160
+ end
161
+
162
+ if attributes[:'YIndent']
163
+ self.y_indent = attributes[:'YIndent']
164
+ end
165
+
166
+ if attributes[:'Zoom']
167
+ self.zoom = attributes[:'Zoom']
168
+ end
169
+
170
+ if attributes[:'TextAlignment']
171
+ self.text_alignment = attributes[:'TextAlignment']
172
+ end
173
+
174
+ if attributes[:'Value']
175
+ self.value = attributes[:'Value']
176
+ end
177
+
178
+ if attributes[:'TextState']
179
+ self.text_state = attributes[:'TextState']
180
+ end
181
+
182
+ if attributes[:'FileName']
183
+ self.file_name = attributes[:'FileName']
184
+ end
185
+
186
+ if attributes[:'Width']
187
+ self.width = attributes[:'Width']
188
+ end
189
+
190
+ if attributes[:'Height']
191
+ self.height = attributes[:'Height']
192
+ end
193
+
194
+ if attributes[:'PageIndex']
195
+ self.page_index = attributes[:'PageIndex']
196
+ end
197
+
198
+ if attributes[:'StartingNumber']
199
+ self.starting_number = attributes[:'StartingNumber']
200
+ end
201
+
202
+ end
203
+
204
+ end
205
+ end
@@ -0,0 +1,63 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class TextFormat < BaseObject
4
+ attr_accessor :color, :font_size, :font_name, :links
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'color' => :'Color',
11
+
12
+ #
13
+ :'font_size' => :'FontSize',
14
+
15
+ #
16
+ :'font_name' => :'FontName',
17
+
18
+ #
19
+ :'links' => :'Links'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'color' => :'Color',
28
+ :'font_size' => :'Float',
29
+ :'font_name' => :'String',
30
+ :'links' => :'Array<Link>'
31
+
32
+ }
33
+ end
34
+
35
+ def initialize(attributes = {})
36
+ return if !attributes.is_a?(Hash) || attributes.empty?
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
40
+
41
+
42
+ if attributes[:'Color']
43
+ self.color = attributes[:'Color']
44
+ end
45
+
46
+ if attributes[:'FontSize']
47
+ self.font_size = attributes[:'FontSize']
48
+ end
49
+
50
+ if attributes[:'FontName']
51
+ self.font_name = attributes[:'FontName']
52
+ end
53
+
54
+ if attributes[:'Links']
55
+ if (value = attributes[:'Links']).is_a?(Array)
56
+ self.links = value
57
+ end
58
+ end
59
+
60
+ end
61
+
62
+ end
63
+ end
@@ -0,0 +1,61 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class TextFormatResponse < BaseObject
4
+ attr_accessor :text_format, :status, :code
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'text_format' => :'TextFormat',
11
+
12
+ #
13
+ :'status' => :'Status',
14
+
15
+ #
16
+ :'code' => :'Code'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'text_format' => :'TextFormat',
25
+ :'status' => :'String',
26
+ :'code' => :'String'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'TextFormat']
39
+ self.text_format = attributes[:'TextFormat']
40
+ end
41
+
42
+ if attributes[:'Status']
43
+ self.status = attributes[:'Status']
44
+ end
45
+
46
+ if attributes[:'Code']
47
+ self.code = attributes[:'Code']
48
+ end
49
+
50
+ end
51
+
52
+ def status=(status)
53
+ allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
54
+ if status && !allowed_values.include?(status)
55
+ fail "invalid value for 'status', must be one of #{allowed_values}"
56
+ end
57
+ @status = status
58
+ end
59
+
60
+ end
61
+ end
@@ -0,0 +1,55 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class TextItem < BaseObject
4
+ attr_accessor :text, :format, :links
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'text' => :'Text',
11
+
12
+ #
13
+ :'format' => :'Format',
14
+
15
+ #
16
+ :'links' => :'Links'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'text' => :'String',
25
+ :'format' => :'TextFormat',
26
+ :'links' => :'Array<Link>'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'Text']
39
+ self.text = attributes[:'Text']
40
+ end
41
+
42
+ if attributes[:'Format']
43
+ self.format = attributes[:'Format']
44
+ end
45
+
46
+ if attributes[:'Links']
47
+ if (value = attributes[:'Links']).is_a?(Array)
48
+ self.links = value
49
+ end
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+ end