aspose_pdf_cloud 18.11.0 → 19.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (398) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +66 -6
  4. data/aspose_pdf_cloud.gemspec +1 -1
  5. data/docs/Annotation.md +3 -2
  6. data/docs/AnnotationFlags.md +14 -14
  7. data/docs/AnnotationInfo.md +3 -2
  8. data/docs/AnnotationState.md +11 -11
  9. data/docs/AnnotationType.md +31 -31
  10. data/docs/AnnotationsInfo.md +3 -3
  11. data/docs/AnnotationsInfoResponse.md +3 -3
  12. data/docs/AntialiasingProcessingType.md +5 -5
  13. data/docs/AppendDocument.md +1 -1
  14. data/docs/AsposeResponse.md +1 -1
  15. data/docs/Attachment.md +1 -1
  16. data/docs/AttachmentResponse.md +3 -3
  17. data/docs/Attachments.md +3 -3
  18. data/docs/AttachmentsResponse.md +3 -3
  19. data/docs/CapStyle.md +5 -5
  20. data/docs/CaptionPosition.md +6 -6
  21. data/docs/CaretAnnotation.md +4 -4
  22. data/docs/CaretAnnotationResponse.md +3 -3
  23. data/docs/CaretAnnotations.md +3 -3
  24. data/docs/CaretAnnotationsResponse.md +3 -3
  25. data/docs/CaretSymbol.md +5 -5
  26. data/docs/CircleAnnotation.md +4 -4
  27. data/docs/CircleAnnotationResponse.md +3 -3
  28. data/docs/CircleAnnotations.md +3 -3
  29. data/docs/CircleAnnotationsResponse.md +3 -3
  30. data/docs/Color.md +5 -5
  31. data/docs/ColorDepth.md +7 -7
  32. data/docs/CommonFigureAnnotation.md +4 -3
  33. data/docs/CompressionType.md +8 -8
  34. data/docs/DiscUsage.md +10 -0
  35. data/docs/DiscUsageResponse.md +11 -0
  36. data/docs/DocFormat.md +5 -5
  37. data/docs/DocRecognitionMode.md +5 -5
  38. data/docs/Document.md +1 -1
  39. data/docs/DocumentPageResponse.md +3 -3
  40. data/docs/DocumentPagesResponse.md +3 -3
  41. data/docs/DocumentPrivilege.md +1 -1
  42. data/docs/DocumentProperties.md +3 -3
  43. data/docs/DocumentPropertiesResponse.md +3 -3
  44. data/docs/DocumentProperty.md +4 -4
  45. data/docs/DocumentPropertyResponse.md +3 -3
  46. data/docs/DocumentResponse.md +4 -4
  47. data/docs/EpubRecognitionMode.md +6 -6
  48. data/docs/Field.md +2 -2
  49. data/docs/FieldResponse.md +3 -3
  50. data/docs/FieldType.md +7 -7
  51. data/docs/Fields.md +3 -3
  52. data/docs/FieldsResponse.md +3 -3
  53. data/docs/File.md +1 -1
  54. data/docs/FileAttachmentAnnotation.md +29 -0
  55. data/docs/FileAttachmentAnnotationResponse.md +11 -0
  56. data/docs/FileAttachmentAnnotations.md +10 -0
  57. data/docs/FileAttachmentAnnotationsResponse.md +11 -0
  58. data/docs/FileExist.md +10 -0
  59. data/docs/FileExistResponse.md +11 -0
  60. data/docs/FileIcon.md +13 -0
  61. data/docs/FileVersion.md +15 -0
  62. data/docs/FileVersionsResponse.md +11 -0
  63. data/docs/FilesResponse.md +1 -1
  64. data/docs/FontEncodingRules.md +5 -5
  65. data/docs/FontSavingModes.md +7 -7
  66. data/docs/FontStyles.md +7 -7
  67. data/docs/FreeTextAnnotation.md +3 -2
  68. data/docs/FreeTextAnnotationResponse.md +3 -3
  69. data/docs/FreeTextAnnotations.md +3 -3
  70. data/docs/FreeTextAnnotationsResponse.md +3 -3
  71. data/docs/FreeTextIntent.md +6 -6
  72. data/docs/HighlightAnnotation.md +3 -3
  73. data/docs/HighlightAnnotationResponse.md +3 -3
  74. data/docs/HighlightAnnotations.md +3 -3
  75. data/docs/HighlightAnnotationsResponse.md +3 -3
  76. data/docs/HorizontalAlignment.md +8 -8
  77. data/docs/HtmlDocumentType.md +5 -5
  78. data/docs/HtmlMarkupGenerationModes.md +5 -5
  79. data/docs/Image.md +2 -2
  80. data/docs/ImageResponse.md +3 -3
  81. data/docs/ImageSrcType.md +5 -5
  82. data/docs/ImageTemplate.md +1 -1
  83. data/docs/ImageTemplatesRequest.md +1 -1
  84. data/docs/Images.md +3 -3
  85. data/docs/ImagesResponse.md +3 -3
  86. data/docs/InkAnnotation.md +3 -3
  87. data/docs/InkAnnotationResponse.md +3 -3
  88. data/docs/InkAnnotations.md +3 -3
  89. data/docs/InkAnnotationsResponse.md +3 -3
  90. data/docs/Justification.md +7 -7
  91. data/docs/LettersPositioningMethods.md +5 -5
  92. data/docs/LineAnnotation.md +3 -3
  93. data/docs/LineAnnotationResponse.md +3 -3
  94. data/docs/LineAnnotations.md +3 -3
  95. data/docs/LineAnnotationsResponse.md +3 -3
  96. data/docs/LineEnding.md +13 -13
  97. data/docs/LineIntent.md +6 -6
  98. data/docs/LineSpacing.md +6 -6
  99. data/docs/Link.md +1 -1
  100. data/docs/LinkActionType.md +9 -9
  101. data/docs/LinkAnnotation.md +2 -2
  102. data/docs/LinkAnnotationResponse.md +3 -3
  103. data/docs/LinkAnnotations.md +3 -3
  104. data/docs/LinkAnnotationsResponse.md +3 -3
  105. data/docs/LinkElement.md +1 -1
  106. data/docs/LinkHighlightingMode.md +9 -9
  107. data/docs/MarginInfo.md +1 -1
  108. data/docs/MarkupAnnotation.md +3 -2
  109. data/docs/MergeDocuments.md +1 -1
  110. data/docs/MovieAnnotation.md +23 -0
  111. data/docs/MovieAnnotationResponse.md +11 -0
  112. data/docs/MovieAnnotations.md +10 -0
  113. data/docs/MovieAnnotationsResponse.md +11 -0
  114. data/docs/OptimizeOptions.md +1 -1
  115. data/docs/Page.md +3 -3
  116. data/docs/PageWordCount.md +1 -1
  117. data/docs/Pages.md +3 -3
  118. data/docs/Paragraph.md +14 -14
  119. data/docs/PartsEmbeddingModes.md +6 -6
  120. data/docs/PdfAType.md +5 -5
  121. data/docs/PdfApi.md +909 -28
  122. data/docs/Point.md +1 -1
  123. data/docs/PolyAnnotation.md +4 -3
  124. data/docs/PolyIntent.md +7 -7
  125. data/docs/PolyLineAnnotation.md +4 -4
  126. data/docs/PolyLineAnnotationResponse.md +3 -3
  127. data/docs/PolyLineAnnotations.md +3 -3
  128. data/docs/PolyLineAnnotationsResponse.md +3 -3
  129. data/docs/PolygonAnnotation.md +4 -4
  130. data/docs/PolygonAnnotationResponse.md +3 -3
  131. data/docs/PolygonAnnotations.md +3 -3
  132. data/docs/PolygonAnnotationsResponse.md +3 -3
  133. data/docs/PopupAnnotation.md +3 -3
  134. data/docs/PopupAnnotationResponse.md +3 -3
  135. data/docs/PopupAnnotationWithParent.md +3 -3
  136. data/docs/PopupAnnotations.md +3 -3
  137. data/docs/PopupAnnotationsResponse.md +3 -3
  138. data/docs/RasterImagesSavingModes.md +6 -6
  139. data/docs/Rectangle.md +12 -0
  140. data/docs/RedactionAnnotation.md +26 -0
  141. data/docs/RedactionAnnotationResponse.md +11 -0
  142. data/docs/RedactionAnnotations.md +10 -0
  143. data/docs/RedactionAnnotationsResponse.md +11 -0
  144. data/docs/Rotation.md +7 -7
  145. data/docs/Segment.md +4 -4
  146. data/docs/ShapeType.md +6 -6
  147. data/docs/Signature.md +3 -3
  148. data/docs/SignatureType.md +7 -7
  149. data/docs/SignatureVerifyResponse.md +3 -3
  150. data/docs/SoundAnnotation.md +30 -0
  151. data/docs/SoundAnnotationResponse.md +11 -0
  152. data/docs/SoundAnnotations.md +10 -0
  153. data/docs/SoundAnnotationsResponse.md +11 -0
  154. data/docs/SoundEncoding.md +13 -0
  155. data/docs/SoundIcon.md +11 -0
  156. data/docs/SplitResult.md +1 -1
  157. data/docs/SplitResultDocument.md +1 -1
  158. data/docs/SplitResultResponse.md +3 -3
  159. data/docs/SquareAnnotation.md +4 -4
  160. data/docs/SquareAnnotationResponse.md +3 -3
  161. data/docs/SquareAnnotations.md +3 -3
  162. data/docs/SquareAnnotationsResponse.md +3 -3
  163. data/docs/SquigglyAnnotation.md +3 -3
  164. data/docs/SquigglyAnnotationResponse.md +3 -3
  165. data/docs/SquigglyAnnotations.md +3 -3
  166. data/docs/SquigglyAnnotationsResponse.md +3 -3
  167. data/docs/Stamp.md +1 -1
  168. data/docs/StampType.md +7 -7
  169. data/docs/StorageExistResponse.md +11 -0
  170. data/docs/StrikeOutAnnotation.md +3 -3
  171. data/docs/StrikeOutAnnotationResponse.md +3 -3
  172. data/docs/StrikeOutAnnotations.md +3 -3
  173. data/docs/StrikeOutAnnotationsResponse.md +3 -3
  174. data/docs/TextAnnotation.md +3 -3
  175. data/docs/TextAnnotationResponse.md +3 -3
  176. data/docs/TextAnnotations.md +3 -3
  177. data/docs/TextAnnotationsResponse.md +3 -3
  178. data/docs/TextHorizontalAlignment.md +10 -10
  179. data/docs/TextIcon.md +14 -14
  180. data/docs/TextLine.md +2 -2
  181. data/docs/TextRect.md +5 -5
  182. data/docs/TextRects.md +3 -3
  183. data/docs/TextRectsResponse.md +3 -3
  184. data/docs/TextReplace.md +2 -2
  185. data/docs/TextReplaceListRequest.md +3 -3
  186. data/docs/TextReplaceResponse.md +3 -3
  187. data/docs/TextState.md +1 -1
  188. data/docs/TextStyle.md +1 -1
  189. data/docs/UnderlineAnnotation.md +3 -3
  190. data/docs/UnderlineAnnotationResponse.md +3 -3
  191. data/docs/UnderlineAnnotations.md +3 -3
  192. data/docs/UnderlineAnnotationsResponse.md +3 -3
  193. data/docs/VerticalAlignment.md +7 -7
  194. data/docs/WordCount.md +1 -1
  195. data/docs/WordCountResponse.md +1 -1
  196. data/docs/WrapMode.md +7 -7
  197. data/lib/aspose_pdf_cloud.rb +28 -2
  198. data/lib/aspose_pdf_cloud/api/pdf_api.rb +4613 -1980
  199. data/lib/aspose_pdf_cloud/api_client.rb +1 -1
  200. data/lib/aspose_pdf_cloud/api_error.rb +1 -1
  201. data/lib/aspose_pdf_cloud/configuration.rb +1 -1
  202. data/lib/aspose_pdf_cloud/models/annotation.rb +13 -3
  203. data/lib/aspose_pdf_cloud/models/annotation_flags.rb +1 -1
  204. data/lib/aspose_pdf_cloud/models/annotation_info.rb +13 -3
  205. data/lib/aspose_pdf_cloud/models/annotation_state.rb +1 -1
  206. data/lib/aspose_pdf_cloud/models/annotation_type.rb +1 -1
  207. data/lib/aspose_pdf_cloud/models/annotations_info.rb +3 -2
  208. data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +3 -2
  209. data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +1 -1
  210. data/lib/aspose_pdf_cloud/models/append_document.rb +1 -1
  211. data/lib/aspose_pdf_cloud/models/aspose_response.rb +1 -1
  212. data/lib/aspose_pdf_cloud/models/attachment.rb +1 -1
  213. data/lib/aspose_pdf_cloud/models/attachment_response.rb +3 -2
  214. data/lib/aspose_pdf_cloud/models/attachments.rb +3 -2
  215. data/lib/aspose_pdf_cloud/models/attachments_response.rb +3 -2
  216. data/lib/aspose_pdf_cloud/models/cap_style.rb +1 -1
  217. data/lib/aspose_pdf_cloud/models/caption_position.rb +1 -1
  218. data/lib/aspose_pdf_cloud/models/caret_annotation.rb +14 -14
  219. data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +3 -2
  220. data/lib/aspose_pdf_cloud/models/caret_annotations.rb +3 -2
  221. data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +3 -2
  222. data/lib/aspose_pdf_cloud/models/caret_symbol.rb +1 -1
  223. data/lib/aspose_pdf_cloud/models/circle_annotation.rb +16 -16
  224. data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +3 -2
  225. data/lib/aspose_pdf_cloud/models/circle_annotations.rb +3 -2
  226. data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +3 -2
  227. data/lib/aspose_pdf_cloud/models/color.rb +5 -1
  228. data/lib/aspose_pdf_cloud/models/color_depth.rb +1 -1
  229. data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +14 -4
  230. data/lib/aspose_pdf_cloud/models/compression_type.rb +1 -1
  231. data/lib/aspose_pdf_cloud/models/disc_usage.rb +219 -0
  232. data/lib/aspose_pdf_cloud/models/disc_usage_response.rb +225 -0
  233. data/lib/aspose_pdf_cloud/models/doc_format.rb +1 -1
  234. data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +1 -1
  235. data/lib/aspose_pdf_cloud/models/document.rb +1 -1
  236. data/lib/aspose_pdf_cloud/models/document_page_response.rb +3 -2
  237. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +3 -2
  238. data/lib/aspose_pdf_cloud/models/document_privilege.rb +1 -1
  239. data/lib/aspose_pdf_cloud/models/document_properties.rb +3 -2
  240. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +3 -2
  241. data/lib/aspose_pdf_cloud/models/document_property.rb +4 -1
  242. data/lib/aspose_pdf_cloud/models/document_property_response.rb +3 -2
  243. data/lib/aspose_pdf_cloud/models/document_response.rb +4 -2
  244. data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +1 -1
  245. data/lib/aspose_pdf_cloud/models/field.rb +2 -2
  246. data/lib/aspose_pdf_cloud/models/field_response.rb +3 -2
  247. data/lib/aspose_pdf_cloud/models/field_type.rb +1 -1
  248. data/lib/aspose_pdf_cloud/models/fields.rb +3 -2
  249. data/lib/aspose_pdf_cloud/models/fields_response.rb +3 -2
  250. data/lib/aspose_pdf_cloud/models/file.rb +1 -1
  251. data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +405 -0
  252. data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +226 -0
  253. data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +215 -0
  254. data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +226 -0
  255. data/lib/aspose_pdf_cloud/models/file_exist.rb +219 -0
  256. data/lib/aspose_pdf_cloud/models/file_exist_response.rb +225 -0
  257. data/lib/aspose_pdf_cloud/models/file_icon.rb +46 -0
  258. data/lib/aspose_pdf_cloud/models/file_version.rb +264 -0
  259. data/lib/aspose_pdf_cloud/models/file_versions_response.rb +227 -0
  260. data/lib/aspose_pdf_cloud/models/files_response.rb +1 -1
  261. data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +1 -1
  262. data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +1 -1
  263. data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -1
  264. data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +13 -3
  265. data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +3 -2
  266. data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +3 -2
  267. data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +3 -2
  268. data/lib/aspose_pdf_cloud/models/free_text_intent.rb +1 -1
  269. data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +13 -13
  270. data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +3 -2
  271. data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +3 -2
  272. data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +3 -2
  273. data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -1
  274. data/lib/aspose_pdf_cloud/models/html_document_type.rb +1 -1
  275. data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +1 -1
  276. data/lib/aspose_pdf_cloud/models/image.rb +2 -2
  277. data/lib/aspose_pdf_cloud/models/image_response.rb +3 -2
  278. data/lib/aspose_pdf_cloud/models/image_src_type.rb +1 -1
  279. data/lib/aspose_pdf_cloud/models/image_template.rb +1 -1
  280. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +1 -1
  281. data/lib/aspose_pdf_cloud/models/images.rb +3 -2
  282. data/lib/aspose_pdf_cloud/models/images_response.rb +3 -2
  283. data/lib/aspose_pdf_cloud/models/ink_annotation.rb +13 -13
  284. data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +3 -2
  285. data/lib/aspose_pdf_cloud/models/ink_annotations.rb +3 -2
  286. data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +3 -2
  287. data/lib/aspose_pdf_cloud/models/justification.rb +1 -1
  288. data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +1 -1
  289. data/lib/aspose_pdf_cloud/models/line_annotation.rb +13 -13
  290. data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +3 -2
  291. data/lib/aspose_pdf_cloud/models/line_annotations.rb +3 -2
  292. data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +3 -2
  293. data/lib/aspose_pdf_cloud/models/line_ending.rb +1 -1
  294. data/lib/aspose_pdf_cloud/models/line_intent.rb +1 -1
  295. data/lib/aspose_pdf_cloud/models/line_spacing.rb +1 -1
  296. data/lib/aspose_pdf_cloud/models/link.rb +1 -1
  297. data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -1
  298. data/lib/aspose_pdf_cloud/models/link_annotation.rb +2 -2
  299. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +3 -2
  300. data/lib/aspose_pdf_cloud/models/link_annotations.rb +3 -2
  301. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +3 -2
  302. data/lib/aspose_pdf_cloud/models/link_element.rb +1 -1
  303. data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -1
  304. data/lib/aspose_pdf_cloud/models/margin_info.rb +1 -1
  305. data/lib/aspose_pdf_cloud/models/markup_annotation.rb +13 -3
  306. data/lib/aspose_pdf_cloud/models/merge_documents.rb +1 -1
  307. data/lib/aspose_pdf_cloud/models/movie_annotation.rb +345 -0
  308. data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +226 -0
  309. data/lib/aspose_pdf_cloud/models/movie_annotations.rb +215 -0
  310. data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +226 -0
  311. data/lib/aspose_pdf_cloud/models/optimize_options.rb +1 -1
  312. data/lib/aspose_pdf_cloud/models/page.rb +4 -2
  313. data/lib/aspose_pdf_cloud/models/page_word_count.rb +1 -1
  314. data/lib/aspose_pdf_cloud/models/pages.rb +3 -2
  315. data/lib/aspose_pdf_cloud/models/paragraph.rb +15 -3
  316. data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +1 -1
  317. data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -1
  318. data/lib/aspose_pdf_cloud/models/point.rb +1 -1
  319. data/lib/aspose_pdf_cloud/models/poly_annotation.rb +14 -4
  320. data/lib/aspose_pdf_cloud/models/poly_intent.rb +1 -1
  321. data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +17 -17
  322. data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +3 -2
  323. data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +3 -2
  324. data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +3 -2
  325. data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +17 -17
  326. data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +3 -2
  327. data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +3 -2
  328. data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +3 -2
  329. data/lib/aspose_pdf_cloud/models/popup_annotation.rb +13 -13
  330. data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +3 -2
  331. data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +13 -13
  332. data/lib/aspose_pdf_cloud/models/popup_annotations.rb +3 -2
  333. data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +3 -2
  334. data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +1 -1
  335. data/lib/aspose_pdf_cloud/models/{rectangle_pdf.rb → rectangle.rb} +6 -2
  336. data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +377 -0
  337. data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +226 -0
  338. data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +215 -0
  339. data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +226 -0
  340. data/lib/aspose_pdf_cloud/models/rotation.rb +1 -1
  341. data/lib/aspose_pdf_cloud/models/segment.rb +4 -2
  342. data/lib/aspose_pdf_cloud/models/shape_type.rb +1 -1
  343. data/lib/aspose_pdf_cloud/models/signature.rb +3 -3
  344. data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -1
  345. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +3 -3
  346. data/lib/aspose_pdf_cloud/models/sound_annotation.rb +415 -0
  347. data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +226 -0
  348. data/lib/aspose_pdf_cloud/models/sound_annotations.rb +215 -0
  349. data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +226 -0
  350. data/lib/aspose_pdf_cloud/models/sound_encoding.rb +46 -0
  351. data/lib/aspose_pdf_cloud/models/sound_icon.rb +44 -0
  352. data/lib/aspose_pdf_cloud/models/split_result.rb +1 -1
  353. data/lib/aspose_pdf_cloud/models/split_result_document.rb +1 -1
  354. data/lib/aspose_pdf_cloud/models/split_result_response.rb +3 -3
  355. data/lib/aspose_pdf_cloud/models/square_annotation.rb +16 -16
  356. data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +3 -2
  357. data/lib/aspose_pdf_cloud/models/square_annotations.rb +3 -2
  358. data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +3 -2
  359. data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +13 -13
  360. data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +3 -2
  361. data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +3 -2
  362. data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +3 -2
  363. data/lib/aspose_pdf_cloud/models/stamp.rb +1 -1
  364. data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -1
  365. data/lib/aspose_pdf_cloud/models/storage_exist_response.rb +225 -0
  366. data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +13 -13
  367. data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +3 -2
  368. data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +3 -2
  369. data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +3 -2
  370. data/lib/aspose_pdf_cloud/models/text_annotation.rb +13 -13
  371. data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +3 -2
  372. data/lib/aspose_pdf_cloud/models/text_annotations.rb +3 -2
  373. data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +3 -2
  374. data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +1 -1
  375. data/lib/aspose_pdf_cloud/models/text_icon.rb +1 -1
  376. data/lib/aspose_pdf_cloud/models/text_line.rb +2 -2
  377. data/lib/aspose_pdf_cloud/models/text_rect.rb +6 -3
  378. data/lib/aspose_pdf_cloud/models/text_rects.rb +3 -2
  379. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +10 -9
  380. data/lib/aspose_pdf_cloud/models/text_replace.rb +2 -2
  381. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +3 -1
  382. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +3 -2
  383. data/lib/aspose_pdf_cloud/models/text_state.rb +1 -1
  384. data/lib/aspose_pdf_cloud/models/text_style.rb +1 -1
  385. data/lib/aspose_pdf_cloud/models/underline_annotation.rb +13 -13
  386. data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +3 -2
  387. data/lib/aspose_pdf_cloud/models/underline_annotations.rb +3 -2
  388. data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +3 -2
  389. data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +1 -1
  390. data/lib/aspose_pdf_cloud/models/word_count.rb +1 -1
  391. data/lib/aspose_pdf_cloud/models/word_count_response.rb +1 -1
  392. data/lib/aspose_pdf_cloud/models/wrap_mode.rb +1 -1
  393. data/lib/aspose_pdf_cloud/version.rb +2 -2
  394. data/test/pdf_tests.rb +595 -41
  395. data/test_data/PdfWithAnnotations.pdf +0 -0
  396. data/test_data/PdfWithAnnotations1.pdf +0 -0
  397. metadata +57 -4
  398. data/docs/RectanglePdf.md +0 -12
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.PDF Cloud
3
+ Copyright (c) 2019 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
@@ -23,7 +23,7 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
-
26
+ # Represents response containing single underline annotation object
27
27
  class UnderlineAnnotationResponse
28
28
  # Response status code.
29
29
  attr_accessor :code
@@ -31,6 +31,7 @@ module AsposePdfCloud
31
31
  # Response status.
32
32
  attr_accessor :status
33
33
 
34
+ # Underline annotation object
34
35
  attr_accessor :annotation
35
36
 
36
37
 
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.PDF Cloud
3
+ Copyright (c) 2019 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
@@ -23,11 +23,12 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
- # List of annotations.
26
+ # Object representing a list of underline annotations.
27
27
  class UnderlineAnnotations
28
28
  # Link to the document.
29
29
  attr_accessor :links
30
30
 
31
+ # List of underline annotations.
31
32
  attr_accessor :list
32
33
 
33
34
 
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.PDF Cloud
3
+ Copyright (c) 2019 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
@@ -23,7 +23,7 @@ require 'date'
23
23
  require 'time'
24
24
 
25
25
  module AsposePdfCloud
26
-
26
+ # Represents response containing multiple underline annotation objects
27
27
  class UnderlineAnnotationsResponse
28
28
  # Response status code.
29
29
  attr_accessor :code
@@ -31,6 +31,7 @@ module AsposePdfCloud
31
31
  # Response status.
32
32
  attr_accessor :status
33
33
 
34
+ # Underline annotations object
34
35
  attr_accessor :annotations
35
36
 
36
37
 
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.PDF Cloud
3
+ Copyright (c) 2019 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 Cloud
3
+ Copyright (c) 2019 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 Cloud
3
+ Copyright (c) 2019 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 Cloud
3
+ Copyright (c) 2019 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 Cloud
3
+ Copyright (c) 2019 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
@@ -20,5 +20,5 @@ SOFTWARE.
20
20
  =end
21
21
 
22
22
  module AsposePdfCloud
23
- VERSION = "18.11.0"
23
+ VERSION = "19.1.0"
24
24
  end
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2018 Aspose.PDF Cloud
3
+ Copyright (c) 2019 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
@@ -31,7 +31,7 @@ class PdfTests < Minitest::Test
31
31
 
32
32
  def setup
33
33
  # Get App key and App SID from https://aspose.cloud
34
- @pdf_api = PdfApi.new('95e2a135b1e1b5e8e6b4a97395b30213', 'b03fc72c-e765-4427-822c-8c50a6dd628a')
34
+ @pdf_api = PdfApi.new('app_key', 'app_sid')
35
35
 
36
36
  @temp_folder = 'TempPdfCloud'
37
37
  @test_data_folder = '../test_data/'
@@ -145,7 +145,7 @@ class PdfTests < Minitest::Test
145
145
 
146
146
  annotation = PolyLineAnnotation.new
147
147
  annotation.name = 'Test poly_line'
148
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
148
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
149
149
  annotation.flags = [AnnotationFlags::DEFAULT]
150
150
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
151
151
  annotation.rich_text = 'Rich Text'
@@ -202,7 +202,7 @@ class PdfTests < Minitest::Test
202
202
 
203
203
  annotation = PolyLineAnnotation.new
204
204
  annotation.name = 'Test poly_line'
205
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
205
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
206
206
  annotation.flags = [AnnotationFlags::DEFAULT]
207
207
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
208
208
  annotation.rich_text = 'Rich Text'
@@ -223,6 +223,280 @@ class PdfTests < Minitest::Test
223
223
  assert(response, 'Failed to replace polyline annotation.')
224
224
  end
225
225
 
226
+ # File Attachment Annotations Tests
227
+
228
+ def test_get_document_file_attachment_annotations
229
+ file_name = 'PdfWithAnnotations.pdf'
230
+ upload_file(file_name)
231
+
232
+ opts = {
233
+ :folder => @temp_folder
234
+ }
235
+
236
+ response = @pdf_api.get_document_file_attachment_annotations(file_name, opts)
237
+ assert(response, 'Failed to read document file attachment annotations.')
238
+ end
239
+
240
+ def test_get_page_file_attachment_annotations
241
+ file_name = 'PdfWithAnnotations.pdf'
242
+ upload_file(file_name)
243
+
244
+ page_number = 2
245
+ opts = {
246
+ :folder => @temp_folder
247
+ }
248
+
249
+ response = @pdf_api.get_page_file_attachment_annotations(file_name, page_number, opts)
250
+ assert(response, 'Failed to read page file attachment annotations.')
251
+ end
252
+
253
+ def test_post_page_file_attachment_annotations
254
+ file_name = 'PdfWithAnnotations.pdf'
255
+ upload_file(file_name)
256
+
257
+ attachment_file = '4pages.pdf'
258
+ upload_file(attachment_file)
259
+
260
+ page_number = 1
261
+
262
+ opts = {
263
+ :folder => @temp_folder
264
+ }
265
+
266
+ annotation = FileAttachmentAnnotation.new
267
+ annotation.name = 'Test FileAttachment Annotation'
268
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
269
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
270
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
271
+ annotation.rich_text = 'Rich Text'
272
+ annotation.subject = 'Subj'
273
+ annotation.z_index = 1
274
+ annotation.title = 'Title'
275
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
276
+ annotation.file_path = @temp_folder + '/' + attachment_file
277
+ annotation.file_name = attachment_file
278
+
279
+ response = @pdf_api.post_page_file_attachment_annotations(file_name, page_number, [annotation], opts)
280
+ assert(response, 'Failed to add file attachment annotations into page.')
281
+ end
282
+
283
+ def test_get_file_attachment_annotation
284
+ file_name = 'PdfWithAnnotations.pdf'
285
+ upload_file(file_name)
286
+
287
+ opts = {
288
+ :folder => @temp_folder
289
+ }
290
+
291
+ annotations_response = @pdf_api.get_document_file_attachment_annotations(file_name, opts)
292
+ assert(annotations_response, 'Failed to read document file attachment annotations.')
293
+ annotation_id = annotations_response[0].annotations.list[0].id
294
+
295
+ response = @pdf_api.get_file_attachment_annotation(file_name, annotation_id, opts)
296
+ assert(response, 'Failed to read page file attachment annotations.')
297
+ end
298
+
299
+ def test_put_file_attachment_annotation
300
+ file_name = 'PdfWithAnnotations.pdf'
301
+ upload_file(file_name)
302
+
303
+ attachment_file = '4pages.pdf'
304
+ upload_file(attachment_file)
305
+
306
+ opts = {
307
+ :folder => @temp_folder
308
+ }
309
+
310
+ annotation = FileAttachmentAnnotation.new
311
+ annotation.name = 'Test FileAttachment Annotation Updated'
312
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
313
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
314
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
315
+ annotation.rich_text = 'Rich Text Updated'
316
+ annotation.subject = 'Subj Updated'
317
+ annotation.z_index = 1
318
+ annotation.title = 'Title'
319
+ annotation.modified = '03/04/2018 12:00:00.000 AM'
320
+ annotation.file_path = @temp_folder + '/' + attachment_file
321
+ annotation.file_name = attachment_file
322
+
323
+ annotations_response = @pdf_api.get_document_file_attachment_annotations(file_name, opts)
324
+ assert(annotations_response, 'Failed to read document file attachment annotations.')
325
+ annotation_id = annotations_response[0].annotations.list[0].id
326
+
327
+ response = @pdf_api.put_file_attachment_annotation(file_name, annotation_id, annotation, opts)
328
+ assert(response, 'Failed to replace file attachment annotation.')
329
+ end
330
+
331
+
332
+ def test_get_file_attachment_annotation_data
333
+ file_name = 'PdfWithAnnotations.pdf'
334
+ upload_file(file_name)
335
+
336
+ opts = {
337
+ :folder => @temp_folder
338
+ }
339
+
340
+ annotations_response = @pdf_api.get_document_file_attachment_annotations(file_name, opts)
341
+ assert(annotations_response, 'Failed to read document file attachment annotations.')
342
+ annotation_id = annotations_response[0].annotations.list[0].id
343
+
344
+ response = @pdf_api.get_file_attachment_annotation_data(file_name, annotation_id, opts)
345
+ assert(response, 'Failed to read page file attachment annotation data.')
346
+ end
347
+
348
+ def test_put_file_attachment_annotation_data_extract
349
+ file_name = 'PdfWithAnnotations.pdf'
350
+ upload_file(file_name)
351
+
352
+ opts = {
353
+ :folder => @temp_folder
354
+ }
355
+
356
+ annotations_response = @pdf_api.get_document_file_attachment_annotations(file_name, opts)
357
+ assert(annotations_response, 'Failed to read document file attachment annotations.')
358
+ annotation_id = annotations_response[0].annotations.list[0].id
359
+
360
+ response = @pdf_api.put_file_attachment_annotation_data_extract(file_name, annotation_id, opts)
361
+ assert(response, 'Failed to read page file attachment annotation data.')
362
+ end
363
+
364
+ # Sound Annotations Tests
365
+
366
+ def test_get_document_sound_annotations
367
+ file_name = 'PdfWithAnnotations.pdf'
368
+ upload_file(file_name)
369
+
370
+ opts = {
371
+ :folder => @temp_folder
372
+ }
373
+
374
+ response = @pdf_api.get_document_sound_annotations(file_name, opts)
375
+ assert(response, 'Failed to read document sound annotations.')
376
+ end
377
+
378
+ def test_get_page_sound_annotations
379
+ file_name = 'PdfWithAnnotations.pdf'
380
+ upload_file(file_name)
381
+
382
+ page_number = 2
383
+ opts = {
384
+ :folder => @temp_folder
385
+ }
386
+
387
+ response = @pdf_api.get_page_sound_annotations(file_name, page_number, opts)
388
+ assert(response, 'Failed to read page sound annotations.')
389
+ end
390
+
391
+ def test_post_page_sound_annotations
392
+ file_name = 'PdfWithAnnotations.pdf'
393
+ upload_file(file_name)
394
+
395
+ attachment_file = '4pages.pdf'
396
+ upload_file(attachment_file)
397
+
398
+ page_number = 1
399
+
400
+ opts = {
401
+ :folder => @temp_folder
402
+ }
403
+
404
+ annotation = FileAttachmentAnnotation.new
405
+ annotation.name = 'Test Sound Annotation'
406
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
407
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
408
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
409
+ annotation.rich_text = 'Rich Text'
410
+ annotation.subject = 'Subj'
411
+ annotation.z_index = 1
412
+ annotation.title = 'Title'
413
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
414
+ annotation.file_path = @temp_folder + '/' + attachment_file
415
+
416
+ response = @pdf_api.post_page_sound_annotations(file_name, page_number, [annotation], opts)
417
+ assert(response, 'Failed to add sound annotations into page.')
418
+ end
419
+
420
+ def test_get_sound_annotation
421
+ file_name = 'PdfWithAnnotations.pdf'
422
+ upload_file(file_name)
423
+
424
+ opts = {
425
+ :folder => @temp_folder
426
+ }
427
+
428
+ annotations_response = @pdf_api.get_document_sound_annotations(file_name, opts)
429
+ assert(annotations_response, 'Failed to read document sound annotations.')
430
+ annotation_id = annotations_response[0].annotations.list[0].id
431
+
432
+ response = @pdf_api.get_sound_annotation(file_name, annotation_id, opts)
433
+ assert(response, 'Failed to read page sound annotations.')
434
+ end
435
+
436
+ def test_put_sound_annotation
437
+ file_name = 'PdfWithAnnotations.pdf'
438
+ upload_file(file_name)
439
+
440
+ attachment_file = '4pages.pdf'
441
+ upload_file(attachment_file)
442
+
443
+ opts = {
444
+ :folder => @temp_folder
445
+ }
446
+
447
+ annotation = FileAttachmentAnnotation.new
448
+ annotation.name = 'Test FileAttachment Annotation Updated'
449
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
450
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
451
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
452
+ annotation.rich_text = 'Rich Text Updated'
453
+ annotation.subject = 'Subj Updated'
454
+ annotation.z_index = 1
455
+ annotation.title = 'Title'
456
+ annotation.modified = '03/04/2018 12:00:00.000 AM'
457
+ annotation.file_path = @temp_folder + '/' + attachment_file
458
+
459
+ annotations_response = @pdf_api.get_document_sound_annotations(file_name, opts)
460
+ assert(annotations_response, 'Failed to read document sound annotations.')
461
+ annotation_id = annotations_response[0].annotations.list[0].id
462
+
463
+ response = @pdf_api.put_sound_annotation(file_name, annotation_id, annotation, opts)
464
+ assert(response, 'Failed to replace sound annotation.')
465
+ end
466
+
467
+
468
+ def test_get_sound_annotation_data
469
+ file_name = 'PdfWithAnnotations.pdf'
470
+ upload_file(file_name)
471
+
472
+ opts = {
473
+ :folder => @temp_folder
474
+ }
475
+
476
+ annotations_response = @pdf_api.get_document_sound_annotations(file_name, opts)
477
+ assert(annotations_response, 'Failed to read document sound annotations.')
478
+ annotation_id = annotations_response[0].annotations.list[0].id
479
+
480
+ response = @pdf_api.get_sound_annotation_data(file_name, annotation_id, opts)
481
+ assert(response, 'Failed to read page sound annotation data.')
482
+ end
483
+
484
+ def test_put_sound_annotation_data_extract
485
+ file_name = 'PdfWithAnnotations.pdf'
486
+ upload_file(file_name)
487
+
488
+ out_file_path = 'outFile.dat'
489
+ opts = {
490
+ :folder => @temp_folder
491
+ }
492
+
493
+ annotations_response = @pdf_api.get_document_sound_annotations(file_name, opts)
494
+ assert(annotations_response, 'Failed to read document sound annotations.')
495
+ annotation_id = annotations_response[0].annotations.list[0].id
496
+
497
+ response = @pdf_api.put_sound_annotation_data_extract(file_name, annotation_id, out_file_path, opts)
498
+ assert(response, 'Failed to read page sound annotation data.')
499
+ end
226
500
 
227
501
  # Polygon Annotations Tests
228
502
 
@@ -248,7 +522,7 @@ class PdfTests < Minitest::Test
248
522
 
249
523
  annotation = PolygonAnnotation.new
250
524
  annotation.name = 'Test polygon'
251
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
525
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
252
526
  annotation.flags = [AnnotationFlags::DEFAULT]
253
527
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
254
528
  annotation.rich_text = 'Rich Text'
@@ -305,7 +579,7 @@ class PdfTests < Minitest::Test
305
579
 
306
580
  annotation = PolygonAnnotation.new
307
581
  annotation.name = 'Test polygon'
308
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
582
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
309
583
  annotation.flags = [AnnotationFlags::DEFAULT]
310
584
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
311
585
  annotation.rich_text = 'Rich Text'
@@ -350,7 +624,7 @@ class PdfTests < Minitest::Test
350
624
 
351
625
  annotation = CircleAnnotation.new
352
626
  annotation.name = 'Test circle'
353
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
627
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
354
628
  annotation.flags = [AnnotationFlags::DEFAULT]
355
629
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
356
630
  annotation.rich_text = 'Rich Text'
@@ -401,7 +675,7 @@ class PdfTests < Minitest::Test
401
675
 
402
676
  annotation = CircleAnnotation.new
403
677
  annotation.name = 'Test circle'
404
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
678
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
405
679
  annotation.flags = [AnnotationFlags::DEFAULT]
406
680
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
407
681
  annotation.rich_text = 'Rich Text'
@@ -441,7 +715,7 @@ class PdfTests < Minitest::Test
441
715
 
442
716
  annotation = SquareAnnotation.new
443
717
  annotation.name = 'Test square'
444
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
718
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
445
719
  annotation.flags = [AnnotationFlags::DEFAULT]
446
720
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
447
721
  annotation.rich_text = 'Rich Text'
@@ -492,7 +766,7 @@ class PdfTests < Minitest::Test
492
766
 
493
767
  annotation = SquareAnnotation.new
494
768
  annotation.name = 'Test square'
495
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
769
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
496
770
  annotation.flags = [AnnotationFlags::DEFAULT]
497
771
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
498
772
  annotation.rich_text = 'Rich Text'
@@ -532,7 +806,7 @@ class PdfTests < Minitest::Test
532
806
 
533
807
  annotation = LineAnnotation.new
534
808
  annotation.name = 'Test Line'
535
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
809
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
536
810
  annotation.flags = [AnnotationFlags::DEFAULT]
537
811
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
538
812
  annotation.rich_text = 'Rich Text'
@@ -585,7 +859,7 @@ class PdfTests < Minitest::Test
585
859
 
586
860
  annotation = LineAnnotation.new
587
861
  annotation.name = 'Test Line'
588
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
862
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
589
863
  annotation.flags = [AnnotationFlags::DEFAULT]
590
864
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
591
865
  annotation.rich_text = 'Rich Text'
@@ -602,6 +876,101 @@ class PdfTests < Minitest::Test
602
876
  assert(response, 'Failed to replace line annotation.')
603
877
  end
604
878
 
879
+ # Movie Annotations Tests
880
+
881
+ def test_get_document_movie_annotations
882
+ file_name = 'PdfWithAnnotations1.pdf'
883
+ upload_file(file_name)
884
+
885
+ opts = {
886
+ :folder => @temp_folder
887
+ }
888
+
889
+ response = @pdf_api.get_document_movie_annotations(file_name, opts)
890
+ assert(response, 'Failed to read document movie annotations.')
891
+ end
892
+
893
+ def test_post_page_movie_annotations
894
+ file_name = 'PdfWithAnnotations1.pdf'
895
+ upload_file(file_name)
896
+
897
+ attachment_file = '4pages.pdf'
898
+ upload_file(attachment_file)
899
+
900
+ opts = {
901
+ :folder => @temp_folder
902
+ }
903
+
904
+ annotation = MovieAnnotation.new
905
+ annotation.name = 'Test Movie Annotation'
906
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
907
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
908
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
909
+ annotation.z_index = 1
910
+ annotation.file_path = attachment_file
911
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
912
+
913
+ response = @pdf_api.post_page_movie_annotations(file_name, 1, [annotation], opts)
914
+ assert(response, 'Failed to add movie annotations into page.')
915
+ end
916
+
917
+ def test_get_page_movie_annotations
918
+ file_name = 'PdfWithAnnotations1.pdf'
919
+ upload_file(file_name)
920
+
921
+ page_number = 1
922
+ opts = {
923
+ :folder => @temp_folder
924
+ }
925
+
926
+ response = @pdf_api.get_page_movie_annotations(file_name, page_number, opts)
927
+ assert(response, 'Failed to read page movie annotations.')
928
+ end
929
+
930
+ def test_get_movie_annotation
931
+ file_name = 'PdfWithAnnotations1.pdf'
932
+ upload_file(file_name)
933
+
934
+ opts = {
935
+ :folder => @temp_folder
936
+ }
937
+
938
+ annotations_response = @pdf_api.get_document_movie_annotations(file_name, opts)
939
+ assert(annotations_response, 'Failed to read document movie annotations.')
940
+ annotation_id = annotations_response[0].annotations.list[0].id
941
+
942
+ response = @pdf_api.get_movie_annotation(file_name, annotation_id, opts)
943
+ assert(response, 'Failed to read page movie annotations.')
944
+ end
945
+
946
+ def test_put_movie_annotation
947
+ file_name = 'PdfWithAnnotations1.pdf'
948
+ upload_file(file_name)
949
+
950
+ attachment_file = '4pages.pdf'
951
+ upload_file(attachment_file)
952
+
953
+ opts = {
954
+ :folder => @temp_folder
955
+ }
956
+
957
+ annotation = MovieAnnotation.new
958
+ annotation.name = 'Test Movie Annotation'
959
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
960
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
961
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
962
+ annotation.z_index = 1
963
+ annotation.file_path = attachment_file
964
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
965
+
966
+ annotations_response = @pdf_api.get_document_movie_annotations(file_name, opts)
967
+ assert(annotations_response, 'Failed to read document movie annotations.')
968
+ annotation_id = annotations_response[0].annotations.list[0].id
969
+
970
+ response = @pdf_api.put_movie_annotation(file_name, annotation_id, annotation, opts)
971
+ assert(response, 'Failed to replace movie annotation.')
972
+ end
973
+
605
974
 
606
975
  # Free Text Annotations Tests
607
976
 
@@ -634,7 +1003,7 @@ class PdfTests < Minitest::Test
634
1003
  annotation = FreeTextAnnotation.new
635
1004
  annotation.name = 'Test Free Text'
636
1005
  annotation.text_style = text_style
637
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1006
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
638
1007
  annotation.flags = [AnnotationFlags::DEFAULT]
639
1008
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
640
1009
  annotation.intent = FreeTextIntent::FREE_TEXT_TYPE_WRITER
@@ -694,7 +1063,7 @@ class PdfTests < Minitest::Test
694
1063
  annotation = FreeTextAnnotation.new
695
1064
  annotation.name = 'Test Free Text'
696
1065
  annotation.text_style = text_style
697
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1066
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
698
1067
  annotation.flags = [AnnotationFlags::DEFAULT]
699
1068
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
700
1069
  annotation.intent = FreeTextIntent::FREE_TEXT_TYPE_WRITER
@@ -737,7 +1106,7 @@ class PdfTests < Minitest::Test
737
1106
 
738
1107
  annotation = TextAnnotation.new
739
1108
  annotation.name = 'Test Free Text'
740
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1109
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
741
1110
  annotation.flags = [AnnotationFlags::DEFAULT]
742
1111
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
743
1112
  annotation.rich_text = 'Rich Text'
@@ -788,7 +1157,7 @@ class PdfTests < Minitest::Test
788
1157
 
789
1158
  annotation = TextAnnotation.new
790
1159
  annotation.name = 'Test Free Text'
791
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1160
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
792
1161
  annotation.flags = [AnnotationFlags::DEFAULT]
793
1162
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
794
1163
  annotation.rich_text = 'Rich Text'
@@ -828,7 +1197,7 @@ class PdfTests < Minitest::Test
828
1197
 
829
1198
  annotation = HighlightAnnotation.new
830
1199
  annotation.name = 'Test highlight'
831
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1200
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
832
1201
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
833
1202
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
834
1203
  annotation.rich_text = 'Rich Text'
@@ -885,7 +1254,7 @@ class PdfTests < Minitest::Test
885
1254
 
886
1255
  annotation = HighlightAnnotation.new
887
1256
  annotation.name = 'Test highlight'
888
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1257
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
889
1258
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
890
1259
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
891
1260
  annotation.rich_text = 'Rich Text'
@@ -930,7 +1299,7 @@ class PdfTests < Minitest::Test
930
1299
 
931
1300
  annotation = UnderlineAnnotation.new
932
1301
  annotation.name = 'Test underline'
933
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1302
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
934
1303
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
935
1304
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
936
1305
  annotation.rich_text = 'Rich Text'
@@ -988,7 +1357,7 @@ class PdfTests < Minitest::Test
988
1357
 
989
1358
  annotation = UnderlineAnnotation.new
990
1359
  annotation.name = 'Test underline'
991
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1360
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
992
1361
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
993
1362
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
994
1363
  annotation.rich_text = 'Rich Text'
@@ -1010,6 +1379,101 @@ class PdfTests < Minitest::Test
1010
1379
  assert(response, 'Failed to replace underline annotation.')
1011
1380
  end
1012
1381
 
1382
+ # Redaction Annotations Tests
1383
+
1384
+ def test_get_document_redaction_annotations
1385
+ file_name = 'PdfWithAnnotations.pdf'
1386
+ upload_file(file_name)
1387
+
1388
+ opts = {
1389
+ :folder => @temp_folder
1390
+ }
1391
+
1392
+ response = @pdf_api.get_document_redaction_annotations(file_name, opts)
1393
+ assert(response, 'Failed to read document redaction annotations.')
1394
+ end
1395
+
1396
+ def test_post_page_redaction_annotations
1397
+ file_name = 'PdfWithAnnotations.pdf'
1398
+ upload_file(file_name)
1399
+
1400
+ opts = {
1401
+ :folder => @temp_folder
1402
+ }
1403
+
1404
+ annotation = RedactionAnnotation.new
1405
+ annotation.name = 'Test Redaction Annotation'
1406
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1407
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1408
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
1409
+ annotation.z_index = 1
1410
+ annotation.quad_point = [
1411
+ Point.new({:X => 11, :Y => 42}),
1412
+ Point.new({:X => 33, :Y => 44})
1413
+ ]
1414
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
1415
+
1416
+ response = @pdf_api.post_page_redaction_annotations(file_name, 1, [annotation], opts)
1417
+ assert(response, 'Failed to add redaction annotations into page.')
1418
+ end
1419
+
1420
+ def test_get_page_redaction_annotations
1421
+ file_name = 'PdfWithAnnotations.pdf'
1422
+ upload_file(file_name)
1423
+
1424
+ page_number = 1
1425
+ opts = {
1426
+ :folder => @temp_folder
1427
+ }
1428
+
1429
+ response = @pdf_api.get_page_redaction_annotations(file_name, page_number, opts)
1430
+ assert(response, 'Failed to read page redaction annotations.')
1431
+ end
1432
+
1433
+ def test_get_redaction_annotation
1434
+ file_name = 'PdfWithAnnotations.pdf'
1435
+ upload_file(file_name)
1436
+
1437
+ opts = {
1438
+ :folder => @temp_folder
1439
+ }
1440
+
1441
+ annotations_response = @pdf_api.get_document_redaction_annotations(file_name, opts)
1442
+ assert(annotations_response, 'Failed to read document redaction annotations.')
1443
+ annotation_id = annotations_response[0].annotations.list[0].id
1444
+
1445
+ response = @pdf_api.get_redaction_annotation(file_name, annotation_id, opts)
1446
+ assert(response, 'Failed to read page redaction annotations.')
1447
+ end
1448
+
1449
+ def test_put_redaction_annotation
1450
+ file_name = 'PdfWithAnnotations.pdf'
1451
+ upload_file(file_name)
1452
+
1453
+ opts = {
1454
+ :folder => @temp_folder
1455
+ }
1456
+
1457
+ annotation = RedactionAnnotation.new
1458
+ annotation.name = 'Test Redaction Annotation Updated'
1459
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1460
+ annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1461
+ annotation.horizontal_alignment = HorizontalAlignment::CENTER
1462
+ annotation.z_index = 1
1463
+ annotation.quad_point = [
1464
+ Point.new({:X => 12, :Y => 43}),
1465
+ Point.new({:X => 33, :Y => 44})
1466
+ ]
1467
+ annotation.modified = '02/02/2018 12:00:00.000 AM'
1468
+
1469
+ annotations_response = @pdf_api.get_document_redaction_annotations(file_name, opts)
1470
+ assert(annotations_response, 'Failed to read document redaction annotations.')
1471
+ annotation_id = annotations_response[0].annotations.list[0].id
1472
+
1473
+ response = @pdf_api.put_redaction_annotation(file_name, annotation_id, annotation, opts)
1474
+ assert(response, 'Failed to replace redaction annotation.')
1475
+ end
1476
+
1013
1477
  # Squiggly Annotations Tests
1014
1478
 
1015
1479
  def test_get_document_squiggly_annotations
@@ -1034,7 +1498,7 @@ class PdfTests < Minitest::Test
1034
1498
 
1035
1499
  annotation = SquigglyAnnotation.new
1036
1500
  annotation.name = 'Test squiggly'
1037
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1501
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1038
1502
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1039
1503
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1040
1504
  annotation.rich_text = 'Rich Text'
@@ -1092,7 +1556,7 @@ class PdfTests < Minitest::Test
1092
1556
 
1093
1557
  annotation = SquigglyAnnotation.new
1094
1558
  annotation.name = 'Test squiggly'
1095
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1559
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1096
1560
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1097
1561
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1098
1562
  annotation.rich_text = 'Rich Text'
@@ -1138,7 +1602,7 @@ class PdfTests < Minitest::Test
1138
1602
 
1139
1603
  annotation = StrikeOutAnnotation.new
1140
1604
  annotation.name = 'Test strike_out'
1141
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1605
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1142
1606
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1143
1607
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1144
1608
  annotation.rich_text = 'Rich Text'
@@ -1196,7 +1660,7 @@ class PdfTests < Minitest::Test
1196
1660
 
1197
1661
  annotation = StrikeOutAnnotation.new
1198
1662
  annotation.name = 'Test strike_out'
1199
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1663
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1200
1664
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1201
1665
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1202
1666
  annotation.rich_text = 'Rich Text'
@@ -1242,14 +1706,14 @@ class PdfTests < Minitest::Test
1242
1706
 
1243
1707
  annotation = CaretAnnotation.new
1244
1708
  annotation.name = 'Test caret'
1245
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1709
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1246
1710
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1247
1711
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1248
1712
  annotation.rich_text = 'Rich Text'
1249
1713
  annotation.subject = 'Subj'
1250
1714
  annotation.z_index = 1
1251
1715
  annotation.title = 'Title'
1252
- annotation.frame = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1716
+ annotation.frame = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1253
1717
  annotation.modified = '02/02/2018 00:00:00.000 AM'
1254
1718
 
1255
1719
  response = @pdf_api.post_page_caret_annotations(file_name, 1, [annotation], opts)
@@ -1295,13 +1759,13 @@ class PdfTests < Minitest::Test
1295
1759
 
1296
1760
  annotation = CaretAnnotation.new
1297
1761
  annotation.name = 'Test caret'
1298
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1762
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1299
1763
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1300
1764
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1301
1765
  annotation.rich_text = 'Rich Text'
1302
1766
  annotation.subject = 'Subj'
1303
1767
  annotation.z_index = 1
1304
- annotation.frame = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1768
+ annotation.frame = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1305
1769
  annotation.modified = '02/02/2018 00:00:00.000 AM'
1306
1770
 
1307
1771
  annotations_response = @pdf_api.get_document_caret_annotations(file_name, opts)
@@ -1336,7 +1800,7 @@ class PdfTests < Minitest::Test
1336
1800
 
1337
1801
  annotation = InkAnnotation.new
1338
1802
  annotation.name = 'Test ink'
1339
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1803
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1340
1804
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1341
1805
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1342
1806
  annotation.rich_text = 'Rich Text'
@@ -1400,7 +1864,7 @@ class PdfTests < Minitest::Test
1400
1864
 
1401
1865
  annotation = InkAnnotation.new
1402
1866
  annotation.name = 'Test ink'
1403
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1867
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1404
1868
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1405
1869
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1406
1870
  annotation.rich_text = 'Rich Text'
@@ -1466,7 +1930,7 @@ class PdfTests < Minitest::Test
1466
1930
 
1467
1931
  annotation = PopupAnnotation.new
1468
1932
  annotation.name = 'Test popup'
1469
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1933
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1470
1934
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1471
1935
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1472
1936
  annotation.z_index = 1
@@ -1515,7 +1979,7 @@ class PdfTests < Minitest::Test
1515
1979
 
1516
1980
  annotation = PopupAnnotation.new
1517
1981
  annotation.name = 'Test popup'
1518
- annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1982
+ annotation.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200})
1519
1983
  annotation.flags = [AnnotationFlags::HIDDEN, AnnotationFlags::NO_VIEW]
1520
1984
  annotation.horizontal_alignment = HorizontalAlignment::CENTER
1521
1985
  annotation.z_index = 1
@@ -2489,7 +2953,7 @@ class PdfTests < Minitest::Test
2489
2953
  file_name = 'Hello_world.pdf'
2490
2954
  upload_file(file_name)
2491
2955
 
2492
- rect = RectanglePdf.new
2956
+ rect = Rectangle.new
2493
2957
  rect.llx = 50
2494
2958
  rect.lly = 200
2495
2959
  rect.urx = 200
@@ -2585,6 +3049,19 @@ class PdfTests < Minitest::Test
2585
3049
  assert(response, 'Failed to make fields flatten.')
2586
3050
  end
2587
3051
 
3052
+ def test_post_flatten_document
3053
+
3054
+ name = 'PdfWithAcroForm.pdf'
3055
+ upload_file(name)
3056
+
3057
+ opts = {
3058
+ :hideButtons => true,
3059
+ :folder => @temp_folder
3060
+ }
3061
+
3062
+ response = @pdf_api.post_flatten_document(name, opts)
3063
+ assert(response, 'Failed flatten document.')
3064
+ end
2588
3065
 
2589
3066
  # Images Tests
2590
3067
 
@@ -2942,7 +3419,7 @@ class PdfTests < Minitest::Test
2942
3419
  :folder => @temp_folder
2943
3420
  }
2944
3421
 
2945
- rect = RectanglePdf.new
3422
+ rect = Rectangle.new
2946
3423
  rect.llx = 100
2947
3424
  rect.lly = 100
2948
3425
  rect.urx = 500
@@ -2970,7 +3447,7 @@ class PdfTests < Minitest::Test
2970
3447
  assert(annotations_response, 'Failed to read document page link annotations.')
2971
3448
  link_id = annotations_response[0].links.list[0].id
2972
3449
 
2973
- rect = RectanglePdf.new
3450
+ rect = Rectangle.new
2974
3451
  rect.llx = 100
2975
3452
  rect.lly = 100
2976
3453
  rect.urx = 500
@@ -3478,7 +3955,7 @@ class PdfTests < Minitest::Test
3478
3955
  signature_file_name = 'test1234.pfx'
3479
3956
  upload_file(signature_file_name)
3480
3957
 
3481
- rectangle = RectanglePdf.new
3958
+ rectangle = Rectangle.new
3482
3959
  rectangle.llx = 100
3483
3960
  rectangle.lly = 100
3484
3961
  rectangle.urx = 400
@@ -3514,7 +3991,7 @@ class PdfTests < Minitest::Test
3514
3991
 
3515
3992
  page_number = 1
3516
3993
 
3517
- rectangle = RectanglePdf.new
3994
+ rectangle = Rectangle.new
3518
3995
  rectangle.llx = 100
3519
3996
  rectangle.lly = 100
3520
3997
  rectangle.urx = 400
@@ -3549,7 +4026,7 @@ class PdfTests < Minitest::Test
3549
4026
  signature_file_name = 'test1234.pfx'
3550
4027
  upload_file(signature_file_name)
3551
4028
 
3552
- rectangle = RectanglePdf.new
4029
+ rectangle = Rectangle.new
3553
4030
  rectangle.llx = 100
3554
4031
  rectangle.lly = 100
3555
4032
  rectangle.urx = 400
@@ -3589,7 +4066,7 @@ class PdfTests < Minitest::Test
3589
4066
  file_name = 'marketing.pdf'
3590
4067
  upload_file(file_name)
3591
4068
 
3592
- rect = RectanglePdf.new
4069
+ rect = Rectangle.new
3593
4070
  rect.llx = 100
3594
4071
  rect.lly = 100
3595
4072
  rect.urx = 300
@@ -3621,7 +4098,7 @@ class PdfTests < Minitest::Test
3621
4098
  upload_file(file_name)
3622
4099
  page_number = 1
3623
4100
 
3624
- rect = RectanglePdf.new
4101
+ rect = Rectangle.new
3625
4102
  rect.llx = 100
3626
4103
  rect.lly = 100
3627
4104
  rect.urx = 300
@@ -3690,7 +4167,7 @@ class PdfTests < Minitest::Test
3690
4167
 
3691
4168
  page_number = 1
3692
4169
 
3693
- rectangle = RectanglePdf.new
4170
+ rectangle = Rectangle.new
3694
4171
  rectangle.llx = 100
3695
4172
  rectangle.lly = 100
3696
4173
  rectangle.urx = 200
@@ -3774,4 +4251,81 @@ class PdfTests < Minitest::Test
3774
4251
  response = @pdf_api.get_list_files(opts)
3775
4252
  assert(response, 'Failed get file list.')
3776
4253
  end
4254
+
4255
+ def test_post_move_file
4256
+ file_name = '4pages.pdf'
4257
+ upload_file(file_name)
4258
+ src = @temp_folder + '/' + file_name
4259
+ dest = @temp_folder + '/4pages_renamed.pdf'
4260
+
4261
+ response = @pdf_api.post_move_file(src, dest, {})
4262
+ assert(response, "Failed to rename #{file_name} file.")
4263
+ end
4264
+
4265
+ def test_delete_file
4266
+ file_name = '4pages.pdf'
4267
+ upload_file(file_name)
4268
+ path = @temp_folder + '/' + file_name
4269
+
4270
+ response = @pdf_api.delete_file(path, {})
4271
+ assert(response, "Failed to delete #{file_name} file.")
4272
+ end
4273
+
4274
+ def test_put_create_folder
4275
+ path = @temp_folder + '/testFolder'
4276
+
4277
+ response = @pdf_api.put_create_folder(path, {})
4278
+ assert(response, 'Failed to create folder.')
4279
+ end
4280
+
4281
+ def test_post_move_folder
4282
+ src = @temp_folder + '/testFolder'
4283
+ responseFolder = @pdf_api.put_create_folder(src, {})
4284
+ assert(responseFolder, 'Failed to create folder.')
4285
+
4286
+ dest = @temp_folder + '/testFolderRednamed'
4287
+
4288
+ response = @pdf_api.post_move_folder(src, dest,{})
4289
+ assert(response, 'Failed to move folder.')
4290
+ end
4291
+
4292
+ def test_delete_folder
4293
+ path = @temp_folder + '/testFolder'
4294
+ responseFolder = @pdf_api.put_create_folder(path, {})
4295
+ assert(responseFolder, 'Failed to create folder.')
4296
+
4297
+ response = @pdf_api.delete_folder(path, {})
4298
+ assert(response, 'Failed to delete folder.')
4299
+ end
4300
+
4301
+ def test_get_is_storage_exist
4302
+ name = 'PDF-CI'
4303
+
4304
+ response = @pdf_api.get_is_storage_exist(name, {})
4305
+ assert(response, 'Failed to check storage.')
4306
+ end
4307
+
4308
+ def test_get_is_exist
4309
+ file_name = '4pages.pdf'
4310
+ upload_file(file_name)
4311
+ path = @temp_folder + '/' + file_name
4312
+
4313
+ response = @pdf_api.get_is_exist(path, {})
4314
+ assert(response, 'Failed to check file.')
4315
+ end
4316
+
4317
+ def test_get_disc_usage
4318
+
4319
+ response = @pdf_api.get_disc_usage({})
4320
+ assert(response, 'Failed to check disk usage.')
4321
+ end
4322
+
4323
+ def test_get_list_file_versions
4324
+ file_name = '4pages.pdf'
4325
+ upload_file(file_name)
4326
+ path = @temp_folder + '/' + file_name
4327
+
4328
+ response = @pdf_api.get_list_file_versions(path, {})
4329
+ assert(response, 'Failed to get file versions.')
4330
+ end
3777
4331
  end