aspose_pdf_cloud 1.0.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 (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 PageResponse < BaseObject
4
+ attr_accessor :page, :status, :code
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'page' => :'Page',
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
+ :'page' => :'Page',
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[:'Page']
39
+ self.page = attributes[:'Page']
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,69 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class PageTextReplaceResponse < BaseObject
4
+ attr_accessor :page, :matches, :status, :code
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'page' => :'Page',
11
+
12
+ #
13
+ :'matches' => :'Matches',
14
+
15
+ #
16
+ :'status' => :'Status',
17
+
18
+ #
19
+ :'code' => :'Code'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'page' => :'Page',
28
+ :'matches' => :'Integer',
29
+ :'status' => :'String',
30
+ :'code' => :'String'
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[:'Page']
43
+ self.page = attributes[:'Page']
44
+ end
45
+
46
+ if attributes[:'Matches']
47
+ self.matches = attributes[:'Matches']
48
+ end
49
+
50
+ if attributes[:'Status']
51
+ self.status = attributes[:'Status']
52
+ end
53
+
54
+ if attributes[:'Code']
55
+ self.code = attributes[:'Code']
56
+ end
57
+
58
+ end
59
+
60
+ def status=(status)
61
+ 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"]
62
+ if status && !allowed_values.include?(status)
63
+ fail "invalid value for 'status', must be one of #{allowed_values}"
64
+ end
65
+ @status = status
66
+ end
67
+
68
+ end
69
+ end
@@ -0,0 +1,45 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class PageWordCount < BaseObject
4
+ attr_accessor :page_number, :count
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'page_number' => :'PageNumber',
11
+
12
+ #
13
+ :'count' => :'Count'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'page_number' => :'Integer',
22
+ :'count' => :'Integer'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'PageNumber']
35
+ self.page_number = attributes[:'PageNumber']
36
+ end
37
+
38
+ if attributes[:'Count']
39
+ self.count = attributes[:'Count']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,49 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class Pages < BaseObject
4
+ attr_accessor :list, :links
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'list' => :'List',
11
+
12
+ #
13
+ :'links' => :'Links'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'list' => :'Array<Page>',
22
+ :'links' => :'Array<Link>'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'List']
35
+ if (value = attributes[:'List']).is_a?(Array)
36
+ self.list = value
37
+ end
38
+ end
39
+
40
+ if attributes[:'Links']
41
+ if (value = attributes[:'Links']).is_a?(Array)
42
+ self.links = value
43
+ end
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,61 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class Rectangle < BaseObject
4
+ attr_accessor :x, :y, :width, :height
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # The x coord
10
+ :'x' => :'X',
11
+
12
+ # The y coord
13
+ :'y' => :'Y',
14
+
15
+ # The width
16
+ :'width' => :'Width',
17
+
18
+ # The height
19
+ :'height' => :'Height'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'x' => :'Integer',
28
+ :'y' => :'Integer',
29
+ :'width' => :'Integer',
30
+ :'height' => :'Integer'
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[:'X']
43
+ self.x = attributes[:'X']
44
+ end
45
+
46
+ if attributes[:'Y']
47
+ self.y = attributes[:'Y']
48
+ end
49
+
50
+ if attributes[:'Width']
51
+ self.width = attributes[:'Width']
52
+ end
53
+
54
+ if attributes[:'Height']
55
+ self.height = attributes[:'Height']
56
+ end
57
+
58
+ end
59
+
60
+ end
61
+ end
@@ -0,0 +1,109 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class Signature < BaseObject
4
+ attr_accessor :signature_path, :signature_type, :password, :contact, :location, :visible, :rectangle, :form_field_name, :authority, :date
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # The SignaturePath
10
+ :'signature_path' => :'SignaturePath',
11
+
12
+ # The SignatureType
13
+ :'signature_type' => :'SignatureType',
14
+
15
+ # The Password
16
+ :'password' => :'Password',
17
+
18
+ # The Contact
19
+ :'contact' => :'Contact',
20
+
21
+ # The Location
22
+ :'location' => :'Location',
23
+
24
+ # The Visible
25
+ :'visible' => :'Visible',
26
+
27
+ # The Rectangle
28
+ :'rectangle' => :'Rectangle',
29
+
30
+ # The FormFieldName
31
+ :'form_field_name' => :'FormFieldName',
32
+
33
+ # The Authority
34
+ :'authority' => :'Authority',
35
+
36
+ # The Date
37
+ :'date' => :'Date'
38
+
39
+ }
40
+ end
41
+
42
+ # attribute type
43
+ def self.swagger_types
44
+ {
45
+ :'signature_path' => :'String',
46
+ :'signature_type' => :'String',
47
+ :'password' => :'String',
48
+ :'contact' => :'String',
49
+ :'location' => :'String',
50
+ :'visible' => :'BOOLEAN',
51
+ :'rectangle' => :'Rectangle',
52
+ :'form_field_name' => :'String',
53
+ :'authority' => :'String',
54
+ :'date' => :'String'
55
+
56
+ }
57
+ end
58
+
59
+ def initialize(attributes = {})
60
+ return if !attributes.is_a?(Hash) || attributes.empty?
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
64
+
65
+
66
+ if attributes[:'SignaturePath']
67
+ self.signature_path = attributes[:'SignaturePath']
68
+ end
69
+
70
+ if attributes[:'SignatureType']
71
+ self.signature_type = attributes[:'SignatureType']
72
+ end
73
+
74
+ if attributes[:'Password']
75
+ self.password = attributes[:'Password']
76
+ end
77
+
78
+ if attributes[:'Contact']
79
+ self.contact = attributes[:'Contact']
80
+ end
81
+
82
+ if attributes[:'Location']
83
+ self.location = attributes[:'Location']
84
+ end
85
+
86
+ if attributes[:'Visible']
87
+ self.visible = attributes[:'Visible']
88
+ end
89
+
90
+ if attributes[:'Rectangle']
91
+ self.rectangle = attributes[:'Rectangle']
92
+ end
93
+
94
+ if attributes[:'FormFieldName']
95
+ self.form_field_name = attributes[:'FormFieldName']
96
+ end
97
+
98
+ if attributes[:'Authority']
99
+ self.authority = attributes[:'Authority']
100
+ end
101
+
102
+ if attributes[:'Date']
103
+ self.date = attributes[:'Date']
104
+ end
105
+
106
+ end
107
+
108
+ end
109
+ end
@@ -0,0 +1,39 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class SplitResult < BaseObject
4
+ attr_accessor :documents
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'documents' => :'Documents'
11
+
12
+ }
13
+ end
14
+
15
+ # attribute type
16
+ def self.swagger_types
17
+ {
18
+ :'documents' => :'Array<SplitResultDocument>'
19
+
20
+ }
21
+ end
22
+
23
+ def initialize(attributes = {})
24
+ return if !attributes.is_a?(Hash) || attributes.empty?
25
+
26
+ # convert string to symbol for hash key
27
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
28
+
29
+
30
+ if attributes[:'Documents']
31
+ if (value = attributes[:'Documents']).is_a?(Array)
32
+ self.documents = value
33
+ end
34
+ end
35
+
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,69 @@
1
+ module AsposePDFCloud
2
+ #
3
+ class SplitResultDocument < BaseObject
4
+ attr_accessor :id, :href, :rel, :type, :title
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'id' => :'Id',
11
+
12
+ #
13
+ :'href' => :'Href',
14
+
15
+ #
16
+ :'rel' => :'Rel',
17
+
18
+ #
19
+ :'type' => :'Type',
20
+
21
+ #
22
+ :'title' => :'Title'
23
+
24
+ }
25
+ end
26
+
27
+ # attribute type
28
+ def self.swagger_types
29
+ {
30
+ :'id' => :'Integer',
31
+ :'href' => :'String',
32
+ :'rel' => :'String',
33
+ :'type' => :'String',
34
+ :'title' => :'String'
35
+
36
+ }
37
+ end
38
+
39
+ def initialize(attributes = {})
40
+ return if !attributes.is_a?(Hash) || attributes.empty?
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
44
+
45
+
46
+ if attributes[:'Id']
47
+ self.id = attributes[:'Id']
48
+ end
49
+
50
+ if attributes[:'Href']
51
+ self.href = attributes[:'Href']
52
+ end
53
+
54
+ if attributes[:'Rel']
55
+ self.rel = attributes[:'Rel']
56
+ end
57
+
58
+ if attributes[:'Type']
59
+ self.type = attributes[:'Type']
60
+ end
61
+
62
+ if attributes[:'Title']
63
+ self.title = attributes[:'Title']
64
+ end
65
+
66
+ end
67
+
68
+ end
69
+ end