aspose_pdf_cloud 18.6.0 → 18.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +4 -4
  4. data/aspose_pdf_cloud.gemspec +49 -49
  5. data/lib/aspose_pdf_cloud.rb +145 -145
  6. data/lib/aspose_pdf_cloud/api/pdf_api.rb +11705 -10569
  7. data/lib/aspose_pdf_cloud/api_client.rb +60 -6
  8. data/lib/aspose_pdf_cloud/api_error.rb +47 -47
  9. data/lib/aspose_pdf_cloud/configuration.rb +185 -185
  10. data/lib/aspose_pdf_cloud/models/annotation.rb +260 -260
  11. data/lib/aspose_pdf_cloud/models/annotation_response.rb +222 -222
  12. data/lib/aspose_pdf_cloud/models/annotations.rb +211 -211
  13. data/lib/aspose_pdf_cloud/models/annotations_response.rb +222 -222
  14. data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +43 -43
  15. data/lib/aspose_pdf_cloud/models/append_document.rb +228 -228
  16. data/lib/aspose_pdf_cloud/models/attachment.rb +270 -270
  17. data/lib/aspose_pdf_cloud/models/attachment_response.rb +222 -222
  18. data/lib/aspose_pdf_cloud/models/attachments.rb +211 -211
  19. data/lib/aspose_pdf_cloud/models/attachments_response.rb +222 -222
  20. data/lib/aspose_pdf_cloud/models/color.rb +244 -244
  21. data/lib/aspose_pdf_cloud/models/color_depth.rb +45 -45
  22. data/lib/aspose_pdf_cloud/models/compression_type.rb +46 -46
  23. data/lib/aspose_pdf_cloud/models/doc_format.rb +43 -43
  24. data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +43 -43
  25. data/lib/aspose_pdf_cloud/models/document.rb +220 -220
  26. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +222 -222
  27. data/lib/aspose_pdf_cloud/models/document_privilege.rb +298 -298
  28. data/lib/aspose_pdf_cloud/models/document_properties.rb +211 -211
  29. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +222 -222
  30. data/lib/aspose_pdf_cloud/models/document_property.rb +227 -227
  31. data/lib/aspose_pdf_cloud/models/document_property_response.rb +222 -222
  32. data/lib/aspose_pdf_cloud/models/document_response.rb +233 -233
  33. data/lib/aspose_pdf_cloud/models/document_text_replace_response.rb +231 -231
  34. data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +44 -44
  35. data/lib/aspose_pdf_cloud/models/field.rb +254 -254
  36. data/lib/aspose_pdf_cloud/models/field_response.rb +222 -222
  37. data/lib/aspose_pdf_cloud/models/field_type.rb +1 -1
  38. data/lib/aspose_pdf_cloud/models/fields.rb +211 -211
  39. data/lib/aspose_pdf_cloud/models/fields_response.rb +222 -222
  40. data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +43 -43
  41. data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +45 -45
  42. data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -1
  43. data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -1
  44. data/lib/aspose_pdf_cloud/models/html_document_type.rb +43 -43
  45. data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +43 -43
  46. data/lib/aspose_pdf_cloud/models/http_status_code.rb +1 -1
  47. data/lib/aspose_pdf_cloud/models/image.rb +220 -220
  48. data/lib/aspose_pdf_cloud/models/image_response.rb +222 -222
  49. data/lib/aspose_pdf_cloud/models/image_src_type.rb +43 -43
  50. data/lib/aspose_pdf_cloud/models/image_template.rb +281 -281
  51. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +230 -230
  52. data/lib/aspose_pdf_cloud/models/images.rb +211 -211
  53. data/lib/aspose_pdf_cloud/models/images_list_request.rb +205 -205
  54. data/lib/aspose_pdf_cloud/models/images_response.rb +222 -222
  55. data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +43 -43
  56. data/lib/aspose_pdf_cloud/models/line_spacing.rb +43 -43
  57. data/lib/aspose_pdf_cloud/models/link.rb +228 -228
  58. data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -1
  59. data/lib/aspose_pdf_cloud/models/link_annotation.rb +236 -236
  60. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +222 -222
  61. data/lib/aspose_pdf_cloud/models/link_annotations.rb +211 -211
  62. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +222 -222
  63. data/lib/aspose_pdf_cloud/models/link_element.rb +200 -200
  64. data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -1
  65. data/lib/aspose_pdf_cloud/models/margin_info.rb +244 -244
  66. data/lib/aspose_pdf_cloud/models/merge_documents.rb +200 -200
  67. data/lib/aspose_pdf_cloud/models/optimize_options.rb +293 -293
  68. data/lib/aspose_pdf_cloud/models/page.rb +228 -228
  69. data/lib/aspose_pdf_cloud/models/page_text_replace_response.rb +231 -231
  70. data/lib/aspose_pdf_cloud/models/page_word_count.rb +218 -218
  71. data/lib/aspose_pdf_cloud/models/pages.rb +211 -211
  72. data/lib/aspose_pdf_cloud/models/paragraph.rb +303 -303
  73. data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +44 -44
  74. data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +43 -43
  75. data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +44 -44
  76. data/lib/aspose_pdf_cloud/models/rectangle.rb +244 -244
  77. data/lib/aspose_pdf_cloud/models/rotation.rb +1 -1
  78. data/lib/aspose_pdf_cloud/models/saa_spose_response.rb +213 -213
  79. data/lib/aspose_pdf_cloud/models/segment.rb +206 -206
  80. data/lib/aspose_pdf_cloud/models/shape_type.rb +44 -44
  81. data/lib/aspose_pdf_cloud/models/signature.rb +333 -333
  82. data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -1
  83. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +223 -223
  84. data/lib/aspose_pdf_cloud/models/split_result.rb +200 -200
  85. data/lib/aspose_pdf_cloud/models/split_result_document.rb +238 -238
  86. data/lib/aspose_pdf_cloud/models/split_result_response.rb +223 -223
  87. data/lib/aspose_pdf_cloud/models/stamp.rb +413 -413
  88. data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -1
  89. data/lib/aspose_pdf_cloud/models/text_format.rb +227 -227
  90. data/lib/aspose_pdf_cloud/models/text_format_response.rb +222 -222
  91. data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +47 -47
  92. data/lib/aspose_pdf_cloud/models/text_item.rb +218 -218
  93. data/lib/aspose_pdf_cloud/models/text_item_response.rb +222 -222
  94. data/lib/aspose_pdf_cloud/models/text_items.rb +211 -211
  95. data/lib/aspose_pdf_cloud/models/text_items_response.rb +222 -222
  96. data/lib/aspose_pdf_cloud/models/text_line.rb +210 -210
  97. data/lib/aspose_pdf_cloud/models/text_rect.rb +220 -220
  98. data/lib/aspose_pdf_cloud/models/text_rects.rb +199 -199
  99. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +222 -222
  100. data/lib/aspose_pdf_cloud/models/text_replace.rb +253 -253
  101. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +232 -232
  102. data/lib/aspose_pdf_cloud/models/text_replace_request.rb +262 -262
  103. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +222 -222
  104. data/lib/aspose_pdf_cloud/models/text_state.rb +248 -248
  105. data/lib/aspose_pdf_cloud/models/tiff_export_options.rb +348 -348
  106. data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +45 -45
  107. data/lib/aspose_pdf_cloud/models/word_count.rb +199 -199
  108. data/lib/aspose_pdf_cloud/models/word_count_response.rb +223 -223
  109. data/lib/aspose_pdf_cloud/models/wrap_mode.rb +44 -44
  110. data/lib/aspose_pdf_cloud/version.rb +24 -24
  111. data/test/pdf_tests.rb +3 -3
  112. data/test_data/.gitattributes +1 -0
  113. data/test_data/TexExample.tex +304 -304
  114. metadata +13 -12
@@ -1,43 +1,43 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for 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
-
24
- module AsposePdfCloud
25
- class FontEncodingRules
26
-
27
- DEFAULT = "Default".freeze
28
- DECREASE_TO_UNICODE_PRIORITY_LEVEL = "DecreaseToUnicodePriorityLevel".freeze
29
-
30
- # Builds the enum from string
31
- # @param [String] The enum value in the form of the string
32
- # @return [String] The enum value
33
- def build_from_hash(value)
34
- # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
- # consantValues = FontEncodingRules.constants.select{|c| c.to_s == value}
36
- constantValues = FontEncodingRules.constants.select{ |const_name| FontEncodingRules.const_get(const_name) == value}
37
-
38
- raise "Invalid ENUM value #{value} for class #FontEncodingRules" if constantValues.empty?
39
- value
40
- end
41
- end
42
-
43
- end
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+
24
+ module AsposePdfCloud
25
+ class FontEncodingRules
26
+
27
+ DEFAULT = "Default".freeze
28
+ DECREASE_TO_UNICODE_PRIORITY_LEVEL = "DecreaseToUnicodePriorityLevel".freeze
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
+ # consantValues = FontEncodingRules.constants.select{|c| c.to_s == value}
36
+ constantValues = FontEncodingRules.constants.select{ |const_name| FontEncodingRules.const_get(const_name) == value}
37
+
38
+ raise "Invalid ENUM value #{value} for class #FontEncodingRules" if constantValues.empty?
39
+ value
40
+ end
41
+ end
42
+
43
+ end
@@ -1,45 +1,45 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for 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
-
24
- module AsposePdfCloud
25
- class FontSavingModes
26
-
27
- ALWAYS_SAVE_AS_WOFF = "AlwaysSaveAsWOFF".freeze
28
- ALWAYS_SAVE_AS_TTF = "AlwaysSaveAsTTF".freeze
29
- ALWAYS_SAVE_AS_EOT = "AlwaysSaveAsEOT".freeze
30
- SAVE_IN_ALL_FORMATS = "SaveInAllFormats".freeze
31
-
32
- # Builds the enum from string
33
- # @param [String] The enum value in the form of the string
34
- # @return [String] The enum value
35
- def build_from_hash(value)
36
- # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
37
- # consantValues = FontSavingModes.constants.select{|c| c.to_s == value}
38
- constantValues = FontSavingModes.constants.select{ |const_name| FontSavingModes.const_get(const_name) == value}
39
-
40
- raise "Invalid ENUM value #{value} for class #FontSavingModes" if constantValues.empty?
41
- value
42
- end
43
- end
44
-
45
- end
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+
24
+ module AsposePdfCloud
25
+ class FontSavingModes
26
+
27
+ ALWAYS_SAVE_AS_WOFF = "AlwaysSaveAsWOFF".freeze
28
+ ALWAYS_SAVE_AS_TTF = "AlwaysSaveAsTTF".freeze
29
+ ALWAYS_SAVE_AS_EOT = "AlwaysSaveAsEOT".freeze
30
+ SAVE_IN_ALL_FORMATS = "SaveInAllFormats".freeze
31
+
32
+ # Builds the enum from string
33
+ # @param [String] The enum value in the form of the string
34
+ # @return [String] The enum value
35
+ def build_from_hash(value)
36
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
37
+ # consantValues = FontSavingModes.constants.select{|c| c.to_s == value}
38
+ constantValues = FontSavingModes.constants.select{ |const_name| FontSavingModes.const_get(const_name) == value}
39
+
40
+ raise "Invalid ENUM value #{value} for class #FontSavingModes" if constantValues.empty?
41
+ value
42
+ end
43
+ end
44
+
45
+ end
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for Cloud
3
+ Copyright (c) 2018 Aspose.PDF Cloud
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
6
6
  in the Software without restriction, including without limitation the rights
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for Cloud
3
+ Copyright (c) 2018 Aspose.PDF Cloud
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
6
6
  in the Software without restriction, including without limitation the rights
@@ -1,43 +1,43 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for 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
-
24
- module AsposePdfCloud
25
- class HtmlDocumentType
26
-
27
- XHTML = "Xhtml".freeze
28
- HTML5 = "Html5".freeze
29
-
30
- # Builds the enum from string
31
- # @param [String] The enum value in the form of the string
32
- # @return [String] The enum value
33
- def build_from_hash(value)
34
- # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
- # consantValues = HtmlDocumentType.constants.select{|c| c.to_s == value}
36
- constantValues = HtmlDocumentType.constants.select{ |const_name| HtmlDocumentType.const_get(const_name) == value}
37
-
38
- raise "Invalid ENUM value #{value} for class #HtmlDocumentType" if constantValues.empty?
39
- value
40
- end
41
- end
42
-
43
- end
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+
24
+ module AsposePdfCloud
25
+ class HtmlDocumentType
26
+
27
+ XHTML = "Xhtml".freeze
28
+ HTML5 = "Html5".freeze
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
+ # consantValues = HtmlDocumentType.constants.select{|c| c.to_s == value}
36
+ constantValues = HtmlDocumentType.constants.select{ |const_name| HtmlDocumentType.const_get(const_name) == value}
37
+
38
+ raise "Invalid ENUM value #{value} for class #HtmlDocumentType" if constantValues.empty?
39
+ value
40
+ end
41
+ end
42
+
43
+ end
@@ -1,43 +1,43 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for 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
-
24
- module AsposePdfCloud
25
- class HtmlMarkupGenerationModes
26
-
27
- WRITE_ALL_HTML = "WriteAllHtml".freeze
28
- WRITE_ONLY_BODY_CONTENT = "WriteOnlyBodyContent".freeze
29
-
30
- # Builds the enum from string
31
- # @param [String] The enum value in the form of the string
32
- # @return [String] The enum value
33
- def build_from_hash(value)
34
- # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
- # consantValues = HtmlMarkupGenerationModes.constants.select{|c| c.to_s == value}
36
- constantValues = HtmlMarkupGenerationModes.constants.select{ |const_name| HtmlMarkupGenerationModes.const_get(const_name) == value}
37
-
38
- raise "Invalid ENUM value #{value} for class #HtmlMarkupGenerationModes" if constantValues.empty?
39
- value
40
- end
41
- end
42
-
43
- end
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+
24
+ module AsposePdfCloud
25
+ class HtmlMarkupGenerationModes
26
+
27
+ WRITE_ALL_HTML = "WriteAllHtml".freeze
28
+ WRITE_ONLY_BODY_CONTENT = "WriteOnlyBodyContent".freeze
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
35
+ # consantValues = HtmlMarkupGenerationModes.constants.select{|c| c.to_s == value}
36
+ constantValues = HtmlMarkupGenerationModes.constants.select{ |const_name| HtmlMarkupGenerationModes.const_get(const_name) == value}
37
+
38
+ raise "Invalid ENUM value #{value} for class #HtmlMarkupGenerationModes" if constantValues.empty?
39
+ value
40
+ end
41
+ end
42
+
43
+ end
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for Cloud
3
+ Copyright (c) 2018 Aspose.PDF Cloud
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
6
6
  in the Software without restriction, including without limitation the rights
@@ -1,220 +1,220 @@
1
- =begin
2
- --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.Pdf for 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
-
24
- module AsposePdfCloud
25
- # Represents image DTO.
26
- class Image
27
- # Link to the document.
28
- attr_accessor :links
29
-
30
- # Gets width of the image.
31
- attr_accessor :width
32
-
33
- # Gets height of the image.
34
- attr_accessor :height
35
-
36
-
37
- # Attribute mapping from ruby-style variable name to JSON key.
38
- def self.attribute_map
39
- {
40
- :'links' => :'Links',
41
- :'width' => :'Width',
42
- :'height' => :'Height'
43
- }
44
- end
45
-
46
- # Attribute type mapping.
47
- def self.swagger_types
48
- {
49
- :'links' => :'Array<Link>',
50
- :'width' => :'Integer',
51
- :'height' => :'Integer'
52
- }
53
- end
54
-
55
- # Initializes the object
56
- # @param [Hash] attributes Model attributes in the form of hash
57
- def initialize(attributes = {})
58
- return unless attributes.is_a?(Hash)
59
-
60
- # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
-
63
- if attributes.has_key?(:'Links')
64
- if (value = attributes[:'Links']).is_a?(Array)
65
- self.links = value
66
- end
67
- end
68
-
69
- if attributes.has_key?(:'Width')
70
- self.width = attributes[:'Width']
71
- end
72
-
73
- if attributes.has_key?(:'Height')
74
- self.height = attributes[:'Height']
75
- end
76
-
77
- end
78
-
79
- # Show invalid properties with the reasons. Usually used together with valid?
80
- # @return Array for valid properies with the reasons
81
- def list_invalid_properties
82
- invalid_properties = Array.new
83
- return invalid_properties
84
- end
85
-
86
- # Check to see if the all the properties in the model are valid
87
- # @return true if the model is valid
88
- def valid?
89
- return true
90
- end
91
-
92
- # Checks equality by comparing each attribute.
93
- # @param [Object] Object to be compared
94
- def ==(o)
95
- return true if self.equal?(o)
96
- self.class == o.class &&
97
- links == o.links &&
98
- width == o.width &&
99
- height == o.height
100
- end
101
-
102
- # @see the `==` method
103
- # @param [Object] Object to be compared
104
- def eql?(o)
105
- self == o
106
- end
107
-
108
- # Calculates hash code according to all attributes.
109
- # @return [Fixnum] Hash code
110
- def hash
111
- [links, width, height].hash
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
- return nil unless attributes.is_a?(Hash)
119
- self.class.swagger_types.each_pair do |key, type|
120
- if type =~ /\AArray<(.*)>/i
121
- # check to ensure the input is an array given that the the attribute
122
- # is documented as an array but the input is not
123
- if attributes[self.class.attribute_map[key]].is_a?(Array)
124
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
- end
126
- elsif !attributes[self.class.attribute_map[key]].nil?
127
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
- end # or else data not found in attributes(hash), not an issue as the data can be optional
129
- end
130
-
131
- self
132
- end
133
-
134
- # Deserializes the data based on type
135
- # @param string type Data type
136
- # @param string value Value to be deserialized
137
- # @return [Object] Deserialized data
138
- def _deserialize(type, value)
139
- case type.to_sym
140
- when :DateTime
141
- DateTime.parse(value)
142
- when :Date
143
- Date.parse(value)
144
- when :String
145
- value.to_s
146
- when :Integer
147
- value.to_i
148
- when :Float
149
- value.to_f
150
- when :BOOLEAN
151
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
- true
153
- else
154
- false
155
- end
156
- when :Object
157
- # generic object (usually a Hash), return directly
158
- value
159
- when /\AArray<(?<inner_type>.+)>\z/
160
- inner_type = Regexp.last_match[:inner_type]
161
- value.map { |v| _deserialize(inner_type, v) }
162
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
- k_type = Regexp.last_match[:k_type]
164
- v_type = Regexp.last_match[:v_type]
165
- {}.tap do |hash|
166
- value.each do |k, v|
167
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
- end
169
- end
170
- else # model
171
- temp_model = AsposePdfCloud.const_get(type).new
172
- temp_model.build_from_hash(value)
173
- end
174
- end
175
-
176
- # Returns the string representation of the object
177
- # @return [String] String presentation of the object
178
- def to_s
179
- to_hash.to_s
180
- end
181
-
182
- # to_body is an alias to to_hash (backward compatibility)
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_body
185
- to_hash
186
- end
187
-
188
- # Returns the object in the form of hash
189
- # @return [Hash] Returns the object in the form of hash
190
- def to_hash
191
- hash = {}
192
- self.class.attribute_map.each_pair do |attr, param|
193
- value = self.send(attr)
194
- next if value.nil?
195
- hash[param] = _to_hash(value)
196
- end
197
- hash
198
- end
199
-
200
- # Outputs non-array value in the form of hash
201
- # For object, use to_hash. Otherwise, just return the value
202
- # @param [Object] value Any valid value
203
- # @return [Hash] Returns the value in the form of hash
204
- def _to_hash(value)
205
- if value.is_a?(Array)
206
- value.compact.map{ |v| _to_hash(v) }
207
- elsif value.is_a?(Hash)
208
- {}.tap do |hash|
209
- value.each { |k, v| hash[k] = _to_hash(v) }
210
- end
211
- elsif value.respond_to? :to_hash
212
- value.to_hash
213
- else
214
- value
215
- end
216
- end
217
-
218
- end
219
-
220
- end
1
+ =begin
2
+ --------------------------------------------------------------------------------------------------------------------
3
+ Copyright (c) 2018 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
+
24
+ module AsposePdfCloud
25
+ # Represents image DTO.
26
+ class Image
27
+ # Link to the document.
28
+ attr_accessor :links
29
+
30
+ # Gets width of the image.
31
+ attr_accessor :width
32
+
33
+ # Gets height of the image.
34
+ attr_accessor :height
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'links' => :'Links',
41
+ :'width' => :'Width',
42
+ :'height' => :'Height'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.swagger_types
48
+ {
49
+ :'links' => :'Array<Link>',
50
+ :'width' => :'Integer',
51
+ :'height' => :'Integer'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'Links')
64
+ if (value = attributes[:'Links']).is_a?(Array)
65
+ self.links = value
66
+ end
67
+ end
68
+
69
+ if attributes.has_key?(:'Width')
70
+ self.width = attributes[:'Width']
71
+ end
72
+
73
+ if attributes.has_key?(:'Height')
74
+ self.height = attributes[:'Height']
75
+ end
76
+
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properies with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ return invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ return true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ links == o.links &&
98
+ width == o.width &&
99
+ height == o.height
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Fixnum] Hash code
110
+ def hash
111
+ [links, width, height].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.swagger_types.each_pair do |key, type|
120
+ if type =~ /\AArray<(.*)>/i
121
+ # check to ensure the input is an array given that the the attribute
122
+ # is documented as an array but the input is not
123
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
124
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
125
+ end
126
+ elsif !attributes[self.class.attribute_map[key]].nil?
127
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
128
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
129
+ end
130
+
131
+ self
132
+ end
133
+
134
+ # Deserializes the data based on type
135
+ # @param string type Data type
136
+ # @param string value Value to be deserialized
137
+ # @return [Object] Deserialized data
138
+ def _deserialize(type, value)
139
+ case type.to_sym
140
+ when :DateTime
141
+ DateTime.parse(value)
142
+ when :Date
143
+ Date.parse(value)
144
+ when :String
145
+ value.to_s
146
+ when :Integer
147
+ value.to_i
148
+ when :Float
149
+ value.to_f
150
+ when :BOOLEAN
151
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
152
+ true
153
+ else
154
+ false
155
+ end
156
+ when :Object
157
+ # generic object (usually a Hash), return directly
158
+ value
159
+ when /\AArray<(?<inner_type>.+)>\z/
160
+ inner_type = Regexp.last_match[:inner_type]
161
+ value.map { |v| _deserialize(inner_type, v) }
162
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
163
+ k_type = Regexp.last_match[:k_type]
164
+ v_type = Regexp.last_match[:v_type]
165
+ {}.tap do |hash|
166
+ value.each do |k, v|
167
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
168
+ end
169
+ end
170
+ else # model
171
+ temp_model = AsposePdfCloud.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map{ |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end