aspose_pdf_cloud 19.11.0 → 20.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +44 -9
  4. data/aspose_pdf_cloud.gemspec +1 -1
  5. data/docs/Border.md +14 -0
  6. data/docs/BorderEffect.md +11 -0
  7. data/docs/BorderStyle.md +14 -0
  8. data/docs/Cell.md +3 -0
  9. data/docs/CheckBoxField.md +2 -1
  10. data/docs/ChoiceField.md +3 -1
  11. data/docs/ComboBoxField.md +3 -2
  12. data/docs/Dash.md +10 -0
  13. data/docs/DefaultPageConfig.md +10 -0
  14. data/docs/Direction.md +11 -0
  15. data/docs/DisplayProperties.md +18 -0
  16. data/docs/DisplayPropertiesResponse.md +11 -0
  17. data/docs/Document.md +1 -0
  18. data/docs/DocumentConfig.md +12 -0
  19. data/docs/FormField.md +2 -1
  20. data/docs/ImageFragment.md +15 -0
  21. data/docs/ListBoxField.md +33 -0
  22. data/docs/ListBoxFieldResponse.md +11 -0
  23. data/docs/ListBoxFields.md +10 -0
  24. data/docs/ListBoxFieldsResponse.md +11 -0
  25. data/docs/PageLayout.md +16 -0
  26. data/docs/PageMode.md +15 -0
  27. data/docs/PdfApi.md +452 -14
  28. data/docs/RadioButtonField.md +3 -2
  29. data/docs/RadioButtonOptionField.md +2 -1
  30. data/docs/SignatureField.md +2 -1
  31. data/docs/Table.md +1 -0
  32. data/docs/TextBoxField.md +2 -1
  33. data/lib/aspose_pdf_cloud.rb +17 -1
  34. data/lib/aspose_pdf_cloud/api/pdf_api.rb +1375 -72
  35. data/lib/aspose_pdf_cloud/api_client.rb +2 -2
  36. data/lib/aspose_pdf_cloud/api_error.rb +1 -1
  37. data/lib/aspose_pdf_cloud/configuration.rb +1 -1
  38. data/lib/aspose_pdf_cloud/models/annotation.rb +1 -1
  39. data/lib/aspose_pdf_cloud/models/annotation_flags.rb +1 -1
  40. data/lib/aspose_pdf_cloud/models/annotation_info.rb +1 -1
  41. data/lib/aspose_pdf_cloud/models/annotation_state.rb +1 -1
  42. data/lib/aspose_pdf_cloud/models/annotation_type.rb +1 -1
  43. data/lib/aspose_pdf_cloud/models/annotations_info.rb +1 -1
  44. data/lib/aspose_pdf_cloud/models/annotations_info_response.rb +1 -1
  45. data/lib/aspose_pdf_cloud/models/antialiasing_processing_type.rb +1 -1
  46. data/lib/aspose_pdf_cloud/models/aspose_response.rb +1 -1
  47. data/lib/aspose_pdf_cloud/models/attachment.rb +1 -1
  48. data/lib/aspose_pdf_cloud/models/attachment_response.rb +1 -1
  49. data/lib/aspose_pdf_cloud/models/attachments.rb +1 -1
  50. data/lib/aspose_pdf_cloud/models/attachments_response.rb +1 -1
  51. data/lib/aspose_pdf_cloud/models/bookmark.rb +1 -1
  52. data/lib/aspose_pdf_cloud/models/bookmark_response.rb +1 -1
  53. data/lib/aspose_pdf_cloud/models/bookmarks.rb +1 -1
  54. data/lib/aspose_pdf_cloud/models/bookmarks_response.rb +1 -1
  55. data/lib/aspose_pdf_cloud/models/border.rb +249 -0
  56. data/lib/aspose_pdf_cloud/models/border_corner_style.rb +1 -1
  57. data/lib/aspose_pdf_cloud/models/border_effect.rb +44 -0
  58. data/lib/aspose_pdf_cloud/models/border_info.rb +1 -1
  59. data/lib/aspose_pdf_cloud/models/border_style.rb +47 -0
  60. data/lib/aspose_pdf_cloud/models/box_style.rb +1 -1
  61. data/lib/aspose_pdf_cloud/models/cap_style.rb +1 -1
  62. data/lib/aspose_pdf_cloud/models/caption_position.rb +1 -1
  63. data/lib/aspose_pdf_cloud/models/caret_annotation.rb +1 -1
  64. data/lib/aspose_pdf_cloud/models/caret_annotation_response.rb +1 -1
  65. data/lib/aspose_pdf_cloud/models/caret_annotations.rb +1 -1
  66. data/lib/aspose_pdf_cloud/models/caret_annotations_response.rb +1 -1
  67. data/lib/aspose_pdf_cloud/models/caret_symbol.rb +1 -1
  68. data/lib/aspose_pdf_cloud/models/cell.rb +37 -5
  69. data/lib/aspose_pdf_cloud/models/cell_recognized.rb +1 -1
  70. data/lib/aspose_pdf_cloud/models/check_box_field.rb +12 -7
  71. data/lib/aspose_pdf_cloud/models/check_box_field_response.rb +1 -1
  72. data/lib/aspose_pdf_cloud/models/check_box_fields.rb +1 -1
  73. data/lib/aspose_pdf_cloud/models/check_box_fields_response.rb +1 -1
  74. data/lib/aspose_pdf_cloud/models/choice_field.rb +25 -10
  75. data/lib/aspose_pdf_cloud/models/circle_annotation.rb +1 -1
  76. data/lib/aspose_pdf_cloud/models/circle_annotation_response.rb +1 -1
  77. data/lib/aspose_pdf_cloud/models/circle_annotations.rb +1 -1
  78. data/lib/aspose_pdf_cloud/models/circle_annotations_response.rb +1 -1
  79. data/lib/aspose_pdf_cloud/models/color.rb +1 -1
  80. data/lib/aspose_pdf_cloud/models/color_depth.rb +1 -1
  81. data/lib/aspose_pdf_cloud/models/column_adjustment.rb +1 -1
  82. data/lib/aspose_pdf_cloud/models/combo_box_field.rb +25 -25
  83. data/lib/aspose_pdf_cloud/models/combo_box_field_response.rb +1 -1
  84. data/lib/aspose_pdf_cloud/models/combo_box_fields.rb +1 -1
  85. data/lib/aspose_pdf_cloud/models/combo_box_fields_response.rb +1 -1
  86. data/lib/aspose_pdf_cloud/models/common_figure_annotation.rb +1 -1
  87. data/lib/aspose_pdf_cloud/models/compression_type.rb +1 -1
  88. data/lib/aspose_pdf_cloud/models/crypto_algorithm.rb +1 -1
  89. data/lib/aspose_pdf_cloud/models/dash.rb +219 -0
  90. data/lib/aspose_pdf_cloud/models/default_page_config.rb +209 -0
  91. data/lib/aspose_pdf_cloud/models/direction.rb +44 -0
  92. data/lib/aspose_pdf_cloud/models/disc_usage.rb +1 -1
  93. data/lib/aspose_pdf_cloud/models/display_properties.rb +291 -0
  94. data/lib/aspose_pdf_cloud/models/display_properties_response.rb +224 -0
  95. data/lib/aspose_pdf_cloud/models/doc_format.rb +1 -1
  96. data/lib/aspose_pdf_cloud/models/doc_mdp_access_permission_type.rb +1 -1
  97. data/lib/aspose_pdf_cloud/models/doc_recognition_mode.rb +1 -1
  98. data/lib/aspose_pdf_cloud/models/document.rb +12 -2
  99. data/lib/aspose_pdf_cloud/models/document_config.rb +234 -0
  100. data/lib/aspose_pdf_cloud/models/document_page_response.rb +1 -1
  101. data/lib/aspose_pdf_cloud/models/document_pages_response.rb +1 -1
  102. data/lib/aspose_pdf_cloud/models/document_privilege.rb +1 -1
  103. data/lib/aspose_pdf_cloud/models/document_properties.rb +1 -1
  104. data/lib/aspose_pdf_cloud/models/document_properties_response.rb +1 -1
  105. data/lib/aspose_pdf_cloud/models/document_property.rb +1 -1
  106. data/lib/aspose_pdf_cloud/models/document_property_response.rb +1 -1
  107. data/lib/aspose_pdf_cloud/models/document_response.rb +1 -1
  108. data/lib/aspose_pdf_cloud/models/epub_recognition_mode.rb +1 -1
  109. data/lib/aspose_pdf_cloud/models/error.rb +1 -1
  110. data/lib/aspose_pdf_cloud/models/error_details.rb +1 -1
  111. data/lib/aspose_pdf_cloud/models/field.rb +1 -1
  112. data/lib/aspose_pdf_cloud/models/field_response.rb +1 -1
  113. data/lib/aspose_pdf_cloud/models/field_type.rb +1 -1
  114. data/lib/aspose_pdf_cloud/models/fields.rb +1 -1
  115. data/lib/aspose_pdf_cloud/models/fields_response.rb +1 -1
  116. data/lib/aspose_pdf_cloud/models/file_attachment_annotation.rb +1 -1
  117. data/lib/aspose_pdf_cloud/models/file_attachment_annotation_response.rb +1 -1
  118. data/lib/aspose_pdf_cloud/models/file_attachment_annotations.rb +1 -1
  119. data/lib/aspose_pdf_cloud/models/file_attachment_annotations_response.rb +1 -1
  120. data/lib/aspose_pdf_cloud/models/file_icon.rb +1 -1
  121. data/lib/aspose_pdf_cloud/models/file_version.rb +1 -1
  122. data/lib/aspose_pdf_cloud/models/file_versions.rb +1 -1
  123. data/lib/aspose_pdf_cloud/models/files_list.rb +1 -1
  124. data/lib/aspose_pdf_cloud/models/files_upload_result.rb +1 -1
  125. data/lib/aspose_pdf_cloud/models/font_encoding_rules.rb +1 -1
  126. data/lib/aspose_pdf_cloud/models/font_saving_modes.rb +1 -1
  127. data/lib/aspose_pdf_cloud/models/font_styles.rb +1 -1
  128. data/lib/aspose_pdf_cloud/models/form_field.rb +15 -10
  129. data/lib/aspose_pdf_cloud/models/free_text_annotation.rb +1 -1
  130. data/lib/aspose_pdf_cloud/models/free_text_annotation_response.rb +1 -1
  131. data/lib/aspose_pdf_cloud/models/free_text_annotations.rb +1 -1
  132. data/lib/aspose_pdf_cloud/models/free_text_annotations_response.rb +1 -1
  133. data/lib/aspose_pdf_cloud/models/free_text_intent.rb +1 -1
  134. data/lib/aspose_pdf_cloud/models/graph_info.rb +1 -1
  135. data/lib/aspose_pdf_cloud/models/highlight_annotation.rb +1 -1
  136. data/lib/aspose_pdf_cloud/models/highlight_annotation_response.rb +1 -1
  137. data/lib/aspose_pdf_cloud/models/highlight_annotations.rb +1 -1
  138. data/lib/aspose_pdf_cloud/models/highlight_annotations_response.rb +1 -1
  139. data/lib/aspose_pdf_cloud/models/horizontal_alignment.rb +1 -1
  140. data/lib/aspose_pdf_cloud/models/html_document_type.rb +1 -1
  141. data/lib/aspose_pdf_cloud/models/html_markup_generation_modes.rb +1 -1
  142. data/lib/aspose_pdf_cloud/models/image.rb +1 -1
  143. data/lib/aspose_pdf_cloud/models/image_footer.rb +1 -1
  144. data/lib/aspose_pdf_cloud/models/image_fragment.rb +283 -0
  145. data/lib/aspose_pdf_cloud/models/image_header.rb +1 -1
  146. data/lib/aspose_pdf_cloud/models/image_response.rb +1 -1
  147. data/lib/aspose_pdf_cloud/models/image_src_type.rb +1 -1
  148. data/lib/aspose_pdf_cloud/models/image_stamp.rb +1 -1
  149. data/lib/aspose_pdf_cloud/models/image_template.rb +1 -1
  150. data/lib/aspose_pdf_cloud/models/image_templates_request.rb +1 -1
  151. data/lib/aspose_pdf_cloud/models/images.rb +1 -1
  152. data/lib/aspose_pdf_cloud/models/images_response.rb +1 -1
  153. data/lib/aspose_pdf_cloud/models/ink_annotation.rb +1 -1
  154. data/lib/aspose_pdf_cloud/models/ink_annotation_response.rb +1 -1
  155. data/lib/aspose_pdf_cloud/models/ink_annotations.rb +1 -1
  156. data/lib/aspose_pdf_cloud/models/ink_annotations_response.rb +1 -1
  157. data/lib/aspose_pdf_cloud/models/justification.rb +1 -1
  158. data/lib/aspose_pdf_cloud/models/letters_positioning_methods.rb +1 -1
  159. data/lib/aspose_pdf_cloud/models/line_annotation.rb +1 -1
  160. data/lib/aspose_pdf_cloud/models/line_annotation_response.rb +1 -1
  161. data/lib/aspose_pdf_cloud/models/line_annotations.rb +1 -1
  162. data/lib/aspose_pdf_cloud/models/line_annotations_response.rb +1 -1
  163. data/lib/aspose_pdf_cloud/models/line_ending.rb +1 -1
  164. data/lib/aspose_pdf_cloud/models/line_intent.rb +1 -1
  165. data/lib/aspose_pdf_cloud/models/line_spacing.rb +1 -1
  166. data/lib/aspose_pdf_cloud/models/link.rb +1 -1
  167. data/lib/aspose_pdf_cloud/models/link_action_type.rb +1 -1
  168. data/lib/aspose_pdf_cloud/models/link_annotation.rb +1 -1
  169. data/lib/aspose_pdf_cloud/models/link_annotation_response.rb +1 -1
  170. data/lib/aspose_pdf_cloud/models/link_annotations.rb +1 -1
  171. data/lib/aspose_pdf_cloud/models/link_annotations_response.rb +1 -1
  172. data/lib/aspose_pdf_cloud/models/link_element.rb +1 -1
  173. data/lib/aspose_pdf_cloud/models/link_highlighting_mode.rb +1 -1
  174. data/lib/aspose_pdf_cloud/models/list_box_field.rb +452 -0
  175. data/lib/aspose_pdf_cloud/models/list_box_field_response.rb +224 -0
  176. data/lib/aspose_pdf_cloud/models/list_box_fields.rb +213 -0
  177. data/lib/aspose_pdf_cloud/models/list_box_fields_response.rb +224 -0
  178. data/lib/aspose_pdf_cloud/models/margin_info.rb +1 -1
  179. data/lib/aspose_pdf_cloud/models/markup_annotation.rb +1 -1
  180. data/lib/aspose_pdf_cloud/models/merge_documents.rb +1 -1
  181. data/lib/aspose_pdf_cloud/models/movie_annotation.rb +1 -1
  182. data/lib/aspose_pdf_cloud/models/movie_annotation_response.rb +1 -1
  183. data/lib/aspose_pdf_cloud/models/movie_annotations.rb +1 -1
  184. data/lib/aspose_pdf_cloud/models/movie_annotations_response.rb +1 -1
  185. data/lib/aspose_pdf_cloud/models/object_exist.rb +1 -1
  186. data/lib/aspose_pdf_cloud/models/optimize_options.rb +1 -1
  187. data/lib/aspose_pdf_cloud/models/option.rb +1 -1
  188. data/lib/aspose_pdf_cloud/models/page.rb +1 -1
  189. data/lib/aspose_pdf_cloud/models/page_layout.rb +49 -0
  190. data/lib/aspose_pdf_cloud/models/page_mode.rb +48 -0
  191. data/lib/aspose_pdf_cloud/models/page_number_stamp.rb +1 -1
  192. data/lib/aspose_pdf_cloud/models/page_word_count.rb +1 -1
  193. data/lib/aspose_pdf_cloud/models/pages.rb +1 -1
  194. data/lib/aspose_pdf_cloud/models/paragraph.rb +1 -1
  195. data/lib/aspose_pdf_cloud/models/parts_embedding_modes.rb +1 -1
  196. data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -1
  197. data/lib/aspose_pdf_cloud/models/pdf_page_stamp.rb +1 -1
  198. data/lib/aspose_pdf_cloud/models/permissions_flags.rb +1 -1
  199. data/lib/aspose_pdf_cloud/models/point.rb +1 -1
  200. data/lib/aspose_pdf_cloud/models/poly_annotation.rb +1 -1
  201. data/lib/aspose_pdf_cloud/models/poly_intent.rb +1 -1
  202. data/lib/aspose_pdf_cloud/models/poly_line_annotation.rb +1 -1
  203. data/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb +1 -1
  204. data/lib/aspose_pdf_cloud/models/poly_line_annotations.rb +1 -1
  205. data/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb +1 -1
  206. data/lib/aspose_pdf_cloud/models/polygon_annotation.rb +1 -1
  207. data/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb +1 -1
  208. data/lib/aspose_pdf_cloud/models/polygon_annotations.rb +1 -1
  209. data/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb +1 -1
  210. data/lib/aspose_pdf_cloud/models/popup_annotation.rb +1 -1
  211. data/lib/aspose_pdf_cloud/models/popup_annotation_response.rb +1 -1
  212. data/lib/aspose_pdf_cloud/models/popup_annotation_with_parent.rb +1 -1
  213. data/lib/aspose_pdf_cloud/models/popup_annotations.rb +1 -1
  214. data/lib/aspose_pdf_cloud/models/popup_annotations_response.rb +1 -1
  215. data/lib/aspose_pdf_cloud/models/position.rb +1 -1
  216. data/lib/aspose_pdf_cloud/models/radio_button_field.rb +25 -25
  217. data/lib/aspose_pdf_cloud/models/radio_button_field_response.rb +1 -1
  218. data/lib/aspose_pdf_cloud/models/radio_button_fields.rb +1 -1
  219. data/lib/aspose_pdf_cloud/models/radio_button_fields_response.rb +1 -1
  220. data/lib/aspose_pdf_cloud/models/radio_button_option_field.rb +12 -7
  221. data/lib/aspose_pdf_cloud/models/raster_images_saving_modes.rb +1 -1
  222. data/lib/aspose_pdf_cloud/models/rectangle.rb +1 -1
  223. data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +1 -1
  224. data/lib/aspose_pdf_cloud/models/redaction_annotation_response.rb +1 -1
  225. data/lib/aspose_pdf_cloud/models/redaction_annotations.rb +1 -1
  226. data/lib/aspose_pdf_cloud/models/redaction_annotations_response.rb +1 -1
  227. data/lib/aspose_pdf_cloud/models/rotation.rb +1 -1
  228. data/lib/aspose_pdf_cloud/models/row.rb +1 -1
  229. data/lib/aspose_pdf_cloud/models/row_recognized.rb +1 -1
  230. data/lib/aspose_pdf_cloud/models/screen_annotation.rb +1 -1
  231. data/lib/aspose_pdf_cloud/models/screen_annotation_response.rb +1 -1
  232. data/lib/aspose_pdf_cloud/models/screen_annotations.rb +1 -1
  233. data/lib/aspose_pdf_cloud/models/screen_annotations_response.rb +1 -1
  234. data/lib/aspose_pdf_cloud/models/segment.rb +1 -1
  235. data/lib/aspose_pdf_cloud/models/shape_type.rb +1 -1
  236. data/lib/aspose_pdf_cloud/models/signature.rb +1 -1
  237. data/lib/aspose_pdf_cloud/models/signature_custom_appearance.rb +1 -1
  238. data/lib/aspose_pdf_cloud/models/signature_field.rb +12 -7
  239. data/lib/aspose_pdf_cloud/models/signature_field_response.rb +1 -1
  240. data/lib/aspose_pdf_cloud/models/signature_fields.rb +1 -1
  241. data/lib/aspose_pdf_cloud/models/signature_fields_response.rb +1 -1
  242. data/lib/aspose_pdf_cloud/models/signature_type.rb +1 -1
  243. data/lib/aspose_pdf_cloud/models/signature_verify_response.rb +1 -1
  244. data/lib/aspose_pdf_cloud/models/sound_annotation.rb +1 -1
  245. data/lib/aspose_pdf_cloud/models/sound_annotation_response.rb +1 -1
  246. data/lib/aspose_pdf_cloud/models/sound_annotations.rb +1 -1
  247. data/lib/aspose_pdf_cloud/models/sound_annotations_response.rb +1 -1
  248. data/lib/aspose_pdf_cloud/models/sound_encoding.rb +1 -1
  249. data/lib/aspose_pdf_cloud/models/sound_icon.rb +1 -1
  250. data/lib/aspose_pdf_cloud/models/split_result.rb +1 -1
  251. data/lib/aspose_pdf_cloud/models/split_result_document.rb +1 -1
  252. data/lib/aspose_pdf_cloud/models/split_result_response.rb +1 -1
  253. data/lib/aspose_pdf_cloud/models/square_annotation.rb +1 -1
  254. data/lib/aspose_pdf_cloud/models/square_annotation_response.rb +1 -1
  255. data/lib/aspose_pdf_cloud/models/square_annotations.rb +1 -1
  256. data/lib/aspose_pdf_cloud/models/square_annotations_response.rb +1 -1
  257. data/lib/aspose_pdf_cloud/models/squiggly_annotation.rb +1 -1
  258. data/lib/aspose_pdf_cloud/models/squiggly_annotation_response.rb +1 -1
  259. data/lib/aspose_pdf_cloud/models/squiggly_annotations.rb +1 -1
  260. data/lib/aspose_pdf_cloud/models/squiggly_annotations_response.rb +1 -1
  261. data/lib/aspose_pdf_cloud/models/stamp.rb +1 -1
  262. data/lib/aspose_pdf_cloud/models/stamp_annotation.rb +1 -1
  263. data/lib/aspose_pdf_cloud/models/stamp_annotation_response.rb +1 -1
  264. data/lib/aspose_pdf_cloud/models/stamp_annotations.rb +1 -1
  265. data/lib/aspose_pdf_cloud/models/stamp_annotations_response.rb +1 -1
  266. data/lib/aspose_pdf_cloud/models/stamp_base.rb +1 -1
  267. data/lib/aspose_pdf_cloud/models/stamp_icon.rb +1 -1
  268. data/lib/aspose_pdf_cloud/models/stamp_info.rb +1 -1
  269. data/lib/aspose_pdf_cloud/models/stamp_type.rb +1 -1
  270. data/lib/aspose_pdf_cloud/models/stamps_info.rb +1 -1
  271. data/lib/aspose_pdf_cloud/models/stamps_info_response.rb +1 -1
  272. data/lib/aspose_pdf_cloud/models/storage_exist.rb +1 -1
  273. data/lib/aspose_pdf_cloud/models/storage_file.rb +1 -1
  274. data/lib/aspose_pdf_cloud/models/strike_out_annotation.rb +1 -1
  275. data/lib/aspose_pdf_cloud/models/strike_out_annotation_response.rb +1 -1
  276. data/lib/aspose_pdf_cloud/models/strike_out_annotations.rb +1 -1
  277. data/lib/aspose_pdf_cloud/models/strike_out_annotations_response.rb +1 -1
  278. data/lib/aspose_pdf_cloud/models/table.rb +12 -2
  279. data/lib/aspose_pdf_cloud/models/table_broken.rb +1 -1
  280. data/lib/aspose_pdf_cloud/models/table_recognized.rb +1 -1
  281. data/lib/aspose_pdf_cloud/models/table_recognized_response.rb +1 -1
  282. data/lib/aspose_pdf_cloud/models/tables_recognized.rb +1 -1
  283. data/lib/aspose_pdf_cloud/models/tables_recognized_response.rb +1 -1
  284. data/lib/aspose_pdf_cloud/models/text_annotation.rb +1 -1
  285. data/lib/aspose_pdf_cloud/models/text_annotation_response.rb +1 -1
  286. data/lib/aspose_pdf_cloud/models/text_annotations.rb +1 -1
  287. data/lib/aspose_pdf_cloud/models/text_annotations_response.rb +1 -1
  288. data/lib/aspose_pdf_cloud/models/text_box_field.rb +12 -7
  289. data/lib/aspose_pdf_cloud/models/text_box_field_response.rb +1 -1
  290. data/lib/aspose_pdf_cloud/models/text_box_fields.rb +1 -1
  291. data/lib/aspose_pdf_cloud/models/text_box_fields_response.rb +1 -1
  292. data/lib/aspose_pdf_cloud/models/text_footer.rb +1 -1
  293. data/lib/aspose_pdf_cloud/models/text_header.rb +1 -1
  294. data/lib/aspose_pdf_cloud/models/text_horizontal_alignment.rb +1 -1
  295. data/lib/aspose_pdf_cloud/models/text_icon.rb +1 -1
  296. data/lib/aspose_pdf_cloud/models/text_line.rb +1 -1
  297. data/lib/aspose_pdf_cloud/models/text_rect.rb +1 -1
  298. data/lib/aspose_pdf_cloud/models/text_rects.rb +1 -1
  299. data/lib/aspose_pdf_cloud/models/text_rects_response.rb +1 -1
  300. data/lib/aspose_pdf_cloud/models/text_replace.rb +1 -1
  301. data/lib/aspose_pdf_cloud/models/text_replace_list_request.rb +1 -1
  302. data/lib/aspose_pdf_cloud/models/text_replace_response.rb +1 -1
  303. data/lib/aspose_pdf_cloud/models/text_stamp.rb +1 -1
  304. data/lib/aspose_pdf_cloud/models/text_state.rb +1 -1
  305. data/lib/aspose_pdf_cloud/models/text_style.rb +1 -1
  306. data/lib/aspose_pdf_cloud/models/timestamp_settings.rb +1 -1
  307. data/lib/aspose_pdf_cloud/models/underline_annotation.rb +1 -1
  308. data/lib/aspose_pdf_cloud/models/underline_annotation_response.rb +1 -1
  309. data/lib/aspose_pdf_cloud/models/underline_annotations.rb +1 -1
  310. data/lib/aspose_pdf_cloud/models/underline_annotations_response.rb +1 -1
  311. data/lib/aspose_pdf_cloud/models/vertical_alignment.rb +1 -1
  312. data/lib/aspose_pdf_cloud/models/word_count.rb +1 -1
  313. data/lib/aspose_pdf_cloud/models/word_count_response.rb +1 -1
  314. data/lib/aspose_pdf_cloud/models/wrap_mode.rb +1 -1
  315. data/lib/aspose_pdf_cloud/version.rb +2 -2
  316. data/test/pdf_tests.rb +411 -98
  317. data/test_data/4pagesPdfA.pdf +0 -0
  318. metadata +35 -2
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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 = "19.11.0"
23
+ VERSION = "20.5.0"
24
24
  end
@@ -1,6 +1,6 @@
1
1
  =begin
2
2
  --------------------------------------------------------------------------------------------------------------------
3
- Copyright (c) 2019 Aspose.PDF Cloud
3
+ Copyright (c) 2020 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
@@ -33,7 +33,6 @@ class PdfTests < Minitest::Test
33
33
  def setup
34
34
  # Get App key and App SID from https://aspose.cloud
35
35
  @pdf_api = PdfApi.new('app_key', 'app_sid')
36
-
37
36
  @temp_folder = 'TempPdfCloud'
38
37
  @test_data_folder = '../test_data/'
39
38
 
@@ -389,82 +388,121 @@ class PdfTests < Minitest::Test
389
388
  end
390
389
 
391
390
  def __draw_table
392
-
393
- text_state = TextState.new
394
- text_state.font = 'Arial'
395
- text_state.font_size = 10
396
- text_state.foreground_color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
397
- text_state.background_color = Color.new({:A => 0xFF, :R => 0xFF, :G => 0, :B => 0})
398
- text_state.font_style = FontStyles::BOLD
399
-
400
- num_of_cols = 5
401
- num_of_rows = 5
402
-
403
- table = Table.new
404
- table.rows = Array.new(num_of_rows)
405
-
406
- col_widths = '';
407
- (1..num_of_cols).each do
408
- col_widths += ' 30'
409
- end
410
-
411
- table.column_widths = col_widths
412
-
413
- table.default_cell_text_state = text_state
414
-
415
- border_table_border = GraphInfo.new
416
-
417
- border_table_border.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0xFF})
418
- border_table_border.line_width = 1
419
-
420
- border_info = BorderInfo.new
421
- border_info.top = border_table_border
422
- border_info.right = border_table_border
423
- border_info.bottom = border_table_border
424
- border_info.left = border_table_border
425
-
426
- table.default_cell_border = border_info
427
- table.top = 100
428
-
429
-
430
-
431
- (0..(num_of_rows - 1)).each do |r|
432
- row = Row.new
433
- row.cells = Array.new(num_of_cols)
434
-
435
- (0..(num_of_rows - 1)).each do |c|
436
- cell = Cell.new
437
- cell.background_color = Color.new({:A => 0xFF, :R => 0xFF, :G => 0, :B => 0xFF})
438
- cell.default_cell_text_state = text_state
439
- cell.paragraphs = Array.new(1)
440
- cell.paragraphs[0] = TextRect.new({:Text => 'value'})
441
-
442
- # change properties on cell
443
-
444
- if c == 1
445
- cell.default_cell_text_state.foreground_color = Color.new({:A => 0xFF, :R => 0xFF, :G => 0, :B => 0xFF})
446
-
447
- # change properties on cell AFTER first clearing and re-adding paragraphs
448
- elsif c == 2
449
- cell.paragraphs[0] = TextRect.new({:Text => 'y'})
450
- cell.default_cell_text_state.foreground_color = Color.new({:A => 0xFF, :R => 0, :G => 0, :B => 0xFF})
451
-
452
- #change properties on paragraph
453
- elsif c == 3
454
- cell.paragraphs[0].text_state = text_state
455
- cell.paragraphs[0].text_state.foreground_color = Color.new({:A => 0xFF, :R => 0, :G => 0, :B => 0xFF})
456
-
457
- # change properties on paragraph AFTER first clearing and re-adding paragraphs
458
- elsif c == 4
459
- cell.paragraphs[0] = TextRect.new({:Text => 'y'})
460
- cell.paragraphs[0].text_state = text_state
461
- cell.paragraphs[0].text_state.foreground_color = Color.new({:A => 0xFF, :R => 0, :G => 0, :B => 0xFF})
462
- end
463
-
464
- row.cells[c] = cell
465
- end
466
- table.rows[r] = row
467
- end
391
+ colorBlack = Color.new({:A => 0xFF, :R => 0, :G => 0, :B => 0})
392
+ borderGraphInfo = GraphInfo.new({:Color => colorBlack, :LineWidth => 1})
393
+ image = 'Penguins.jpg'
394
+ table = Table.new({
395
+ :Top => 100,
396
+ :ColumnWidths => '150 300',
397
+ :IsBordersIncluded => true,
398
+ :DefaultCellTextState => TextState.new({:FontSize => 11, :ForegroundColor => Color.new({:A => 255, :R => 0, :G => 255, :B => 0})}),
399
+ :Margin => MarginInfo.new({
400
+ :Bottom => 10,
401
+ :Left => 10,
402
+ :Right => 10,
403
+ :Top => 10
404
+ }),
405
+ :Border => BorderInfo.new({
406
+ :Top => borderGraphInfo,
407
+ :Left => borderGraphInfo
408
+ }),
409
+ :DefaultCellBorder => BorderInfo.new({
410
+ :Right => borderGraphInfo,
411
+ }),
412
+ :DefaultCellPadding => MarginInfo.new({
413
+ :Top => 5,
414
+ :Left => 5,
415
+ :Right => 5,
416
+ :Bottom => 5,
417
+ }),
418
+ :Rows => [
419
+ Row.new({
420
+ :MinRowHeight => 100,
421
+ :Border => BorderInfo.new({
422
+ :Bottom => borderGraphInfo,
423
+ }),
424
+ :Cells => [
425
+ Cell.new({
426
+ :Paragraphs => [
427
+ TextRect.new({
428
+ :Text => 'BackgroundImageStorageFile field, from storage file',
429
+ :HorizontalAlignment => HorizontalAlignment::CENTER,
430
+ :TextState => TextState.new({:FontSize => 10, :ForegroundColor => Color.new({:A => 0xff, :R => 0x3d, :G => 0x8e, :B =>0xc4})}),
431
+ })
432
+ ]
433
+ }),
434
+ Cell.new({
435
+ :BackgroundColor => colorBlack,
436
+ :BackgroundImageStorageFile => "#{@temp_folder}/#{image}"
437
+ })
438
+ ]
439
+ }),
440
+ Row.new({
441
+ :MinRowHeight => 100,
442
+ :Border => BorderInfo.new({:Bottom => borderGraphInfo}),
443
+ :Cells => [
444
+ Cell.new({
445
+ :Paragraphs => [
446
+ TextRect.new({
447
+ :Text => 'HtmlFragment',
448
+ :HorizontalAlignment => HorizontalAlignment::CENTER,
449
+ :TextState => TextState.new({
450
+ :FontSize => 10,
451
+ :ForegroundColor => Color.new({:A => 255, :R => 0x3d, :G => 0x8e, :B => 0xc4}),
452
+ })
453
+ })
454
+ ]
455
+ }),
456
+ Cell.new({:HtmlFragment => '<ul><li>First</li><li>Second</li></ul>'}),
457
+ ]
458
+ }),
459
+ Row.new({
460
+ :FixedRowHeight => 100,
461
+ :Border => BorderInfo.new({:Bottom => borderGraphInfo}),
462
+ :Cells => [
463
+ Cell.new({
464
+ :Paragraphs => [
465
+ TextRect.new({:Text => 'FixedRowHeight = 100'}),
466
+ TextRect.new({
467
+ :Text => 'Images field, from storage file, without Margin and Size',
468
+ :HorizontalAlignment => HorizontalAlignment::CENTER,
469
+ :TextState => TextState.new({:FontSize => 10, :ForegroundColor => Color.new({:A => 255, :R => 0x3d, :G => 0x8e, :B => 0xc4})}),
470
+ })
471
+ ]
472
+ }),
473
+ Cell.new({
474
+ :BackgroundColor => colorBlack,
475
+ :Images => [ImageFragment.new({ImageFile: "#{@temp_folder}/#{image}"})]
476
+ })
477
+ ]
478
+ }),
479
+ Row.new({
480
+ :FixedRowHeight => 100,
481
+ :Border => BorderInfo.new({:Bottom => borderGraphInfo}),
482
+ :Cells => [
483
+ Cell.new({
484
+ :Paragraphs => [
485
+ TextRect.new({:Text => 'FixedRowHeight = 100'}),
486
+ TextRect.new({
487
+ :Text => 'Images field, from storage file, with no Margin and Size = 150x50',
488
+ :HorizontalAlignment => HorizontalAlignment::CENTER,
489
+ :TextState => TextState.new({:FontSize => 10, :ForegroundColor => Color.new({:A => 255, :R => 0x3d, :G => 0x8e, :B => 0xc4})})
490
+ })
491
+ ]
492
+ }),
493
+ Cell.new({
494
+ :BackgroundColor => colorBlack,
495
+ :Images => [
496
+ ImageFragment.new({
497
+ :ImageFile => "#{@temp_folder}/#{image}",
498
+ :ImageScale => 0.1
499
+ })
500
+ ]
501
+ })
502
+ ]
503
+ })
504
+ ]
505
+ })
468
506
  table
469
507
  end
470
508
 
@@ -3106,7 +3144,7 @@ class PdfTests < Minitest::Test
3106
3144
  assert(response, 'Filed to convert PDF to PPTX.')
3107
3145
  end
3108
3146
 
3109
- def test_get_pdf_in_storage_to_la_te_x
3147
+ def test_get_pdf_in_storage_to_te_x
3110
3148
  file_name = '4pages.pdf'
3111
3149
  upload_file(file_name)
3112
3150
 
@@ -3114,33 +3152,33 @@ class PdfTests < Minitest::Test
3114
3152
  :folder => @temp_folder
3115
3153
  }
3116
3154
 
3117
- response = @pdf_api.get_pdf_in_storage_to_la_te_x(file_name, opts)
3118
- assert(response, 'Filed to convert PDF to LaTex.')
3155
+ response = @pdf_api.get_pdf_in_storage_to_te_x(file_name, opts)
3156
+ assert(response, 'Filed to convert PDF to Tex.')
3119
3157
  end
3120
3158
 
3121
- def test_put_pdf_in_storage_to_la_te_x
3159
+ def test_put_pdf_in_storage_to_te_x
3122
3160
  file_name = '4pages.pdf'
3123
3161
  upload_file(file_name)
3124
- res_file = 'result.latex'
3162
+ res_file = 'result.tex'
3125
3163
 
3126
3164
  opts = {
3127
3165
  :folder => @temp_folder
3128
3166
  }
3129
- response = @pdf_api.put_pdf_in_storage_to_la_te_x(file_name, @temp_folder + '/' + res_file, opts)
3130
- assert(response, 'Filed to convert PDF to LaTeX.')
3167
+ response = @pdf_api.put_pdf_in_storage_to_te_x(file_name, @temp_folder + '/' + res_file, opts)
3168
+ assert(response, 'Filed to convert PDF to TeX.')
3131
3169
  end
3132
3170
 
3133
3171
 
3134
- def test_put_pdf_in_request_to_la_te_x
3172
+ def test_put_pdf_in_request_to_te_x
3135
3173
  file_name = '4pages.pdf'
3136
3174
 
3137
- res_file = 'result.latex'
3175
+ res_file = 'result.tex'
3138
3176
 
3139
3177
  opts = {
3140
3178
  :file => ::File.open(@test_data_folder + file_name, 'r') { |io| io.read(io.size) }
3141
3179
  }
3142
- response = @pdf_api.put_pdf_in_request_to_la_te_x(@temp_folder + '/' + res_file, opts)
3143
- assert(response, 'Filed to convert PDF to LaTeX.')
3180
+ response = @pdf_api.put_pdf_in_request_to_te_x(@temp_folder + '/' + res_file, opts)
3181
+ assert(response, 'Filed to convert PDF to TeX.')
3144
3182
  end
3145
3183
 
3146
3184
  def test_get_pdf_in_storage_to_mobi_xml
@@ -3334,16 +3372,16 @@ class PdfTests < Minitest::Test
3334
3372
  end
3335
3373
 
3336
3374
 
3337
- def test_get_la_te_x_in_storage_to_pdf
3375
+ def test_get_te_x_in_storage_to_pdf
3338
3376
  file_name = 'sample.tex'
3339
3377
  upload_file(file_name)
3340
3378
 
3341
3379
  src_path = @temp_folder + '/' + file_name
3342
- response = @pdf_api.get_la_te_x_in_storage_to_pdf(src_path)
3343
- assert(response, 'Failed to convert LaTeX to pdf.')
3380
+ response = @pdf_api.get_te_x_in_storage_to_pdf(src_path)
3381
+ assert(response, 'Failed to convert TeX to pdf.')
3344
3382
  end
3345
3383
 
3346
- def test_put_la_te_x_in_storage_to_pdf
3384
+ def test_put_te_x_in_storage_to_pdf
3347
3385
  file_name = 'sample.tex'
3348
3386
  upload_file(file_name)
3349
3387
  result_name = 'fromTex.pdf'
@@ -3352,8 +3390,8 @@ class PdfTests < Minitest::Test
3352
3390
  opts = {
3353
3391
  :dst_folder => @temp_folder
3354
3392
  }
3355
- response = @pdf_api.put_la_te_x_in_storage_to_pdf(result_name, src_path, opts)
3356
- assert(response, 'Failed to convert LaTeX to pdf.')
3393
+ response = @pdf_api.put_te_x_in_storage_to_pdf(result_name, src_path, opts)
3394
+ assert(response, 'Failed to convert TeX to pdf.')
3357
3395
  end
3358
3396
 
3359
3397
  def test_get_mht_in_storage_to_pdf
@@ -3599,6 +3637,28 @@ class PdfTests < Minitest::Test
3599
3637
  assert(response, 'Failed to convert markdown to pdf.')
3600
3638
  end
3601
3639
 
3640
+ def test_get_pdf_a_in_storage_to_pdf
3641
+ file_name = '4pagesPdfA.pdf'
3642
+ upload_file(file_name)
3643
+
3644
+ src_path = @temp_folder + '/' + file_name
3645
+ response = @pdf_api.get_pdf_a_in_storage_to_pdf(src_path)
3646
+ assert(response, 'Failed to convert pdfa to pdf.')
3647
+ end
3648
+
3649
+ def test_put_pdf_a_in_storage_to_pdf
3650
+ file_name = '4pagesPdfA.pdf'
3651
+ upload_file(file_name)
3652
+ result_name = 'fromPdfA.pdf'
3653
+
3654
+ src_path = @temp_folder + '/' + file_name
3655
+ opts = {
3656
+ :dst_folder => @temp_folder
3657
+ }
3658
+ response = @pdf_api.put_pdf_a_in_storage_to_pdf(result_name, src_path, opts)
3659
+ assert(response, 'Failed to convert pdfa to pdf.')
3660
+ end
3661
+
3602
3662
  # Document Tests
3603
3663
 
3604
3664
  def test_get_document
@@ -3658,6 +3718,71 @@ class PdfTests < Minitest::Test
3658
3718
  assert(response, 'Failed to create new document')
3659
3719
  end
3660
3720
 
3721
+ def test_post_create_document
3722
+ file_name = 'empty_post.pdf'
3723
+
3724
+ opts = {
3725
+ :folder => @temp_folder
3726
+ }
3727
+
3728
+ prop = DocumentProperty.new
3729
+ prop.name = 'prop1'
3730
+ prop.value = 'val1'
3731
+
3732
+ props = DocumentProperties.new
3733
+ props.list = [prop]
3734
+
3735
+ display_props = DisplayProperties.new
3736
+ display_props.center_window = true
3737
+ display_props.hide_menu_bar = true
3738
+
3739
+ page_config = DefaultPageConfig.new
3740
+ page_config.height = 100
3741
+ page_config.width = 100
3742
+
3743
+ config = DocumentConfig.new
3744
+ config.document_properties = props
3745
+ config.display_properties = display_props
3746
+ config.default_page_config = page_config
3747
+
3748
+ response = @pdf_api.post_create_document(file_name, config, opts)
3749
+ assert(response, 'Failed to create new document')
3750
+ end
3751
+
3752
+ def test_get_document_display_properties
3753
+ file_name = '4pages.pdf'
3754
+ upload_file(file_name)
3755
+
3756
+ opts = {
3757
+ :folder => @temp_folder
3758
+ }
3759
+
3760
+ response = @pdf_api.get_document_display_properties(file_name, opts)
3761
+ assert(response, 'Failed to read document display properties.')
3762
+ end
3763
+
3764
+ def test_put_document_display_properties
3765
+ file_name = '4pages.pdf'
3766
+ upload_file(file_name)
3767
+
3768
+ opts = {
3769
+ :folder => @temp_folder
3770
+ }
3771
+
3772
+ properties = DisplayProperties.new
3773
+ properties.center_window = true
3774
+ properties.direction = Direction::L2_R
3775
+ properties.display_doc_title = true
3776
+ properties.hide_menu_bar = true
3777
+ properties.hide_tool_bar = true
3778
+ properties.hide_window_ui = true
3779
+ properties.non_full_screen_page_mode = PageMode::USE_NONE
3780
+ properties.page_layout = PageLayout::TWO_PAGE_LEFT
3781
+ properties.page_mode = PageMode::USE_OC
3782
+
3783
+ response = @pdf_api.put_document_display_properties(file_name, properties, opts)
3784
+ assert(response, 'Failed to update document display properties.')
3785
+ end
3661
3786
 
3662
3787
  # Fields Tests
3663
3788
 
@@ -3797,7 +3922,7 @@ class PdfTests < Minitest::Test
3797
3922
  assert(response, 'Failed flatten document.')
3798
3923
  end
3799
3924
 
3800
- def test_get_document_gignature_fields
3925
+ def test_get_document_sigignature_fields
3801
3926
  file_name = 'adbe.x509.rsa_sha1.valid.pdf'
3802
3927
  upload_file(file_name)
3803
3928
 
@@ -3809,7 +3934,7 @@ class PdfTests < Minitest::Test
3809
3934
  assert(response, 'Failed to read document signature fields.')
3810
3935
  end
3811
3936
 
3812
- def test_get_page_gignature_fields
3937
+ def test_get_page_sigignature_fields
3813
3938
  file_name = 'adbe.x509.rsa_sha1.valid.pdf'
3814
3939
  upload_file(file_name)
3815
3940
 
@@ -3822,7 +3947,75 @@ class PdfTests < Minitest::Test
3822
3947
  assert(response, 'Failed to read page signature fields.')
3823
3948
  end
3824
3949
 
3825
- def test_get_gignature_field
3950
+ def test_post_sigignature_field
3951
+ file_name = '4pages.pdf'
3952
+ upload_file(file_name)
3953
+
3954
+ signature_name = '33226.p12'
3955
+ upload_file(signature_name)
3956
+
3957
+ signature = Signature.new
3958
+ signature.authority = 'Sergey Smal'
3959
+ signature.contact = 'test@mail.ru'
3960
+ signature.date = '08/01/2012 12:15:00.000 PM'
3961
+ signature.form_field_name = 'Signature1'
3962
+ signature.location = 'Ukraine'
3963
+ signature.password = 'sIikZSmz'
3964
+ signature.rectangle = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
3965
+ signature.signature_path = @temp_folder + '/' + signature_name
3966
+ signature.signature_type = SignatureType::PKCS7
3967
+ signature.visible = true
3968
+ signature.show_properties = false
3969
+
3970
+ field = SignatureField.new
3971
+ field.partial_name = 'sign1'
3972
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
3973
+ field.signature = signature
3974
+ field.page_index = 1
3975
+
3976
+ opts = {
3977
+ :folder => @temp_folder
3978
+ }
3979
+
3980
+ response = @pdf_api.post_signature_field(file_name, field, opts)
3981
+ assert(response, 'Failed to create signature field.')
3982
+ end
3983
+
3984
+ def test_put_sigignature_field
3985
+ file_name = 'adbe.x509.rsa_sha1.valid.pdf'
3986
+ upload_file(file_name)
3987
+
3988
+ signature_name = '33226.p12'
3989
+ upload_file(signature_name)
3990
+
3991
+ signature = Signature.new
3992
+ signature.authority = 'Sergey Smal'
3993
+ signature.contact = 'test@mail.ru'
3994
+ signature.date = '08/01/2012 12:15:00.000 PM'
3995
+ signature.form_field_name = 'Signature1'
3996
+ signature.location = 'Ukraine'
3997
+ signature.password = 'sIikZSmz'
3998
+ signature.rectangle = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
3999
+ signature.signature_path = @temp_folder + '/' + signature_name
4000
+ signature.signature_type = SignatureType::PKCS7
4001
+ signature.visible = true
4002
+ signature.show_properties = false
4003
+
4004
+ field = SignatureField.new
4005
+ field.partial_name = 'sign1'
4006
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 500, :URY => 200})
4007
+ field.signature = signature
4008
+ field.page_index = 1
4009
+
4010
+ opts = {
4011
+ :folder => @temp_folder
4012
+ }
4013
+
4014
+ response = @pdf_api.put_signature_field(file_name, 'Signature1', field, opts)
4015
+ assert(response, 'Failed to update signature field.')
4016
+ end
4017
+
4018
+ def test_get_sigignature_field
3826
4019
  file_name = 'adbe.x509.rsa_sha1.valid.pdf'
3827
4020
  upload_file(file_name)
3828
4021
 
@@ -3835,6 +4028,9 @@ class PdfTests < Minitest::Test
3835
4028
  assert(response, 'Failed to read signature field.')
3836
4029
  end
3837
4030
 
4031
+
4032
+
4033
+
3838
4034
  def test_get_document_text_box_fields
3839
4035
  file_name = 'FormDataTextBox.pdf'
3840
4036
  upload_file(file_name)
@@ -4221,6 +4417,123 @@ class PdfTests < Minitest::Test
4221
4417
  assert(response, 'Failed to update combo box field.')
4222
4418
  end
4223
4419
 
4420
+ def test_get_document_list_box_fields
4421
+ file_name = 'PdfWithAcroForm.pdf'
4422
+ upload_file(file_name)
4423
+
4424
+ opts = {
4425
+ :folder => @temp_folder
4426
+ }
4427
+
4428
+ response = @pdf_api.get_document_list_box_fields(file_name, opts)
4429
+ assert(response, 'Failed to read document listbox fields.')
4430
+ end
4431
+
4432
+ def test_get_page_list_box_fields
4433
+ file_name = 'PdfWithAcroForm.pdf'
4434
+ upload_file(file_name)
4435
+
4436
+ page_number = 1
4437
+ opts = {
4438
+ :folder => @temp_folder
4439
+ }
4440
+
4441
+ response = @pdf_api.get_page_list_box_fields(file_name, page_number, opts)
4442
+ assert(response, 'Failed to read page list box fields.')
4443
+ end
4444
+
4445
+ def test_get_list_box_field
4446
+ file_name = 'PdfWithAcroForm.pdf'
4447
+ upload_file(file_name)
4448
+
4449
+ field_name = 'listboxField'
4450
+ opts = {
4451
+ :folder => @temp_folder
4452
+ }
4453
+
4454
+ response = @pdf_api.get_list_box_field(file_name, field_name, opts)
4455
+ assert(response, 'Failed to read list box field.')
4456
+ end
4457
+
4458
+ def test_post_list_box_fields
4459
+ file_name = '4pages.pdf'
4460
+ upload_file(file_name)
4461
+
4462
+ field = ListBoxField.new
4463
+ field.page_index = 1
4464
+ field.selected_items = [1, 4]
4465
+ field.multi_select = true
4466
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
4467
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 160, :URY => 140})
4468
+ field.partial_name = 'testField'
4469
+ field.margin = MarginInfo.new({:Bottom => 0, :Left => 0, :Right => 0, :Top => 0})
4470
+ field.options = [
4471
+ Option.new({
4472
+ :Name => 'one',
4473
+ :Value => 'one',
4474
+ }),
4475
+ Option.new({
4476
+ :Name => 'two',
4477
+ :Value => 'two',
4478
+ }),
4479
+ Option.new({
4480
+ :Name => 'three',
4481
+ :Value => 'three',
4482
+ }),
4483
+ Option.new({
4484
+ :Name => 'four',
4485
+ :Value => 'four',
4486
+ }),
4487
+ ]
4488
+
4489
+ opts = {
4490
+ :folder => @temp_folder
4491
+ }
4492
+
4493
+ response = @pdf_api.post_list_box_fields(file_name, [field], opts)
4494
+ assert(response, 'Failed to insert list box fields.')
4495
+ end
4496
+
4497
+ def test_put_list_box_field
4498
+ file_name = 'PdfWithAcroForm.pdf'
4499
+ upload_file(file_name)
4500
+
4501
+ field_name = 'listboxField'
4502
+
4503
+ field = ListBoxField.new
4504
+ field.page_index = 1
4505
+ field.selected_items = [1, 4]
4506
+ field.multi_select = true
4507
+ field.color = Color.new({:A => 0xFF, :R => 0, :G => 0xFF, :B => 0})
4508
+ field.rect = Rectangle.new({:LLX => 100, :LLY => 100, :URX => 160, :URY => 140})
4509
+ field.partial_name = 'testField'
4510
+ field.margin = MarginInfo.new({:Bottom => 0, :Left => 0, :Right => 0, :Top => 0})
4511
+ field.options = [
4512
+ Option.new({
4513
+ :Name => 'one',
4514
+ :Value => 'one',
4515
+ }),
4516
+ Option.new({
4517
+ :Name => 'two',
4518
+ :Value => 'two',
4519
+ }),
4520
+ Option.new({
4521
+ :Name => 'three',
4522
+ :Value => 'three',
4523
+ }),
4524
+ Option.new({
4525
+ :Name => 'four',
4526
+ :Value => 'four',
4527
+ }),
4528
+ ]
4529
+
4530
+ opts = {
4531
+ :folder => @temp_folder
4532
+ }
4533
+
4534
+ response = @pdf_api.put_list_box_field(file_name, field_name, field, opts)
4535
+ assert(response, 'Failed to update list box field.')
4536
+ end
4224
4537
 
4225
4538
  # Stamp Tests
4226
4539