aspose_pdf_cloud 19.5.0 → 19.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -26
  3. data/docs/Annotation.md +1 -1
  4. data/docs/AnnotationInfo.md +2 -2
  5. data/docs/Attachment.md +1 -1
  6. data/docs/Bookmark.md +25 -0
  7. data/docs/{FileExistResponse.md → BookmarkResponse.md} +3 -3
  8. data/docs/Bookmarks.md +10 -0
  9. data/docs/{DiscUsageResponse.md → BookmarksResponse.md} +3 -3
  10. data/docs/CaretAnnotation.md +1 -1
  11. data/docs/CellRecognized.md +1 -1
  12. data/docs/CircleAnnotation.md +1 -1
  13. data/docs/CommonFigureAnnotation.md +1 -1
  14. data/docs/DiscUsage.md +3 -3
  15. data/docs/DocumentPrivilege.md +1 -1
  16. data/docs/DocumentProperty.md +1 -1
  17. data/docs/Error.md +12 -0
  18. data/docs/ErrorDetails.md +10 -0
  19. data/docs/Field.md +1 -1
  20. data/docs/Fields.md +1 -1
  21. data/docs/FileAttachmentAnnotation.md +1 -1
  22. data/docs/FileVersion.md +8 -8
  23. data/docs/FileVersions.md +9 -0
  24. data/docs/FilesList.md +9 -0
  25. data/docs/FilesUploadResult.md +10 -0
  26. data/docs/FreeTextAnnotation.md +2 -2
  27. data/docs/GraphInfo.md +2 -2
  28. data/docs/HighlightAnnotation.md +1 -1
  29. data/docs/Image.md +3 -3
  30. data/docs/ImageFooter.md +1 -1
  31. data/docs/ImageHeader.md +1 -1
  32. data/docs/ImageStamp.md +1 -1
  33. data/docs/InkAnnotation.md +1 -1
  34. data/docs/LineAnnotation.md +3 -3
  35. data/docs/LinkAnnotation.md +4 -4
  36. data/docs/MarkupAnnotation.md +1 -1
  37. data/docs/MovieAnnotation.md +1 -1
  38. data/docs/ObjectExist.md +10 -0
  39. data/docs/Page.md +1 -1
  40. data/docs/PageNumberStamp.md +1 -1
  41. data/docs/PdfApi.md +560 -328
  42. data/docs/PdfPageStamp.md +1 -1
  43. data/docs/PolyAnnotation.md +2 -2
  44. data/docs/PolyLineAnnotation.md +2 -2
  45. data/docs/PolygonAnnotation.md +2 -2
  46. data/docs/PopupAnnotation.md +1 -1
  47. data/docs/PopupAnnotationWithParent.md +1 -1
  48. data/docs/RedactionAnnotation.md +1 -1
  49. data/docs/ScreenAnnotation.md +1 -1
  50. data/docs/Signature.md +1 -1
  51. data/docs/SignatureVerifyResponse.md +1 -1
  52. data/docs/SoundAnnotation.md +2 -2
  53. data/docs/SplitResultDocument.md +1 -1
  54. data/docs/SquareAnnotation.md +1 -1
  55. data/docs/SquigglyAnnotation.md +1 -1
  56. data/docs/Stamp.md +2 -2
  57. data/docs/StampAnnotation.md +1 -1
  58. data/docs/StampBase.md +1 -1
  59. data/docs/StampInfo.md +1 -1
  60. data/docs/StorageExist.md +9 -0
  61. data/docs/StorageFile.md +13 -0
  62. data/docs/StrikeOutAnnotation.md +1 -1
  63. data/docs/Table.md +1 -1
  64. data/docs/TextAnnotation.md +1 -1
  65. data/docs/TextFooter.md +2 -2
  66. data/docs/TextHeader.md +2 -2
  67. data/docs/TextRect.md +3 -3
  68. data/docs/TextReplaceListRequest.md +1 -1
  69. data/docs/TextReplaceResponse.md +1 -1
  70. data/docs/TextStamp.md +2 -2
  71. data/docs/UnderlineAnnotation.md +1 -1
  72. data/docs/WordCountResponse.md +1 -1
  73. data/lib/aspose_pdf_cloud.rb +12 -8
  74. data/lib/aspose_pdf_cloud/api/pdf_api.rb +2521 -1650
  75. data/lib/aspose_pdf_cloud/api_client.rb +2 -54
  76. data/lib/aspose_pdf_cloud/configuration.rb +2 -5
  77. data/lib/aspose_pdf_cloud/models/annotation.rb +7 -4
  78. data/lib/aspose_pdf_cloud/models/annotation_info.rb +12 -4
  79. data/lib/aspose_pdf_cloud/models/annotations_info.rb +2 -4
  80. data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +2 -4
  81. data/lib/aspose_pdf_cloud/models/aspose_response.rb +2 -4
  82. data/lib/aspose_pdf_cloud/models/attachment.rb +7 -4
  83. data/lib/aspose_pdf_cloud/models/attachment_response.rb +2 -4
  84. data/lib/aspose_pdf_cloud/models/attachments.rb +2 -4
  85. data/lib/aspose_pdf_cloud/models/attachments_response.rb +2 -4
  86. data/lib/aspose_pdf_cloud/models/{append_document.rb → bookmark.rb} +167 -42
  87. data/lib/aspose_pdf_cloud/models/{storage_exist_response.rb → bookmark_response.rb} +12 -13
  88. data/lib/aspose_pdf_cloud/models/{files_response.rb → bookmarks.rb} +22 -36
  89. data/lib/aspose_pdf_cloud/models/{disc_usage_response.rb → bookmarks_response.rb} +12 -13
  90. data/lib/aspose_pdf_cloud/models/border_info.rb +2 -4
  91. data/lib/aspose_pdf_cloud/models/caret_annotation.rb +7 -4
  92. data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +2 -4
  93. data/lib/aspose_pdf_cloud/models/caret_annotations.rb +2 -4
  94. data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +2 -4
  95. data/lib/aspose_pdf_cloud/models/cell.rb +2 -4
  96. data/lib/aspose_pdf_cloud/models/cell_recognized.rb +3 -5
  97. data/lib/aspose_pdf_cloud/models/circle_annotation.rb +7 -4
  98. data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +2 -4
  99. data/lib/aspose_pdf_cloud/models/circle_annotations.rb +2 -4
  100. data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +2 -4
  101. data/lib/aspose_pdf_cloud/models/color.rb +2 -4
  102. data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +7 -4
  103. data/lib/aspose_pdf_cloud/models/disc_usage.rb +5 -5
  104. data/lib/aspose_pdf_cloud/models/document.rb +2 -4
  105. data/lib/aspose_pdf_cloud/models/document_page_response.rb +2 -4
  106. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +2 -4
  107. data/lib/aspose_pdf_cloud/models/document_privilege.rb +3 -5
  108. data/lib/aspose_pdf_cloud/models/document_properties.rb +2 -4
  109. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +2 -4
  110. data/lib/aspose_pdf_cloud/models/document_property.rb +7 -4
  111. data/lib/aspose_pdf_cloud/models/document_property_response.rb +2 -4
  112. data/lib/aspose_pdf_cloud/models/document_response.rb +2 -4
  113. data/lib/aspose_pdf_cloud/models/{file_exist_response.rb → error.rb} +31 -27
  114. data/lib/aspose_pdf_cloud/models/error_details.rb +214 -0
  115. data/lib/aspose_pdf_cloud/models/field.rb +7 -4
  116. data/lib/aspose_pdf_cloud/models/field_response.rb +2 -4
  117. data/lib/aspose_pdf_cloud/models/fields.rb +7 -4
  118. data/lib/aspose_pdf_cloud/models/fields_response.rb +2 -4
  119. data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +7 -4
  120. data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +2 -4
  121. data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +2 -4
  122. data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +2 -4
  123. data/lib/aspose_pdf_cloud/models/file_version.rb +15 -5
  124. data/lib/aspose_pdf_cloud/models/file_versions.rb +201 -0
  125. data/lib/aspose_pdf_cloud/models/files_list.rb +201 -0
  126. data/lib/aspose_pdf_cloud/models/files_upload_result.rb +213 -0
  127. data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +12 -4
  128. data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +2 -4
  129. data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +2 -4
  130. data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +2 -4
  131. data/lib/aspose_pdf_cloud/models/graph_info.rb +4 -6
  132. data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +7 -4
  133. data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +2 -4
  134. data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +2 -4
  135. data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +2 -4
  136. data/lib/aspose_pdf_cloud/models/image.rb +17 -4
  137. data/lib/aspose_pdf_cloud/models/image_footer.rb +3 -5
  138. data/lib/aspose_pdf_cloud/models/image_header.rb +3 -5
  139. data/lib/aspose_pdf_cloud/models/image_response.rb +2 -4
  140. data/lib/aspose_pdf_cloud/models/image_stamp.rb +3 -5
  141. data/lib/aspose_pdf_cloud/models/image_template.rb +21 -4
  142. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +2 -4
  143. data/lib/aspose_pdf_cloud/models/images.rb +2 -4
  144. data/lib/aspose_pdf_cloud/models/images_response.rb +2 -4
  145. data/lib/aspose_pdf_cloud/models/ink_annotation.rb +7 -4
  146. data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +2 -4
  147. data/lib/aspose_pdf_cloud/models/ink_annotations.rb +2 -4
  148. data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +2 -4
  149. data/lib/aspose_pdf_cloud/models/line_annotation.rb +17 -4
  150. data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +2 -4
  151. data/lib/aspose_pdf_cloud/models/line_annotations.rb +2 -4
  152. data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +2 -4
  153. data/lib/aspose_pdf_cloud/models/link.rb +2 -4
  154. data/lib/aspose_pdf_cloud/models/link_annotation.rb +41 -4
  155. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +2 -4
  156. data/lib/aspose_pdf_cloud/models/link_annotations.rb +2 -4
  157. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +2 -4
  158. data/lib/aspose_pdf_cloud/models/link_element.rb +2 -4
  159. data/lib/aspose_pdf_cloud/models/margin_info.rb +2 -4
  160. data/lib/aspose_pdf_cloud/models/markup_annotation.rb +7 -4
  161. data/lib/aspose_pdf_cloud/models/merge_documents.rb +2 -4
  162. data/lib/aspose_pdf_cloud/models/movie_annotation.rb +7 -4
  163. data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +2 -4
  164. data/lib/aspose_pdf_cloud/models/movie_annotations.rb +2 -4
  165. data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +2 -4
  166. data/lib/aspose_pdf_cloud/models/{file_exist.rb → object_exist.rb} +16 -16
  167. data/lib/aspose_pdf_cloud/models/optimize_options.rb +2 -4
  168. data/lib/aspose_pdf_cloud/models/page.rb +7 -4
  169. data/lib/aspose_pdf_cloud/models/page_number_stamp.rb +3 -5
  170. data/lib/aspose_pdf_cloud/models/page_word_count.rb +2 -4
  171. data/lib/aspose_pdf_cloud/models/pages.rb +2 -4
  172. data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -4
  173. data/lib/aspose_pdf_cloud/models/pdf_page_stamp.rb +3 -5
  174. data/lib/aspose_pdf_cloud/models/point.rb +2 -4
  175. data/lib/aspose_pdf_cloud/models/poly_annotation.rb +12 -4
  176. data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +12 -4
  177. data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +2 -4
  178. data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +2 -4
  179. data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +2 -4
  180. data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +12 -4
  181. data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +2 -4
  182. data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +2 -4
  183. data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +2 -4
  184. data/lib/aspose_pdf_cloud/models/popup_annotation.rb +7 -4
  185. data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +2 -4
  186. data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +7 -4
  187. data/lib/aspose_pdf_cloud/models/popup_annotations.rb +2 -4
  188. data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +2 -4
  189. data/lib/aspose_pdf_cloud/models/position.rb +2 -4
  190. data/lib/aspose_pdf_cloud/models/rectangle.rb +2 -4
  191. data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +7 -4
  192. data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +2 -4
  193. data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +2 -4
  194. data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +2 -4
  195. data/lib/aspose_pdf_cloud/models/row.rb +2 -4
  196. data/lib/aspose_pdf_cloud/models/row_recognized.rb +2 -4
  197. data/lib/aspose_pdf_cloud/models/screen_annotation.rb +7 -4
  198. data/lib/aspose_pdf_cloud/models/screen_annotation_response.rb +2 -4
  199. data/lib/aspose_pdf_cloud/models/screen_annotations.rb +2 -4
  200. data/lib/aspose_pdf_cloud/models/screen_annotations_response.rb +2 -4
  201. data/lib/aspose_pdf_cloud/models/segment.rb +21 -4
  202. data/lib/aspose_pdf_cloud/models/signature.rb +22 -5
  203. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +7 -4
  204. data/lib/aspose_pdf_cloud/models/sound_annotation.rb +31 -4
  205. data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +2 -4
  206. data/lib/aspose_pdf_cloud/models/sound_annotations.rb +2 -4
  207. data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +2 -4
  208. data/lib/aspose_pdf_cloud/models/split_result.rb +2 -4
  209. data/lib/aspose_pdf_cloud/models/split_result_document.rb +7 -4
  210. data/lib/aspose_pdf_cloud/models/split_result_response.rb +2 -4
  211. data/lib/aspose_pdf_cloud/models/square_annotation.rb +7 -4
  212. data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +2 -4
  213. data/lib/aspose_pdf_cloud/models/square_annotations.rb +2 -4
  214. data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +2 -4
  215. data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +7 -4
  216. data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +2 -4
  217. data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +2 -4
  218. data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +2 -4
  219. data/lib/aspose_pdf_cloud/models/stamp.rb +4 -6
  220. data/lib/aspose_pdf_cloud/models/stamp_annotation.rb +7 -4
  221. data/lib/aspose_pdf_cloud/models/stamp_annotation_response.rb +2 -4
  222. data/lib/aspose_pdf_cloud/models/stamp_annotations.rb +2 -4
  223. data/lib/aspose_pdf_cloud/models/stamp_annotations_response.rb +2 -4
  224. data/lib/aspose_pdf_cloud/models/stamp_base.rb +3 -5
  225. data/lib/aspose_pdf_cloud/models/stamp_info.rb +7 -4
  226. data/lib/aspose_pdf_cloud/models/stamps_info.rb +2 -4
  227. data/lib/aspose_pdf_cloud/models/stamps_info_response.rb +2 -4
  228. data/lib/aspose_pdf_cloud/models/storage_exist.rb +204 -0
  229. data/lib/aspose_pdf_cloud/models/{file.rb → storage_file.rb} +9 -6
  230. data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +7 -4
  231. data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +2 -4
  232. data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +2 -4
  233. data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +2 -4
  234. data/lib/aspose_pdf_cloud/models/table.rb +7 -4
  235. data/lib/aspose_pdf_cloud/models/table_recognized.rb +2 -4
  236. data/lib/aspose_pdf_cloud/models/table_recognized_response.rb +2 -4
  237. data/lib/aspose_pdf_cloud/models/tables_recognized.rb +2 -4
  238. data/lib/aspose_pdf_cloud/models/tables_recognized_response.rb +2 -4
  239. data/lib/aspose_pdf_cloud/models/text_annotation.rb +7 -4
  240. data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +2 -4
  241. data/lib/aspose_pdf_cloud/models/text_annotations.rb +2 -4
  242. data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +2 -4
  243. data/lib/aspose_pdf_cloud/models/text_footer.rb +4 -6
  244. data/lib/aspose_pdf_cloud/models/text_header.rb +4 -6
  245. data/lib/aspose_pdf_cloud/models/text_line.rb +2 -4
  246. data/lib/aspose_pdf_cloud/models/text_rect.rb +5 -7
  247. data/lib/aspose_pdf_cloud/models/text_rects.rb +2 -4
  248. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +2 -4
  249. data/lib/aspose_pdf_cloud/models/text_replace.rb +40 -4
  250. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +3 -4
  251. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +7 -4
  252. data/lib/aspose_pdf_cloud/models/text_stamp.rb +4 -6
  253. data/lib/aspose_pdf_cloud/models/text_state.rb +2 -4
  254. data/lib/aspose_pdf_cloud/models/text_style.rb +2 -4
  255. data/lib/aspose_pdf_cloud/models/underline_annotation.rb +7 -4
  256. data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +2 -4
  257. data/lib/aspose_pdf_cloud/models/underline_annotations.rb +2 -4
  258. data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +2 -4
  259. data/lib/aspose_pdf_cloud/models/word_count.rb +2 -4
  260. data/lib/aspose_pdf_cloud/models/word_count_response.rb +3 -5
  261. data/lib/aspose_pdf_cloud/version.rb +1 -1
  262. data/test/pdf_tests.rb +175 -71
  263. data/test_data/sample.tex +105 -0
  264. metadata +27 -18
  265. data/docs/AppendDocument.md +0 -11
  266. data/docs/File.md +0 -13
  267. data/docs/FileExist.md +0 -10
  268. data/docs/FileVersionsResponse.md +0 -11
  269. data/docs/FilesResponse.md +0 -11
  270. data/docs/StorageExistResponse.md +0 -11
  271. data/lib/aspose_pdf_cloud/models/file_versions_response.rb +0 -227
@@ -83,6 +83,10 @@ module AsposePdfCloud
83
83
  invalid_properties.push("invalid value for 'code', code cannot be nil.")
84
84
  end
85
85
 
86
+ if @matches.nil?
87
+ invalid_properties.push("invalid value for 'matches', matches cannot be nil.")
88
+ end
89
+
86
90
  return invalid_properties
87
91
  end
88
92
 
@@ -90,6 +94,7 @@ module AsposePdfCloud
90
94
  # @return true if the model is valid
91
95
  def valid?
92
96
  return false if @code.nil?
97
+ return false if @matches.nil?
93
98
  return true
94
99
  end
95
100
 
@@ -142,11 +147,9 @@ module AsposePdfCloud
142
147
  def _deserialize(type, value)
143
148
  case type.to_sym
144
149
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
150
+ DateTime.parse(value)
147
151
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
152
+ Date.parse(value)
150
153
  when :String
151
154
  value.to_s
152
155
  when :Integer
@@ -37,7 +37,7 @@ module AsposePdfCloud
37
37
  # Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.
38
38
  attr_accessor :opacity
39
39
 
40
- # Sets or gets the rotation of stamp content according values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
40
+ # Sets or gets the rotation of stamp content according Rotation values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
41
41
  attr_accessor :rotate
42
42
 
43
43
  # Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.
@@ -58,7 +58,7 @@ module AsposePdfCloud
58
58
  # Gets or sets string value which is used as stamp on the page.
59
59
  attr_accessor :value
60
60
 
61
- # Gets text properties of the stamp. See for details.
61
+ # Gets text properties of the stamp. See TextState for details.
62
62
  attr_accessor :text_state
63
63
 
64
64
  # Gets or sets vertical alignment of stamp on page.
@@ -279,11 +279,9 @@ module AsposePdfCloud
279
279
  def _deserialize(type, value)
280
280
  case type.to_sym
281
281
  when :DateTime
282
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
283
- Time.strptime(value, format).utc.to_datetime
282
+ DateTime.parse(value)
284
283
  when :Date
285
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
286
- Time.strptime(value, format).utc.to_datetime.to_date
284
+ Date.parse(value)
287
285
  when :String
288
286
  value.to_s
289
287
  when :Integer
@@ -167,11 +167,9 @@ module AsposePdfCloud
167
167
  def _deserialize(type, value)
168
168
  case type.to_sym
169
169
  when :DateTime
170
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
171
- Time.strptime(value, format).utc.to_datetime
170
+ DateTime.parse(value)
172
171
  when :Date
173
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
174
- Time.strptime(value, format).utc.to_datetime.to_date
172
+ Date.parse(value)
175
173
  when :String
176
174
  value.to_s
177
175
  when :Integer
@@ -152,11 +152,9 @@ module AsposePdfCloud
152
152
  def _deserialize(type, value)
153
153
  case type.to_sym
154
154
  when :DateTime
155
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
156
- Time.strptime(value, format).utc.to_datetime
155
+ DateTime.parse(value)
157
156
  when :Date
158
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
159
- Time.strptime(value, format).utc.to_datetime.to_date
157
+ Date.parse(value)
160
158
  when :String
161
159
  value.to_s
162
160
  when :Integer
@@ -211,12 +211,17 @@ module AsposePdfCloud
211
211
  # @return Array for valid properies with the reasons
212
212
  def list_invalid_properties
213
213
  invalid_properties = Array.new
214
+ if @rect.nil?
215
+ invalid_properties.push("invalid value for 'rect', rect cannot be nil.")
216
+ end
217
+
214
218
  return invalid_properties
215
219
  end
216
220
 
217
221
  # Check to see if the all the properties in the model are valid
218
222
  # @return true if the model is valid
219
223
  def valid?
224
+ return false if @rect.nil?
220
225
  return true
221
226
  end
222
227
 
@@ -283,11 +288,9 @@ module AsposePdfCloud
283
288
  def _deserialize(type, value)
284
289
  case type.to_sym
285
290
  when :DateTime
286
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
287
- Time.strptime(value, format).utc.to_datetime
291
+ DateTime.parse(value)
288
292
  when :Date
289
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
290
- Time.strptime(value, format).utc.to_datetime.to_date
293
+ Date.parse(value)
291
294
  when :String
292
295
  value.to_s
293
296
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -131,11 +131,9 @@ module AsposePdfCloud
131
131
  def _deserialize(type, value)
132
132
  case type.to_sym
133
133
  when :DateTime
134
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
135
- Time.strptime(value, format).utc.to_datetime
134
+ DateTime.parse(value)
136
135
  when :Date
137
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
138
- Time.strptime(value, format).utc.to_datetime.to_date
136
+ Date.parse(value)
139
137
  when :String
140
138
  value.to_s
141
139
  when :Integer
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -118,11 +118,9 @@ module AsposePdfCloud
118
118
  def _deserialize(type, value)
119
119
  case type.to_sym
120
120
  when :DateTime
121
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
122
- Time.strptime(value, format).utc.to_datetime
121
+ DateTime.parse(value)
123
122
  when :Date
124
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
125
- Time.strptime(value, format).utc.to_datetime.to_date
123
+ Date.parse(value)
126
124
  when :String
127
125
  value.to_s
128
126
  when :Integer
@@ -31,7 +31,7 @@ module AsposePdfCloud
31
31
  # Response status.
32
32
  attr_accessor :status
33
33
 
34
- # with words per page info.
34
+ # WordCount with words per page info.
35
35
  attr_accessor :words_per_page
36
36
 
37
37
 
@@ -142,11 +142,9 @@ module AsposePdfCloud
142
142
  def _deserialize(type, value)
143
143
  case type.to_sym
144
144
  when :DateTime
145
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
146
- Time.strptime(value, format).utc.to_datetime
145
+ DateTime.parse(value)
147
146
  when :Date
148
- format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
149
- Time.strptime(value, format).utc.to_datetime.to_date
147
+ Date.parse(value)
150
148
  when :String
151
149
  value.to_s
152
150
  when :Integer
@@ -20,5 +20,5 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  module AsposePdfCloud
23
- VERSION = "19.5.0"
23
+ VERSION = "19.6.0"
24
24
  end
@@ -38,7 +38,7 @@ class PdfTests < Minitest::Test
38
38
  @test_data_folder = '../test_data/'
39
39
 
40
40
  config = @pdf_api.api_client.config
41
- config.host = 'billing.cloud.saltov.dynabic.com'
41
+ config.host = 'api-qa.aspose.cloud'
42
42
  config.scheme = 'https'
43
43
  end
44
44
 
@@ -48,7 +48,7 @@ class PdfTests < Minitest::Test
48
48
 
49
49
 
50
50
  def upload_file(file_name)
51
- response = @pdf_api.put_create(@temp_folder + '/' + file_name, ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) } )
51
+ response = @pdf_api.upload_file(@temp_folder + '/' + file_name, ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) } )
52
52
  assert(response, "Failed to upload #{file_name} file.")
53
53
  end
54
54
 
@@ -2619,40 +2619,18 @@ class PdfTests < Minitest::Test
2619
2619
  def test_post_append_document_using_query_params
2620
2620
  file_name = 'PdfWithImages2.pdf'
2621
2621
  append_file_name = '4pages.pdf'
2622
+ append_file = @temp_folder + '/' + append_file_name
2622
2623
 
2623
- upload_file(file_name)
2624
+ upload_file(file_name)
2624
2625
  upload_file(append_file_name)
2625
2626
 
2626
2627
  opts = {
2627
- :append_file => @temp_folder + '/' + append_file_name,
2628
2628
  :startPage => 2,
2629
2629
  :endPage => 4,
2630
2630
  :folder => @temp_folder
2631
2631
  }
2632
2632
 
2633
- response = @pdf_api.post_append_document(file_name, opts)
2634
- assert(response, 'Failed to append document to existing one.')
2635
- end
2636
-
2637
-
2638
- def test_post_append_document_using_body_params
2639
- file_name = 'PdfWithImages2.pdf'
2640
- append_file_name = '4pages.pdf'
2641
-
2642
- upload_file(file_name)
2643
- upload_file(append_file_name)
2644
-
2645
- append_document = AppendDocument.new
2646
- append_document.document = @temp_folder + '/' + append_file_name
2647
- append_document.start_page = 2
2648
- append_document.end_page = 4
2649
-
2650
- opts = {
2651
- :append_document => append_document,
2652
- :folder => @temp_folder
2653
- }
2654
-
2655
- response = @pdf_api.post_append_document(file_name, opts)
2633
+ response = @pdf_api.post_append_document(file_name, append_file, opts)
2656
2634
  assert(response, 'Failed to append document to existing one.')
2657
2635
  end
2658
2636
 
@@ -3358,7 +3336,7 @@ class PdfTests < Minitest::Test
3358
3336
 
3359
3337
 
3360
3338
  def test_get_la_te_x_in_storage_to_pdf
3361
- file_name = 'TexExample.tex'
3339
+ file_name = 'sample.tex'
3362
3340
  upload_file(file_name)
3363
3341
 
3364
3342
  src_path = @temp_folder + '/' + file_name
@@ -3367,7 +3345,7 @@ class PdfTests < Minitest::Test
3367
3345
  end
3368
3346
 
3369
3347
  def test_put_la_te_x_in_storage_to_pdf
3370
- file_name = 'TexExample.tex'
3348
+ file_name = 'sample.tex'
3371
3349
  upload_file(file_name)
3372
3350
  result_name = 'fromTex.pdf'
3373
3351
 
@@ -3630,11 +3608,10 @@ class PdfTests < Minitest::Test
3630
3608
  optimize_options.unembed_fonts = true
3631
3609
 
3632
3610
  opts = {
3633
- :options => optimize_options,
3634
- :folder => @temp_folder
3611
+ :folder => @temp_folder
3635
3612
  }
3636
3613
 
3637
- response = @pdf_api.post_optimize_document(file_name, opts)
3614
+ response = @pdf_api.post_optimize_document(file_name, optimize_options, opts)
3638
3615
  assert(response, 'Failed to optimize document.')
3639
3616
  end
3640
3617
 
@@ -3710,11 +3687,10 @@ class PdfTests < Minitest::Test
3710
3687
  page_number = 1
3711
3688
 
3712
3689
  opts = {
3713
- :field => field,
3714
3690
  :folder => @temp_folder
3715
3691
  }
3716
3692
 
3717
- response = @pdf_api.post_create_field(file_name, page_number, opts)
3693
+ response = @pdf_api.post_create_field(file_name, page_number, field, opts)
3718
3694
  assert(response, 'Failed to create field.')
3719
3695
  end
3720
3696
 
@@ -3731,11 +3707,10 @@ class PdfTests < Minitest::Test
3731
3707
  field.type = FieldType::TEXT
3732
3708
 
3733
3709
  opts = {
3734
- :field => field,
3735
3710
  :folder => @temp_folder
3736
3711
  }
3737
3712
 
3738
- response = @pdf_api.put_update_field(file_name, field_name, opts)
3713
+ response = @pdf_api.put_update_field(file_name, field_name, field, opts)
3739
3714
  assert(response, 'Failed to update fields.')
3740
3715
  end
3741
3716
 
@@ -3745,8 +3720,6 @@ class PdfTests < Minitest::Test
3745
3720
 
3746
3721
  field_name = 'textField'
3747
3722
 
3748
-
3749
-
3750
3723
  field = Field.new
3751
3724
  field.name = field_name
3752
3725
  field.values = ['Text field updated value.']
@@ -3756,11 +3729,10 @@ class PdfTests < Minitest::Test
3756
3729
  fields.list = [field]
3757
3730
 
3758
3731
  opts = {
3759
- :fields => fields,
3760
3732
  :folder => @temp_folder
3761
3733
  }
3762
3734
 
3763
- response = @pdf_api.put_update_fields(file_name, opts)
3735
+ response = @pdf_api.put_update_fields(file_name, fields, opts)
3764
3736
  assert(response, 'Failed to update fields.')
3765
3737
  end
3766
3738
 
@@ -4465,11 +4437,10 @@ class PdfTests < Minitest::Test
4465
4437
  merge_documents.list = file_name_list
4466
4438
 
4467
4439
  opts = {
4468
- :merge_documents => merge_documents,
4469
4440
  :folder => @temp_folder
4470
4441
  }
4471
4442
 
4472
- response = @pdf_api.put_merge_documents(result_name, opts)
4443
+ response = @pdf_api.put_merge_documents(result_name, merge_documents, opts)
4473
4444
  assert(response, 'Failed to merge a list of documents')
4474
4445
  end
4475
4446
 
@@ -4779,10 +4750,9 @@ class PdfTests < Minitest::Test
4779
4750
  privileges.allow_print = false
4780
4751
 
4781
4752
  opts = {
4782
- :privileges => privileges,
4783
4753
  :folder => @temp_folder
4784
4754
  }
4785
- response = @pdf_api.put_privileges(file_name, opts)
4755
+ response = @pdf_api.put_privileges(file_name, privileges,opts)
4786
4756
  assert(response, 'Failed to set pdf privileges.')
4787
4757
  end
4788
4758
 
@@ -4918,13 +4888,13 @@ class PdfTests < Minitest::Test
4918
4888
  signature.signature_path = @temp_folder + '/' + signature_file_name
4919
4889
  signature.signature_type = SignatureType::PKCS7
4920
4890
  signature.visible = true
4891
+ signature.show_properties = false
4921
4892
 
4922
4893
  opts = {
4923
- :signature => signature,
4924
4894
  :folder => @temp_folder
4925
4895
  }
4926
4896
 
4927
- response = @pdf_api.post_sign_document(file_name, opts)
4897
+ response = @pdf_api.post_sign_document(file_name, signature, opts)
4928
4898
  assert(response, 'Failed to sign document.')
4929
4899
  end
4930
4900
 
@@ -4956,11 +4926,10 @@ class PdfTests < Minitest::Test
4956
4926
  signature.visible = true
4957
4927
 
4958
4928
  opts = {
4959
- :signature => signature,
4960
4929
  :folder => @temp_folder
4961
4930
  }
4962
4931
 
4963
- response = @pdf_api.post_sign_page(file_name, page_number, opts)
4932
+ response = @pdf_api.post_sign_page(file_name, page_number, signature, opts)
4964
4933
  assert(response, 'Failed to sign page.')
4965
4934
  end
4966
4935
 
@@ -4991,11 +4960,10 @@ class PdfTests < Minitest::Test
4991
4960
  signature.visible = true
4992
4961
 
4993
4962
  opts = {
4994
- :signature => signature,
4995
4963
  :folder => @temp_folder
4996
4964
  }
4997
4965
 
4998
- response_sign = @pdf_api.post_sign_document(file_name, opts)
4966
+ response_sign = @pdf_api.post_sign_document(file_name, signature, opts)
4999
4967
  assert(response_sign, 'Failed to sign document.')
5000
4968
 
5001
4969
  opts = {
@@ -5006,6 +4974,7 @@ class PdfTests < Minitest::Test
5006
4974
  end
5007
4975
 
5008
4976
 
4977
+
5009
4978
  # Text Replace Tests
5010
4979
 
5011
4980
  def test_post_document_text_replace
@@ -5161,21 +5130,20 @@ class PdfTests < Minitest::Test
5161
5130
  paragraph.lines = [text_line]
5162
5131
 
5163
5132
  opts = {
5164
- :paragraph => paragraph,
5165
5133
  :folder => @temp_folder
5166
5134
  }
5167
5135
 
5168
- response = @pdf_api.put_add_text(file_name, page_number, opts)
5136
+ response = @pdf_api.put_add_text(file_name, page_number, paragraph, opts)
5169
5137
  assert(response, 'Failed to add text to the page.')
5170
5138
  end
5171
5139
 
5172
5140
 
5173
5141
  # Storage Tests
5174
5142
 
5175
- def test_put_create
5143
+ def test_upload_file
5176
5144
  file_name = '4pages.pdf'
5177
5145
 
5178
- response = @pdf_api.put_create(@temp_folder + '/' + file_name, ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) } )
5146
+ response = @pdf_api.upload_file(@temp_folder + '/' + file_name, ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) } )
5179
5147
  assert(response, "Failed to upload #{file_name} file.")
5180
5148
  end
5181
5149
 
@@ -5184,27 +5152,27 @@ class PdfTests < Minitest::Test
5184
5152
  upload_file(file_name)
5185
5153
 
5186
5154
 
5187
- response = @pdf_api.get_download(@temp_folder + '/' + file_name)
5155
+ response = @pdf_api.download_file(@temp_folder + '/' + file_name)
5188
5156
  assert(response, "Failed to download #{file_name} file.")
5189
5157
  end
5190
5158
 
5191
- def test_get_list_files
5159
+ def test_get_files_list
5192
5160
 
5193
5161
  opts = {
5194
5162
  :path => @temp_folder
5195
5163
  }
5196
5164
 
5197
- response = @pdf_api.get_list_files(opts)
5165
+ response = @pdf_api.get_files_list(opts)
5198
5166
  assert(response, 'Failed get file list.')
5199
5167
  end
5200
5168
 
5201
- def test_post_move_file
5169
+ def test_move_file
5202
5170
  file_name = '4pages.pdf'
5203
5171
  upload_file(file_name)
5204
5172
  src = @temp_folder + '/' + file_name
5205
5173
  dest = @temp_folder + '/4pages_renamed.pdf'
5206
5174
 
5207
- response = @pdf_api.post_move_file(src, dest, {})
5175
+ response = @pdf_api.move_file(src, dest, {})
5208
5176
  assert(response, "Failed to rename #{file_name} file.")
5209
5177
  end
5210
5178
 
@@ -5217,46 +5185,46 @@ class PdfTests < Minitest::Test
5217
5185
  assert(response, "Failed to delete #{file_name} file.")
5218
5186
  end
5219
5187
 
5220
- def test_put_create_folder
5188
+ def test_create_folder
5221
5189
  path = @temp_folder + '/testFolder'
5222
5190
 
5223
- response = @pdf_api.put_create_folder(path, {})
5191
+ response = @pdf_api.create_folder(path, {})
5224
5192
  assert(response, 'Failed to create folder.')
5225
5193
  end
5226
5194
 
5227
- def test_post_move_folder
5195
+ def test_move_folder
5228
5196
  src = @temp_folder + '/testFolder'
5229
- responseFolder = @pdf_api.put_create_folder(src, {})
5197
+ responseFolder = @pdf_api.create_folder(src, {})
5230
5198
  assert(responseFolder, 'Failed to create folder.')
5231
5199
 
5232
5200
  dest = @temp_folder + '/testFolderRednamed'
5233
5201
 
5234
- response = @pdf_api.post_move_folder(src, dest,{})
5202
+ response = @pdf_api.move_folder(src, dest,{})
5235
5203
  assert(response, 'Failed to move folder.')
5236
5204
  end
5237
5205
 
5238
5206
  def test_delete_folder
5239
5207
  path = @temp_folder + '/testFolder'
5240
- responseFolder = @pdf_api.put_create_folder(path, {})
5208
+ responseFolder = @pdf_api.create_folder(path, {})
5241
5209
  assert(responseFolder, 'Failed to create folder.')
5242
5210
 
5243
5211
  response = @pdf_api.delete_folder(path, {})
5244
5212
  assert(response, 'Failed to delete folder.')
5245
5213
  end
5246
5214
 
5247
- def test_get_is_storage_exist
5215
+ def test_storage_exists
5248
5216
  name = 'PDF-CI'
5249
5217
 
5250
- response = @pdf_api.get_is_storage_exist(name, {})
5218
+ response = @pdf_api.storage_exists(name, {})
5251
5219
  assert(response, 'Failed to check storage.')
5252
5220
  end
5253
5221
 
5254
- def test_get_is_exist
5222
+ def test_object_exists
5255
5223
  file_name = '4pages.pdf'
5256
5224
  upload_file(file_name)
5257
5225
  path = @temp_folder + '/' + file_name
5258
5226
 
5259
- response = @pdf_api.get_is_exist(path, {})
5227
+ response = @pdf_api.object_exists(path, {})
5260
5228
  assert(response, 'Failed to check file.')
5261
5229
  end
5262
5230
 
@@ -5266,12 +5234,148 @@ class PdfTests < Minitest::Test
5266
5234
  assert(response, 'Failed to check disk usage.')
5267
5235
  end
5268
5236
 
5269
- def test_get_list_file_versions
5237
+ def test_get_file_versions
5270
5238
  file_name = '4pages.pdf'
5271
5239
  upload_file(file_name)
5272
5240
  path = @temp_folder + '/' + file_name
5273
5241
 
5274
- response = @pdf_api.get_list_file_versions(path, {})
5242
+ response = @pdf_api.get_file_versions(path, {})
5275
5243
  assert(response, 'Failed to get file versions.')
5276
5244
  end
5245
+
5246
+ # Bookmarks Tests
5247
+
5248
+ def test_get_document_bookmarks
5249
+ file_name = 'PdfWithBookmarks.pdf'
5250
+ upload_file(file_name)
5251
+
5252
+ opts = {
5253
+ :folder => @temp_folder
5254
+ }
5255
+
5256
+ response = @pdf_api.get_document_bookmarks(file_name, opts)
5257
+ assert(response, 'Filed to get all document bookmarks.')
5258
+ end
5259
+
5260
+ def test_get_bookmarks
5261
+ file_name = 'PdfWithBookmarks.pdf'
5262
+ upload_file(file_name)
5263
+
5264
+ path = '1'
5265
+
5266
+ opts = {
5267
+ :folder => @temp_folder
5268
+ }
5269
+
5270
+ response = @pdf_api.get_bookmarks(file_name, path, opts)
5271
+ assert(response, 'Filed to get all node bookmarks.')
5272
+ end
5273
+
5274
+ def test_get_bookmark
5275
+ file_name = 'PdfWithBookmarks.pdf'
5276
+ upload_file(file_name)
5277
+
5278
+ path = '1'
5279
+
5280
+ opts = {
5281
+ :folder => @temp_folder
5282
+ }
5283
+
5284
+ response = @pdf_api.get_bookmark(file_name, path, opts)
5285
+ assert(response, 'Filed to get bookmark by path.')
5286
+ end
5287
+
5288
+ def test_delete_document_bookmarks
5289
+ file_name = 'PdfWithBookmarks.pdf'
5290
+ upload_file(file_name)
5291
+
5292
+ opts = {
5293
+ :folder => @temp_folder
5294
+ }
5295
+
5296
+ response = @pdf_api.delete_document_bookmarks(file_name, opts)
5297
+ assert(response, 'Filed to delete all document bookmarks.')
5298
+ end
5299
+
5300
+ def test_delete_bookmark
5301
+ file_name = 'PdfWithBookmarks.pdf'
5302
+ upload_file(file_name)
5303
+
5304
+ path = '1'
5305
+
5306
+ opts = {
5307
+ :folder => @temp_folder
5308
+ }
5309
+
5310
+ response = @pdf_api.delete_bookmark(file_name, path, opts)
5311
+ assert(response, 'Filed to delete bookmark by path.')
5312
+ end
5313
+
5314
+ def test_post_bookmarks
5315
+ file_name = 'PdfWithBookmarks.pdf'
5316
+ upload_file(file_name)
5317
+
5318
+ path = '1/1'
5319
+
5320
+ color = Color.new
5321
+ color.a = 0xFF
5322
+ color.r = 0x00
5323
+ color.g = 0xFF
5324
+ color.b = 0x00
5325
+
5326
+ bookmark = Bookmark.new
5327
+ bookmark.action = 'GoTo'
5328
+ bookmark.bold = true
5329
+ bookmark.italic = false
5330
+ bookmark.title = 'New Bookmark XYZ'
5331
+ bookmark.page_display = 'XYZ'
5332
+ bookmark.page_display_bottom = 10
5333
+ bookmark.page_display_left = 10
5334
+ bookmark.page_display_right = 10
5335
+ bookmark.page_display_top = 10
5336
+ bookmark.page_display_zoom = 2
5337
+ bookmark.page_number = 2
5338
+ bookmark.color = color
5339
+
5340
+ opts = {
5341
+ :folder => @temp_folder
5342
+ }
5343
+
5344
+ response = @pdf_api.post_bookmark(file_name, path, [bookmark], opts)
5345
+ assert(response, 'Filed to post bookmark.')
5346
+ end
5347
+
5348
+ def test_put_bookmark
5349
+ file_name = 'PdfWithBookmarks.pdf'
5350
+ upload_file(file_name)
5351
+
5352
+ path = '1/1'
5353
+
5354
+ color = Color.new
5355
+ color.a = 0xFF
5356
+ color.r = 0x00
5357
+ color.g = 0xFF
5358
+ color.b = 0x00
5359
+
5360
+ bookmark = Bookmark.new
5361
+ bookmark.action = 'GoTo'
5362
+ bookmark.bold = true
5363
+ bookmark.italic = false
5364
+ bookmark.title = 'New Bookmark XYZ'
5365
+ bookmark.page_display = 'XYZ'
5366
+ bookmark.page_display_bottom = 10
5367
+ bookmark.page_display_left = 10
5368
+ bookmark.page_display_right = 10
5369
+ bookmark.page_display_top = 10
5370
+ bookmark.page_display_zoom = 2
5371
+ bookmark.page_number = 2
5372
+ bookmark.color = color
5373
+
5374
+ opts = {
5375
+ :folder => @temp_folder
5376
+ }
5377
+
5378
+ response = @pdf_api.put_bookmark(file_name, path, bookmark, opts)
5379
+ assert(response, 'Filed to update bookmark.')
5380
+ end
5277
5381
  end