From 8fbd7fbe572a6e92d94b443a52e24e79948e7b0e Mon Sep 17 00:00:00 2001 From: Andrey Kaferi Date: Mon, 29 Oct 2018 17:42:20 +0200 Subject: [PATCH] Updated to v18.10 --- README.md | 60 +- docs/CaptionPosition.md | 11 + docs/CircleAnnotation.md | 26 + docs/CircleAnnotationResponse.md | 11 + docs/CircleAnnotations.md | 10 + docs/CircleAnnotationsResponse.md | 11 + docs/CommonFigureAnnotation.md | 25 + docs/LineAnnotation.md | 36 + docs/LineAnnotationResponse.md | 11 + docs/LineAnnotations.md | 10 + docs/LineAnnotationsResponse.md | 11 + docs/LineEnding.md | 19 + docs/LineIntent.md | 12 + docs/PdfApi.md | 709 ++- docs/Point.md | 10 + docs/PolyAnnotation.md | 28 + docs/PolyIntent.md | 13 + docs/PolyLineAnnotation.md | 29 + docs/PolyLineAnnotationResponse.md | 11 + docs/PolyLineAnnotations.md | 10 + docs/PolyLineAnnotationsResponse.md | 11 + docs/PolygonAnnotation.md | 29 + docs/PolygonAnnotationResponse.md | 11 + docs/PolygonAnnotations.md | 10 + docs/PolygonAnnotationsResponse.md | 11 + docs/SquareAnnotation.md | 26 + docs/SquareAnnotationResponse.md | 11 + docs/SquareAnnotations.md | 10 + docs/SquareAnnotationsResponse.md | 11 + lib/aspose_pdf_cloud.rb | 27 + lib/aspose_pdf_cloud/api/pdf_api.rb | 5294 +++++++++++------ .../models/caption_position.rb | 43 + .../models/circle_annotation.rb | 372 ++ .../models/circle_annotation_response.rb | 222 + .../models/circle_annotations.rb | 211 + .../models/circle_annotations_response.rb | 222 + .../models/common_figure_annotation.rb | 362 ++ .../models/line_annotation.rb | 472 ++ .../models/line_annotation_response.rb | 222 + .../models/line_annotations.rb | 211 + .../models/line_annotations_response.rb | 222 + lib/aspose_pdf_cloud/models/line_ending.rb | 51 + lib/aspose_pdf_cloud/models/line_intent.rb | 44 + lib/aspose_pdf_cloud/models/point.rb | 218 + .../models/poly_annotation.rb | 394 ++ lib/aspose_pdf_cloud/models/poly_intent.rb | 45 + .../models/poly_line_annotation.rb | 404 ++ .../models/poly_line_annotation_response.rb | 222 + .../models/poly_line_annotations.rb | 211 + .../models/poly_line_annotations_response.rb | 222 + .../models/polygon_annotation.rb | 404 ++ .../models/polygon_annotation_response.rb | 222 + .../models/polygon_annotations.rb | 211 + .../models/polygon_annotations_response.rb | 222 + .../models/square_annotation.rb | 372 ++ .../models/square_annotation_response.rb | 222 + .../models/square_annotations.rb | 211 + .../models/square_annotations_response.rb | 222 + lib/aspose_pdf_cloud/version.rb | 2 +- test/pdf_tests.rb | 484 +- 60 files changed, 11761 insertions(+), 1695 deletions(-) create mode 100644 docs/CaptionPosition.md create mode 100644 docs/CircleAnnotation.md create mode 100644 docs/CircleAnnotationResponse.md create mode 100644 docs/CircleAnnotations.md create mode 100644 docs/CircleAnnotationsResponse.md create mode 100644 docs/CommonFigureAnnotation.md create mode 100644 docs/LineAnnotation.md create mode 100644 docs/LineAnnotationResponse.md create mode 100644 docs/LineAnnotations.md create mode 100644 docs/LineAnnotationsResponse.md create mode 100644 docs/LineEnding.md create mode 100644 docs/LineIntent.md create mode 100644 docs/Point.md create mode 100644 docs/PolyAnnotation.md create mode 100644 docs/PolyIntent.md create mode 100644 docs/PolyLineAnnotation.md create mode 100644 docs/PolyLineAnnotationResponse.md create mode 100644 docs/PolyLineAnnotations.md create mode 100644 docs/PolyLineAnnotationsResponse.md create mode 100644 docs/PolygonAnnotation.md create mode 100644 docs/PolygonAnnotationResponse.md create mode 100644 docs/PolygonAnnotations.md create mode 100644 docs/PolygonAnnotationsResponse.md create mode 100644 docs/SquareAnnotation.md create mode 100644 docs/SquareAnnotationResponse.md create mode 100644 docs/SquareAnnotations.md create mode 100644 docs/SquareAnnotationsResponse.md create mode 100644 lib/aspose_pdf_cloud/models/caption_position.rb create mode 100644 lib/aspose_pdf_cloud/models/circle_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/circle_annotation_response.rb create mode 100644 lib/aspose_pdf_cloud/models/circle_annotations.rb create mode 100644 lib/aspose_pdf_cloud/models/circle_annotations_response.rb create mode 100644 lib/aspose_pdf_cloud/models/common_figure_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/line_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/line_annotation_response.rb create mode 100644 lib/aspose_pdf_cloud/models/line_annotations.rb create mode 100644 lib/aspose_pdf_cloud/models/line_annotations_response.rb create mode 100644 lib/aspose_pdf_cloud/models/line_ending.rb create mode 100644 lib/aspose_pdf_cloud/models/line_intent.rb create mode 100644 lib/aspose_pdf_cloud/models/point.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_intent.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_line_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_line_annotations.rb create mode 100644 lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb create mode 100644 lib/aspose_pdf_cloud/models/polygon_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/polygon_annotation_response.rb create mode 100644 lib/aspose_pdf_cloud/models/polygon_annotations.rb create mode 100644 lib/aspose_pdf_cloud/models/polygon_annotations_response.rb create mode 100644 lib/aspose_pdf_cloud/models/square_annotation.rb create mode 100644 lib/aspose_pdf_cloud/models/square_annotation_response.rb create mode 100644 lib/aspose_pdf_cloud/models/square_annotations.rb create mode 100644 lib/aspose_pdf_cloud/models/square_annotations_response.rb diff --git a/README.md b/README.md index 5483d6a..0dc3469 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Aspose.PDF Cloud - API version: 2.0 -- Package version: 18.9.0 +- Package version: 18.10.0 [Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of Pdf documents in the cloud. @@ -22,15 +22,15 @@ gem build aspose_pdf_cloud.gemspec Then either install the gem locally: ```shell -gem install ./aspose_pdf_cloud-18.9.0.gem +gem install ./aspose_pdf_cloud-18.10.0.gem ``` -(for development, run `gem install --dev ./aspose_pdf_cloud-18.9.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./aspose_pdf_cloud-18.10.0.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'aspose_pdf_cloud', '~> 18.9.0' + gem 'aspose_pdf_cloud', '~> 18.10.0' ### Install from Git @@ -101,14 +101,20 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**delete_page_link_annotations**](docs/PdfApi.md#delete_page_link_annotations) | **DELETE** /pdf/\{name}/pages/\{pageNumber}/links | Delete all link annotations from the page *AsposePdfCloud::PdfApi* | [**delete_properties**](docs/PdfApi.md#delete_properties) | **DELETE** /pdf/\{name}/documentproperties | Delete custom document properties. *AsposePdfCloud::PdfApi* | [**delete_property**](docs/PdfApi.md#delete_property) | **DELETE** /pdf/\{name}/documentproperties/\{propertyName} | Delete document property. +*AsposePdfCloud::PdfApi* | [**get_circle_annotation**](docs/PdfApi.md#get_circle_annotation) | **GET** /pdf/\{name}/annotations/circle/\{annotationId} | Read document page circle annotation by ID. *AsposePdfCloud::PdfApi* | [**get_document**](docs/PdfApi.md#get_document) | **GET** /pdf/\{name} | Read common document info. *AsposePdfCloud::PdfApi* | [**get_document_annotations**](docs/PdfApi.md#get_document_annotations) | **GET** /pdf/\{name}/annotations | Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. *AsposePdfCloud::PdfApi* | [**get_document_attachment_by_index**](docs/PdfApi.md#get_document_attachment_by_index) | **GET** /pdf/\{name}/attachments/\{attachmentIndex} | Read document attachment info by its index. *AsposePdfCloud::PdfApi* | [**get_document_attachments**](docs/PdfApi.md#get_document_attachments) | **GET** /pdf/\{name}/attachments | Read document attachments info. *AsposePdfCloud::PdfApi* | [**get_document_bookmarks**](docs/PdfApi.md#get_document_bookmarks) | **GET** /pdf/\{name}/bookmarks | Read document bookmark/bookmarks (including children). +*AsposePdfCloud::PdfApi* | [**get_document_circle_annotations**](docs/PdfApi.md#get_document_circle_annotations) | **GET** /pdf/\{name}/annotations/circle | Read document circle annotations. *AsposePdfCloud::PdfApi* | [**get_document_free_text_annotations**](docs/PdfApi.md#get_document_free_text_annotations) | **GET** /pdf/\{name}/annotations/freetext | Read document free text annotations. +*AsposePdfCloud::PdfApi* | [**get_document_line_annotations**](docs/PdfApi.md#get_document_line_annotations) | **GET** /pdf/\{name}/annotations/line | Read document line annotations. +*AsposePdfCloud::PdfApi* | [**get_document_poly_line_annotations**](docs/PdfApi.md#get_document_poly_line_annotations) | **GET** /pdf/\{name}/annotations/polyline | Read document polyline annotations. +*AsposePdfCloud::PdfApi* | [**get_document_polygon_annotations**](docs/PdfApi.md#get_document_polygon_annotations) | **GET** /pdf/\{name}/annotations/polygon | Read document polygon annotations. *AsposePdfCloud::PdfApi* | [**get_document_properties**](docs/PdfApi.md#get_document_properties) | **GET** /pdf/\{name}/documentproperties | Read document properties. *AsposePdfCloud::PdfApi* | [**get_document_property**](docs/PdfApi.md#get_document_property) | **GET** /pdf/\{name}/documentproperties/\{propertyName} | Read document property by name. +*AsposePdfCloud::PdfApi* | [**get_document_square_annotations**](docs/PdfApi.md#get_document_square_annotations) | **GET** /pdf/\{name}/annotations/square | Read document square annotations. *AsposePdfCloud::PdfApi* | [**get_document_text_annotations**](docs/PdfApi.md#get_document_text_annotations) | **GET** /pdf/\{name}/annotations/text | Read document text annotations. *AsposePdfCloud::PdfApi* | [**get_download**](docs/PdfApi.md#get_download) | **GET** /storage/file | Download a specific file *AsposePdfCloud::PdfApi* | [**get_download_document_attachment_by_index**](docs/PdfApi.md#get_download_document_attachment_by_index) | **GET** /pdf/\{name}/attachments/\{attachmentIndex}/download | Download document attachment content by its index. @@ -124,10 +130,12 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**get_image_extract_as_tiff**](docs/PdfApi.md#get_image_extract_as_tiff) | **GET** /pdf/\{name}/images/\{imageId}/extract/tiff | Extract document image in TIFF format *AsposePdfCloud::PdfApi* | [**get_images**](docs/PdfApi.md#get_images) | **GET** /pdf/\{name}/pages/\{pageNumber}/images | Read document images. *AsposePdfCloud::PdfApi* | [**get_la_te_x_in_storage_to_pdf**](docs/PdfApi.md#get_la_te_x_in_storage_to_pdf) | **GET** /pdf/create/latex | Convert LaTeX file (located on storage) to PDF format and return resulting file in response. +*AsposePdfCloud::PdfApi* | [**get_line_annotation**](docs/PdfApi.md#get_line_annotation) | **GET** /pdf/\{name}/annotations/line/\{annotationId} | Read document page line annotation by ID. *AsposePdfCloud::PdfApi* | [**get_link_annotation**](docs/PdfApi.md#get_link_annotation) | **GET** /pdf/\{name}/links/\{linkId} | Read document link annotation by ID. *AsposePdfCloud::PdfApi* | [**get_mht_in_storage_to_pdf**](docs/PdfApi.md#get_mht_in_storage_to_pdf) | **GET** /pdf/create/mht | Convert MHT file (located on storage) to PDF format and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_page**](docs/PdfApi.md#get_page) | **GET** /pdf/\{name}/pages/\{pageNumber} | Read document page info. *AsposePdfCloud::PdfApi* | [**get_page_annotations**](docs/PdfApi.md#get_page_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations | Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. +*AsposePdfCloud::PdfApi* | [**get_page_circle_annotations**](docs/PdfApi.md#get_page_circle_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Read document page circle annotations. *AsposePdfCloud::PdfApi* | [**get_page_convert_to_bmp**](docs/PdfApi.md#get_page_convert_to_bmp) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/bmp | Convert document page to Bmp image and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_page_convert_to_emf**](docs/PdfApi.md#get_page_convert_to_emf) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/emf | Convert document page to Emf image and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_page_convert_to_gif**](docs/PdfApi.md#get_page_convert_to_gif) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/gif | Convert document page to Gif image and return resulting file in response. @@ -135,8 +143,12 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**get_page_convert_to_png**](docs/PdfApi.md#get_page_convert_to_png) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/png | Convert document page to Png image and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_page_convert_to_tiff**](docs/PdfApi.md#get_page_convert_to_tiff) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/tiff | Convert document page to Tiff image and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_page_free_text_annotations**](docs/PdfApi.md#get_page_free_text_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Read document page free text annotations. +*AsposePdfCloud::PdfApi* | [**get_page_line_annotations**](docs/PdfApi.md#get_page_line_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/line | Read document page line annotations. *AsposePdfCloud::PdfApi* | [**get_page_link_annotation**](docs/PdfApi.md#get_page_link_annotation) | **GET** /pdf/\{name}/pages/\{pageNumber}/links/\{linkId} | Read document page link annotation by ID. *AsposePdfCloud::PdfApi* | [**get_page_link_annotations**](docs/PdfApi.md#get_page_link_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/links | Read document page link annotations. +*AsposePdfCloud::PdfApi* | [**get_page_poly_line_annotations**](docs/PdfApi.md#get_page_poly_line_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/polyline | Read document page polyline annotations. +*AsposePdfCloud::PdfApi* | [**get_page_polygon_annotations**](docs/PdfApi.md#get_page_polygon_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/polygon | Read document page polygon annotations. +*AsposePdfCloud::PdfApi* | [**get_page_square_annotations**](docs/PdfApi.md#get_page_square_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Read document page square annotations. *AsposePdfCloud::PdfApi* | [**get_page_text**](docs/PdfApi.md#get_page_text) | **GET** /pdf/\{name}/pages/\{pageNumber}/text | Read page text items. *AsposePdfCloud::PdfApi* | [**get_page_text_annotations**](docs/PdfApi.md#get_page_text_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/text | Read document page text annotations. *AsposePdfCloud::PdfApi* | [**get_pages**](docs/PdfApi.md#get_pages) | **GET** /pdf/\{name}/pages | Read document pages info. @@ -153,7 +165,10 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**get_pdf_in_storage_to_xls**](docs/PdfApi.md#get_pdf_in_storage_to_xls) | **GET** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and returns resulting file in response content *AsposePdfCloud::PdfApi* | [**get_pdf_in_storage_to_xml**](docs/PdfApi.md#get_pdf_in_storage_to_xml) | **GET** /pdf/\{name}/convert/xml | Converts PDF document (located on storage) to XML format and returns resulting file in response content *AsposePdfCloud::PdfApi* | [**get_pdf_in_storage_to_xps**](docs/PdfApi.md#get_pdf_in_storage_to_xps) | **GET** /pdf/\{name}/convert/xps | Converts PDF document (located on storage) to XPS format and returns resulting file in response content +*AsposePdfCloud::PdfApi* | [**get_poly_line_annotation**](docs/PdfApi.md#get_poly_line_annotation) | **GET** /pdf/\{name}/annotations/polyline/\{annotationId} | Read document page polyline annotation by ID. +*AsposePdfCloud::PdfApi* | [**get_polygon_annotation**](docs/PdfApi.md#get_polygon_annotation) | **GET** /pdf/\{name}/annotations/polygon/\{annotationId} | Read document page polygon annotation by ID. *AsposePdfCloud::PdfApi* | [**get_ps_in_storage_to_pdf**](docs/PdfApi.md#get_ps_in_storage_to_pdf) | **GET** /pdf/create/ps | Convert PS file (located on storage) to PDF format and return resulting file in response. +*AsposePdfCloud::PdfApi* | [**get_square_annotation**](docs/PdfApi.md#get_square_annotation) | **GET** /pdf/\{name}/annotations/square/\{annotationId} | Read document page square annotation by ID. *AsposePdfCloud::PdfApi* | [**get_svg_in_storage_to_pdf**](docs/PdfApi.md#get_svg_in_storage_to_pdf) | **GET** /pdf/create/svg | Convert SVG file (located on storage) to PDF format and return resulting file in response. *AsposePdfCloud::PdfApi* | [**get_text**](docs/PdfApi.md#get_text) | **GET** /pdf/\{name}/text | Read document text. *AsposePdfCloud::PdfApi* | [**get_text_annotation**](docs/PdfApi.md#get_text_annotation) | **GET** /pdf/\{name}/annotations/text/\{annotationId} | Read document page text annotation by ID. @@ -170,8 +185,13 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**post_insert_image**](docs/PdfApi.md#post_insert_image) | **POST** /pdf/\{name}/pages/\{pageNumber}/images | Insert image to document page. *AsposePdfCloud::PdfApi* | [**post_move_page**](docs/PdfApi.md#post_move_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/movePage | Move page to new position. *AsposePdfCloud::PdfApi* | [**post_optimize_document**](docs/PdfApi.md#post_optimize_document) | **POST** /pdf/\{name}/optimize | Optimize document. +*AsposePdfCloud::PdfApi* | [**post_page_circle_annotations**](docs/PdfApi.md#post_page_circle_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Add document page circle annotations. *AsposePdfCloud::PdfApi* | [**post_page_free_text_annotations**](docs/PdfApi.md#post_page_free_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Add document page free text annotations. +*AsposePdfCloud::PdfApi* | [**post_page_line_annotations**](docs/PdfApi.md#post_page_line_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/line | Add document page line annotations. *AsposePdfCloud::PdfApi* | [**post_page_link_annotations**](docs/PdfApi.md#post_page_link_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/links | Add document page link annotations. +*AsposePdfCloud::PdfApi* | [**post_page_poly_line_annotations**](docs/PdfApi.md#post_page_poly_line_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/polyline | Add document page polyline annotations. +*AsposePdfCloud::PdfApi* | [**post_page_polygon_annotations**](docs/PdfApi.md#post_page_polygon_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/polygon | Add document page polygon annotations. +*AsposePdfCloud::PdfApi* | [**post_page_square_annotations**](docs/PdfApi.md#post_page_square_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Add document page square annotations. *AsposePdfCloud::PdfApi* | [**post_page_text_annotations**](docs/PdfApi.md#post_page_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/text | Add document page text annotations. *AsposePdfCloud::PdfApi* | [**post_page_text_replace**](docs/PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method. *AsposePdfCloud::PdfApi* | [**post_sign_document**](docs/PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document. @@ -179,6 +199,7 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**post_split_document**](docs/PdfApi.md#post_split_document) | **POST** /pdf/\{name}/split | Split document to parts. *AsposePdfCloud::PdfApi* | [**put_add_new_page**](docs/PdfApi.md#put_add_new_page) | **PUT** /pdf/\{name}/pages | Add new page to end of the document. *AsposePdfCloud::PdfApi* | [**put_add_text**](docs/PdfApi.md#put_add_text) | **PUT** /pdf/\{name}/pages/\{pageNumber}/text | Add text to PDF document page. +*AsposePdfCloud::PdfApi* | [**put_circle_annotation**](docs/PdfApi.md#put_circle_annotation) | **PUT** /pdf/\{name}/annotations/circle/\{annotationId} | Replace document circle annotation *AsposePdfCloud::PdfApi* | [**put_create**](docs/PdfApi.md#put_create) | **PUT** /storage/file | Upload a specific file *AsposePdfCloud::PdfApi* | [**put_create_document**](docs/PdfApi.md#put_create_document) | **PUT** /pdf/\{name} | Create empty document. *AsposePdfCloud::PdfApi* | [**put_epub_in_storage_to_pdf**](docs/PdfApi.md#put_epub_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/epub | Convert EPUB file (located on storage) to PDF format and upload resulting file to storage. @@ -195,6 +216,7 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**put_images_extract_as_png**](docs/PdfApi.md#put_images_extract_as_png) | **PUT** /pdf/\{name}/pages/\{pageNumber}/images/extract/png | Extract document images in PNG format to folder. *AsposePdfCloud::PdfApi* | [**put_images_extract_as_tiff**](docs/PdfApi.md#put_images_extract_as_tiff) | **PUT** /pdf/\{name}/pages/\{pageNumber}/images/extract/tiff | Extract document images in TIFF format to folder. *AsposePdfCloud::PdfApi* | [**put_la_te_x_in_storage_to_pdf**](docs/PdfApi.md#put_la_te_x_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/latex | Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. +*AsposePdfCloud::PdfApi* | [**put_line_annotation**](docs/PdfApi.md#put_line_annotation) | **PUT** /pdf/\{name}/annotations/line/\{annotationId} | Replace document line annotation *AsposePdfCloud::PdfApi* | [**put_link_annotation**](docs/PdfApi.md#put_link_annotation) | **PUT** /pdf/\{name}/links/\{linkId} | Replace document page link annotations *AsposePdfCloud::PdfApi* | [**put_merge_documents**](docs/PdfApi.md#put_merge_documents) | **PUT** /pdf/\{name}/merge | Merge a list of documents. *AsposePdfCloud::PdfApi* | [**put_mht_in_storage_to_pdf**](docs/PdfApi.md#put_mht_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/mht | Convert MHT file (located on storage) to PDF format and upload resulting file to storage. @@ -230,11 +252,14 @@ Class | Method | HTTP request | Description *AsposePdfCloud::PdfApi* | [**put_pdf_in_storage_to_xls**](docs/PdfApi.md#put_pdf_in_storage_to_xls) | **PUT** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and uploads resulting file to storage *AsposePdfCloud::PdfApi* | [**put_pdf_in_storage_to_xml**](docs/PdfApi.md#put_pdf_in_storage_to_xml) | **PUT** /pdf/\{name}/convert/xml | Converts PDF document (located on storage) to XML format and uploads resulting file to storage *AsposePdfCloud::PdfApi* | [**put_pdf_in_storage_to_xps**](docs/PdfApi.md#put_pdf_in_storage_to_xps) | **PUT** /pdf/\{name}/convert/xps | Converts PDF document (located on storage) to XPS format and uploads resulting file to storage +*AsposePdfCloud::PdfApi* | [**put_poly_line_annotation**](docs/PdfApi.md#put_poly_line_annotation) | **PUT** /pdf/\{name}/annotations/polyline/\{annotationId} | Replace document polyline annotation +*AsposePdfCloud::PdfApi* | [**put_polygon_annotation**](docs/PdfApi.md#put_polygon_annotation) | **PUT** /pdf/\{name}/annotations/polygon/\{annotationId} | Replace document polygon annotation *AsposePdfCloud::PdfApi* | [**put_privileges**](docs/PdfApi.md#put_privileges) | **PUT** /pdf/\{name}/privileges | Update privilege document. *AsposePdfCloud::PdfApi* | [**put_ps_in_storage_to_pdf**](docs/PdfApi.md#put_ps_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/ps | Convert PS file (located on storage) to PDF format and upload resulting file to storage. *AsposePdfCloud::PdfApi* | [**put_replace_image**](docs/PdfApi.md#put_replace_image) | **PUT** /pdf/\{name}/images/\{imageId} | Replace document image. *AsposePdfCloud::PdfApi* | [**put_searchable_document**](docs/PdfApi.md#put_searchable_document) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document. *AsposePdfCloud::PdfApi* | [**put_set_property**](docs/PdfApi.md#put_set_property) | **PUT** /pdf/\{name}/documentproperties/\{propertyName} | Add/update document property. +*AsposePdfCloud::PdfApi* | [**put_square_annotation**](docs/PdfApi.md#put_square_annotation) | **PUT** /pdf/\{name}/annotations/square/\{annotationId} | Replace document square annotation *AsposePdfCloud::PdfApi* | [**put_svg_in_storage_to_pdf**](docs/PdfApi.md#put_svg_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/svg | Convert SVG file (located on storage) to PDF format and upload resulting file to storage. *AsposePdfCloud::PdfApi* | [**put_text_annotation**](docs/PdfApi.md#put_text_annotation) | **PUT** /pdf/\{name}/annotations/text/\{annotationId} | Replace document text annotation *AsposePdfCloud::PdfApi* | [**put_update_field**](docs/PdfApi.md#put_update_field) | **PUT** /pdf/\{name}/fields/\{fieldName} | Update field. @@ -255,6 +280,7 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::AntialiasingProcessingType](docs/AntialiasingProcessingType.md) - [AsposePdfCloud::AppendDocument](docs/AppendDocument.md) - [AsposePdfCloud::AsposeResponse](docs/AsposeResponse.md) + - [AsposePdfCloud::CaptionPosition](docs/CaptionPosition.md) - [AsposePdfCloud::Color](docs/Color.md) - [AsposePdfCloud::ColorDepth](docs/ColorDepth.md) - [AsposePdfCloud::CompressionType](docs/CompressionType.md) @@ -275,6 +301,8 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::ImageTemplatesRequest](docs/ImageTemplatesRequest.md) - [AsposePdfCloud::Justification](docs/Justification.md) - [AsposePdfCloud::LettersPositioningMethods](docs/LettersPositioningMethods.md) + - [AsposePdfCloud::LineEnding](docs/LineEnding.md) + - [AsposePdfCloud::LineIntent](docs/LineIntent.md) - [AsposePdfCloud::LineSpacing](docs/LineSpacing.md) - [AsposePdfCloud::Link](docs/Link.md) - [AsposePdfCloud::LinkActionType](docs/LinkActionType.md) @@ -287,6 +315,8 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::Paragraph](docs/Paragraph.md) - [AsposePdfCloud::PartsEmbeddingModes](docs/PartsEmbeddingModes.md) - [AsposePdfCloud::PdfAType](docs/PdfAType.md) + - [AsposePdfCloud::Point](docs/Point.md) + - [AsposePdfCloud::PolyIntent](docs/PolyIntent.md) - [AsposePdfCloud::RasterImagesSavingModes](docs/RasterImagesSavingModes.md) - [AsposePdfCloud::RectanglePdf](docs/RectanglePdf.md) - [AsposePdfCloud::Rotation](docs/Rotation.md) @@ -316,6 +346,9 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::AttachmentResponse](docs/AttachmentResponse.md) - [AsposePdfCloud::Attachments](docs/Attachments.md) - [AsposePdfCloud::AttachmentsResponse](docs/AttachmentsResponse.md) + - [AsposePdfCloud::CircleAnnotationResponse](docs/CircleAnnotationResponse.md) + - [AsposePdfCloud::CircleAnnotations](docs/CircleAnnotations.md) + - [AsposePdfCloud::CircleAnnotationsResponse](docs/CircleAnnotationsResponse.md) - [AsposePdfCloud::Document](docs/Document.md) - [AsposePdfCloud::DocumentPageResponse](docs/DocumentPageResponse.md) - [AsposePdfCloud::DocumentPagesResponse](docs/DocumentPagesResponse.md) @@ -335,15 +368,27 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::ImageResponse](docs/ImageResponse.md) - [AsposePdfCloud::Images](docs/Images.md) - [AsposePdfCloud::ImagesResponse](docs/ImagesResponse.md) + - [AsposePdfCloud::LineAnnotationResponse](docs/LineAnnotationResponse.md) + - [AsposePdfCloud::LineAnnotations](docs/LineAnnotations.md) + - [AsposePdfCloud::LineAnnotationsResponse](docs/LineAnnotationsResponse.md) - [AsposePdfCloud::LinkAnnotation](docs/LinkAnnotation.md) - [AsposePdfCloud::LinkAnnotationResponse](docs/LinkAnnotationResponse.md) - [AsposePdfCloud::LinkAnnotations](docs/LinkAnnotations.md) - [AsposePdfCloud::LinkAnnotationsResponse](docs/LinkAnnotationsResponse.md) - [AsposePdfCloud::Page](docs/Page.md) - [AsposePdfCloud::Pages](docs/Pages.md) + - [AsposePdfCloud::PolyLineAnnotationResponse](docs/PolyLineAnnotationResponse.md) + - [AsposePdfCloud::PolyLineAnnotations](docs/PolyLineAnnotations.md) + - [AsposePdfCloud::PolyLineAnnotationsResponse](docs/PolyLineAnnotationsResponse.md) + - [AsposePdfCloud::PolygonAnnotationResponse](docs/PolygonAnnotationResponse.md) + - [AsposePdfCloud::PolygonAnnotations](docs/PolygonAnnotations.md) + - [AsposePdfCloud::PolygonAnnotationsResponse](docs/PolygonAnnotationsResponse.md) - [AsposePdfCloud::SignatureVerifyResponse](docs/SignatureVerifyResponse.md) - [AsposePdfCloud::SplitResultDocument](docs/SplitResultDocument.md) - [AsposePdfCloud::SplitResultResponse](docs/SplitResultResponse.md) + - [AsposePdfCloud::SquareAnnotationResponse](docs/SquareAnnotationResponse.md) + - [AsposePdfCloud::SquareAnnotations](docs/SquareAnnotations.md) + - [AsposePdfCloud::SquareAnnotationsResponse](docs/SquareAnnotationsResponse.md) - [AsposePdfCloud::TextAnnotationResponse](docs/TextAnnotationResponse.md) - [AsposePdfCloud::TextAnnotations](docs/TextAnnotations.md) - [AsposePdfCloud::TextAnnotationsResponse](docs/TextAnnotationsResponse.md) @@ -352,7 +397,14 @@ Class | Method | HTTP request | Description - [AsposePdfCloud::WordCountResponse](docs/WordCountResponse.md) - [AsposePdfCloud::AnnotationInfo](docs/AnnotationInfo.md) - [AsposePdfCloud::MarkupAnnotation](docs/MarkupAnnotation.md) + - [AsposePdfCloud::CommonFigureAnnotation](docs/CommonFigureAnnotation.md) - [AsposePdfCloud::FreeTextAnnotation](docs/FreeTextAnnotation.md) + - [AsposePdfCloud::LineAnnotation](docs/LineAnnotation.md) + - [AsposePdfCloud::PolyAnnotation](docs/PolyAnnotation.md) - [AsposePdfCloud::TextAnnotation](docs/TextAnnotation.md) + - [AsposePdfCloud::CircleAnnotation](docs/CircleAnnotation.md) + - [AsposePdfCloud::PolyLineAnnotation](docs/PolyLineAnnotation.md) + - [AsposePdfCloud::PolygonAnnotation](docs/PolygonAnnotation.md) + - [AsposePdfCloud::SquareAnnotation](docs/SquareAnnotation.md) diff --git a/docs/CaptionPosition.md b/docs/CaptionPosition.md new file mode 100644 index 0000000..c74044b --- /dev/null +++ b/docs/CaptionPosition.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::CaptionPosition +Enumeration of the annotation?s caption positioning. + +## Enum +Name | Type | Value +------------ | ------------- | ------------- +**INLINE** | **String** | 'Inline' +**TOP** | **String** | 'Top' + + + diff --git a/docs/CircleAnnotation.md b/docs/CircleAnnotation.md new file mode 100644 index 0000000..058241c --- /dev/null +++ b/docs/CircleAnnotation.md @@ -0,0 +1,26 @@ +# AsposePdfCloud::CircleAnnotation +Provides CircleAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Get the annotation InteriorColor. | [optional] +**frame** | [**RectanglePdf**](RectanglePdf.md) | Get or set the annotation Rectangle of frame. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] + + diff --git a/docs/CircleAnnotationResponse.md b/docs/CircleAnnotationResponse.md new file mode 100644 index 0000000..4d4c2bd --- /dev/null +++ b/docs/CircleAnnotationResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::CircleAnnotationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotation** | [**CircleAnnotation**](CircleAnnotation.md) | | [optional] + + diff --git a/docs/CircleAnnotations.md b/docs/CircleAnnotations.md new file mode 100644 index 0000000..8f31c5a --- /dev/null +++ b/docs/CircleAnnotations.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::CircleAnnotations +List of annotations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**list** | [**Array<CircleAnnotation>**](CircleAnnotation.md) | | [optional] + + diff --git a/docs/CircleAnnotationsResponse.md b/docs/CircleAnnotationsResponse.md new file mode 100644 index 0000000..6e0399a --- /dev/null +++ b/docs/CircleAnnotationsResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::CircleAnnotationsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotations** | [**CircleAnnotations**](CircleAnnotations.md) | | [optional] + + diff --git a/docs/CommonFigureAnnotation.md b/docs/CommonFigureAnnotation.md new file mode 100644 index 0000000..9fe5657 --- /dev/null +++ b/docs/CommonFigureAnnotation.md @@ -0,0 +1,25 @@ +# AsposePdfCloud::CommonFigureAnnotation +Provides CommonFigureAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Get the annotation InteriorColor. | [optional] +**frame** | [**RectanglePdf**](RectanglePdf.md) | Get or set the annotation Rectangle of frame. | [optional] + + diff --git a/docs/LineAnnotation.md b/docs/LineAnnotation.md new file mode 100644 index 0000000..ef874ef --- /dev/null +++ b/docs/LineAnnotation.md @@ -0,0 +1,36 @@ +# AsposePdfCloud::LineAnnotation +Provides LineAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**starting** | [**Point**](Point.md) | Gets or sets starting point of line. | [optional] +**starting_style** | [**LineEnding**](LineEnding.md) | Gets or sets line ending style for line starting point. | [optional] +**ending** | [**Point**](Point.md) | Gets or sets ending point of line. | [optional] +**ending_style** | [**LineEnding**](LineEnding.md) | Gets or sets ending style for end point of line. | [optional] +**interior_color** | [**Color**](Color.md) | Gets or sets interior color of the annotation. | [optional] +**leader_line** | **Float** | Gets or sets leader line length. | [optional] +**leader_line_extension** | **Float** | Gets or sets length of leader line extension. | [optional] +**leader_line_offset** | **Float** | Gets or sets leader line offset. | [optional] +**show_caption** | **BOOLEAN** | Gets or sets boolean flag which determinies is contents must be shown as caption. | [optional] +**caption_offset** | [**Point**](Point.md) | Gets or sets caption text offset from its normal position. | [optional] +**caption_position** | [**CaptionPosition**](CaptionPosition.md) | Gets or sets annotation caption position. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] +**intent** | [**LineIntent**](LineIntent.md) | Gets or sets the intent of the line annotation. | [optional] + + diff --git a/docs/LineAnnotationResponse.md b/docs/LineAnnotationResponse.md new file mode 100644 index 0000000..06b8417 --- /dev/null +++ b/docs/LineAnnotationResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::LineAnnotationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotation** | [**LineAnnotation**](LineAnnotation.md) | | [optional] + + diff --git a/docs/LineAnnotations.md b/docs/LineAnnotations.md new file mode 100644 index 0000000..33cc41b --- /dev/null +++ b/docs/LineAnnotations.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::LineAnnotations +List of annotations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**list** | [**Array<LineAnnotation>**](LineAnnotation.md) | | [optional] + + diff --git a/docs/LineAnnotationsResponse.md b/docs/LineAnnotationsResponse.md new file mode 100644 index 0000000..8509686 --- /dev/null +++ b/docs/LineAnnotationsResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::LineAnnotationsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotations** | [**LineAnnotations**](LineAnnotations.md) | | [optional] + + diff --git a/docs/LineEnding.md b/docs/LineEnding.md new file mode 100644 index 0000000..7d1e399 --- /dev/null +++ b/docs/LineEnding.md @@ -0,0 +1,19 @@ +# AsposePdfCloud::LineEnding +Enumerates the line ending styles to be used in drawing the line. + +## Enum +Name | Type | Value +------------ | ------------- | ------------- +**NONE** | **String** | 'None' +**SQUARE** | **String** | 'Square' +**CIRCLE** | **String** | 'Circle' +**DIAMOND** | **String** | 'Diamond' +**OPEN_ARROW** | **String** | 'OpenArrow' +**CLOSED_ARROW** | **String** | 'ClosedArrow' +**BUTT** | **String** | 'Butt' +**R_OPEN_ARROW** | **String** | 'ROpenArrow' +**R_CLOSED_ARROW** | **String** | 'RClosedArrow' +**SLASH** | **String** | 'Slash' + + + diff --git a/docs/LineIntent.md b/docs/LineIntent.md new file mode 100644 index 0000000..a3c05f1 --- /dev/null +++ b/docs/LineIntent.md @@ -0,0 +1,12 @@ +# AsposePdfCloud::LineIntent +Enumerates the intents of the line annotation. + +## Enum +Name | Type | Value +------------ | ------------- | ------------- +**UNDEFINED** | **String** | 'Undefined' +**LINE_ARROW** | **String** | 'LineArrow' +**LINE_DIMENSION** | **String** | 'LineDimension' + + + diff --git a/docs/PdfApi.md b/docs/PdfApi.md index bd34b50..f7ce97c 100644 --- a/docs/PdfApi.md +++ b/docs/PdfApi.md @@ -15,14 +15,20 @@ Method | HTTP request | Description [**delete_page_link_annotations**](PdfApi.md#delete_page_link_annotations) | **DELETE** /pdf/\{name}/pages/\{pageNumber}/links | Delete all link annotations from the page [**delete_properties**](PdfApi.md#delete_properties) | **DELETE** /pdf/\{name}/documentproperties | Delete custom document properties. [**delete_property**](PdfApi.md#delete_property) | **DELETE** /pdf/\{name}/documentproperties/\{propertyName} | Delete document property. +[**get_circle_annotation**](PdfApi.md#get_circle_annotation) | **GET** /pdf/\{name}/annotations/circle/\{annotationId} | Read document page circle annotation by ID. [**get_document**](PdfApi.md#get_document) | **GET** /pdf/\{name} | Read common document info. [**get_document_annotations**](PdfApi.md#get_document_annotations) | **GET** /pdf/\{name}/annotations | Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. [**get_document_attachment_by_index**](PdfApi.md#get_document_attachment_by_index) | **GET** /pdf/\{name}/attachments/\{attachmentIndex} | Read document attachment info by its index. [**get_document_attachments**](PdfApi.md#get_document_attachments) | **GET** /pdf/\{name}/attachments | Read document attachments info. [**get_document_bookmarks**](PdfApi.md#get_document_bookmarks) | **GET** /pdf/\{name}/bookmarks | Read document bookmark/bookmarks (including children). +[**get_document_circle_annotations**](PdfApi.md#get_document_circle_annotations) | **GET** /pdf/\{name}/annotations/circle | Read document circle annotations. [**get_document_free_text_annotations**](PdfApi.md#get_document_free_text_annotations) | **GET** /pdf/\{name}/annotations/freetext | Read document free text annotations. +[**get_document_line_annotations**](PdfApi.md#get_document_line_annotations) | **GET** /pdf/\{name}/annotations/line | Read document line annotations. +[**get_document_poly_line_annotations**](PdfApi.md#get_document_poly_line_annotations) | **GET** /pdf/\{name}/annotations/polyline | Read document polyline annotations. +[**get_document_polygon_annotations**](PdfApi.md#get_document_polygon_annotations) | **GET** /pdf/\{name}/annotations/polygon | Read document polygon annotations. [**get_document_properties**](PdfApi.md#get_document_properties) | **GET** /pdf/\{name}/documentproperties | Read document properties. [**get_document_property**](PdfApi.md#get_document_property) | **GET** /pdf/\{name}/documentproperties/\{propertyName} | Read document property by name. +[**get_document_square_annotations**](PdfApi.md#get_document_square_annotations) | **GET** /pdf/\{name}/annotations/square | Read document square annotations. [**get_document_text_annotations**](PdfApi.md#get_document_text_annotations) | **GET** /pdf/\{name}/annotations/text | Read document text annotations. [**get_download**](PdfApi.md#get_download) | **GET** /storage/file | Download a specific file [**get_download_document_attachment_by_index**](PdfApi.md#get_download_document_attachment_by_index) | **GET** /pdf/\{name}/attachments/\{attachmentIndex}/download | Download document attachment content by its index. @@ -38,10 +44,12 @@ Method | HTTP request | Description [**get_image_extract_as_tiff**](PdfApi.md#get_image_extract_as_tiff) | **GET** /pdf/\{name}/images/\{imageId}/extract/tiff | Extract document image in TIFF format [**get_images**](PdfApi.md#get_images) | **GET** /pdf/\{name}/pages/\{pageNumber}/images | Read document images. [**get_la_te_x_in_storage_to_pdf**](PdfApi.md#get_la_te_x_in_storage_to_pdf) | **GET** /pdf/create/latex | Convert LaTeX file (located on storage) to PDF format and return resulting file in response. +[**get_line_annotation**](PdfApi.md#get_line_annotation) | **GET** /pdf/\{name}/annotations/line/\{annotationId} | Read document page line annotation by ID. [**get_link_annotation**](PdfApi.md#get_link_annotation) | **GET** /pdf/\{name}/links/\{linkId} | Read document link annotation by ID. [**get_mht_in_storage_to_pdf**](PdfApi.md#get_mht_in_storage_to_pdf) | **GET** /pdf/create/mht | Convert MHT file (located on storage) to PDF format and return resulting file in response. [**get_page**](PdfApi.md#get_page) | **GET** /pdf/\{name}/pages/\{pageNumber} | Read document page info. [**get_page_annotations**](PdfApi.md#get_page_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations | Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. +[**get_page_circle_annotations**](PdfApi.md#get_page_circle_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Read document page circle annotations. [**get_page_convert_to_bmp**](PdfApi.md#get_page_convert_to_bmp) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/bmp | Convert document page to Bmp image and return resulting file in response. [**get_page_convert_to_emf**](PdfApi.md#get_page_convert_to_emf) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/emf | Convert document page to Emf image and return resulting file in response. [**get_page_convert_to_gif**](PdfApi.md#get_page_convert_to_gif) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/gif | Convert document page to Gif image and return resulting file in response. @@ -49,8 +57,12 @@ Method | HTTP request | Description [**get_page_convert_to_png**](PdfApi.md#get_page_convert_to_png) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/png | Convert document page to Png image and return resulting file in response. [**get_page_convert_to_tiff**](PdfApi.md#get_page_convert_to_tiff) | **GET** /pdf/\{name}/pages/\{pageNumber}/convert/tiff | Convert document page to Tiff image and return resulting file in response. [**get_page_free_text_annotations**](PdfApi.md#get_page_free_text_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Read document page free text annotations. +[**get_page_line_annotations**](PdfApi.md#get_page_line_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/line | Read document page line annotations. [**get_page_link_annotation**](PdfApi.md#get_page_link_annotation) | **GET** /pdf/\{name}/pages/\{pageNumber}/links/\{linkId} | Read document page link annotation by ID. [**get_page_link_annotations**](PdfApi.md#get_page_link_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/links | Read document page link annotations. +[**get_page_poly_line_annotations**](PdfApi.md#get_page_poly_line_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/polyline | Read document page polyline annotations. +[**get_page_polygon_annotations**](PdfApi.md#get_page_polygon_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/polygon | Read document page polygon annotations. +[**get_page_square_annotations**](PdfApi.md#get_page_square_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Read document page square annotations. [**get_page_text**](PdfApi.md#get_page_text) | **GET** /pdf/\{name}/pages/\{pageNumber}/text | Read page text items. [**get_page_text_annotations**](PdfApi.md#get_page_text_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/text | Read document page text annotations. [**get_pages**](PdfApi.md#get_pages) | **GET** /pdf/\{name}/pages | Read document pages info. @@ -67,7 +79,10 @@ Method | HTTP request | Description [**get_pdf_in_storage_to_xls**](PdfApi.md#get_pdf_in_storage_to_xls) | **GET** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and returns resulting file in response content [**get_pdf_in_storage_to_xml**](PdfApi.md#get_pdf_in_storage_to_xml) | **GET** /pdf/\{name}/convert/xml | Converts PDF document (located on storage) to XML format and returns resulting file in response content [**get_pdf_in_storage_to_xps**](PdfApi.md#get_pdf_in_storage_to_xps) | **GET** /pdf/\{name}/convert/xps | Converts PDF document (located on storage) to XPS format and returns resulting file in response content +[**get_poly_line_annotation**](PdfApi.md#get_poly_line_annotation) | **GET** /pdf/\{name}/annotations/polyline/\{annotationId} | Read document page polyline annotation by ID. +[**get_polygon_annotation**](PdfApi.md#get_polygon_annotation) | **GET** /pdf/\{name}/annotations/polygon/\{annotationId} | Read document page polygon annotation by ID. [**get_ps_in_storage_to_pdf**](PdfApi.md#get_ps_in_storage_to_pdf) | **GET** /pdf/create/ps | Convert PS file (located on storage) to PDF format and return resulting file in response. +[**get_square_annotation**](PdfApi.md#get_square_annotation) | **GET** /pdf/\{name}/annotations/square/\{annotationId} | Read document page square annotation by ID. [**get_svg_in_storage_to_pdf**](PdfApi.md#get_svg_in_storage_to_pdf) | **GET** /pdf/create/svg | Convert SVG file (located on storage) to PDF format and return resulting file in response. [**get_text**](PdfApi.md#get_text) | **GET** /pdf/\{name}/text | Read document text. [**get_text_annotation**](PdfApi.md#get_text_annotation) | **GET** /pdf/\{name}/annotations/text/\{annotationId} | Read document page text annotation by ID. @@ -84,8 +99,13 @@ Method | HTTP request | Description [**post_insert_image**](PdfApi.md#post_insert_image) | **POST** /pdf/\{name}/pages/\{pageNumber}/images | Insert image to document page. [**post_move_page**](PdfApi.md#post_move_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/movePage | Move page to new position. [**post_optimize_document**](PdfApi.md#post_optimize_document) | **POST** /pdf/\{name}/optimize | Optimize document. +[**post_page_circle_annotations**](PdfApi.md#post_page_circle_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Add document page circle annotations. [**post_page_free_text_annotations**](PdfApi.md#post_page_free_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Add document page free text annotations. +[**post_page_line_annotations**](PdfApi.md#post_page_line_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/line | Add document page line annotations. [**post_page_link_annotations**](PdfApi.md#post_page_link_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/links | Add document page link annotations. +[**post_page_poly_line_annotations**](PdfApi.md#post_page_poly_line_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/polyline | Add document page polyline annotations. +[**post_page_polygon_annotations**](PdfApi.md#post_page_polygon_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/polygon | Add document page polygon annotations. +[**post_page_square_annotations**](PdfApi.md#post_page_square_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Add document page square annotations. [**post_page_text_annotations**](PdfApi.md#post_page_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/text | Add document page text annotations. [**post_page_text_replace**](PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method. [**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document. @@ -93,6 +113,7 @@ Method | HTTP request | Description [**post_split_document**](PdfApi.md#post_split_document) | **POST** /pdf/\{name}/split | Split document to parts. [**put_add_new_page**](PdfApi.md#put_add_new_page) | **PUT** /pdf/\{name}/pages | Add new page to end of the document. [**put_add_text**](PdfApi.md#put_add_text) | **PUT** /pdf/\{name}/pages/\{pageNumber}/text | Add text to PDF document page. +[**put_circle_annotation**](PdfApi.md#put_circle_annotation) | **PUT** /pdf/\{name}/annotations/circle/\{annotationId} | Replace document circle annotation [**put_create**](PdfApi.md#put_create) | **PUT** /storage/file | Upload a specific file [**put_create_document**](PdfApi.md#put_create_document) | **PUT** /pdf/\{name} | Create empty document. [**put_epub_in_storage_to_pdf**](PdfApi.md#put_epub_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/epub | Convert EPUB file (located on storage) to PDF format and upload resulting file to storage. @@ -109,6 +130,7 @@ Method | HTTP request | Description [**put_images_extract_as_png**](PdfApi.md#put_images_extract_as_png) | **PUT** /pdf/\{name}/pages/\{pageNumber}/images/extract/png | Extract document images in PNG format to folder. [**put_images_extract_as_tiff**](PdfApi.md#put_images_extract_as_tiff) | **PUT** /pdf/\{name}/pages/\{pageNumber}/images/extract/tiff | Extract document images in TIFF format to folder. [**put_la_te_x_in_storage_to_pdf**](PdfApi.md#put_la_te_x_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/latex | Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. +[**put_line_annotation**](PdfApi.md#put_line_annotation) | **PUT** /pdf/\{name}/annotations/line/\{annotationId} | Replace document line annotation [**put_link_annotation**](PdfApi.md#put_link_annotation) | **PUT** /pdf/\{name}/links/\{linkId} | Replace document page link annotations [**put_merge_documents**](PdfApi.md#put_merge_documents) | **PUT** /pdf/\{name}/merge | Merge a list of documents. [**put_mht_in_storage_to_pdf**](PdfApi.md#put_mht_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/mht | Convert MHT file (located on storage) to PDF format and upload resulting file to storage. @@ -144,11 +166,14 @@ Method | HTTP request | Description [**put_pdf_in_storage_to_xls**](PdfApi.md#put_pdf_in_storage_to_xls) | **PUT** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and uploads resulting file to storage [**put_pdf_in_storage_to_xml**](PdfApi.md#put_pdf_in_storage_to_xml) | **PUT** /pdf/\{name}/convert/xml | Converts PDF document (located on storage) to XML format and uploads resulting file to storage [**put_pdf_in_storage_to_xps**](PdfApi.md#put_pdf_in_storage_to_xps) | **PUT** /pdf/\{name}/convert/xps | Converts PDF document (located on storage) to XPS format and uploads resulting file to storage +[**put_poly_line_annotation**](PdfApi.md#put_poly_line_annotation) | **PUT** /pdf/\{name}/annotations/polyline/\{annotationId} | Replace document polyline annotation +[**put_polygon_annotation**](PdfApi.md#put_polygon_annotation) | **PUT** /pdf/\{name}/annotations/polygon/\{annotationId} | Replace document polygon annotation [**put_privileges**](PdfApi.md#put_privileges) | **PUT** /pdf/\{name}/privileges | Update privilege document. [**put_ps_in_storage_to_pdf**](PdfApi.md#put_ps_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/ps | Convert PS file (located on storage) to PDF format and upload resulting file to storage. [**put_replace_image**](PdfApi.md#put_replace_image) | **PUT** /pdf/\{name}/images/\{imageId} | Replace document image. [**put_searchable_document**](PdfApi.md#put_searchable_document) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document. [**put_set_property**](PdfApi.md#put_set_property) | **PUT** /pdf/\{name}/documentproperties/\{propertyName} | Add/update document property. +[**put_square_annotation**](PdfApi.md#put_square_annotation) | **PUT** /pdf/\{name}/annotations/square/\{annotationId} | Replace document square annotation [**put_svg_in_storage_to_pdf**](PdfApi.md#put_svg_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/svg | Convert SVG file (located on storage) to PDF format and upload resulting file to storage. [**put_text_annotation**](PdfApi.md#put_text_annotation) | **PUT** /pdf/\{name}/annotations/text/\{annotationId} | Replace document text annotation [**put_update_field**](PdfApi.md#put_update_field) | **PUT** /pdf/\{name}/fields/\{fieldName} | Update field. @@ -433,6 +458,31 @@ Name | Type | Description | Notes +# **get_circle_annotation** +> CircleAnnotationResponse get_circle_annotation(name, annotation_id, opts) + +Read document page circle annotation by ID. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**CircleAnnotationResponse**](CircleAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_document** > DocumentResponse get_document(name, opts) @@ -555,6 +605,30 @@ Name | Type | Description | Notes +# **get_document_circle_annotations** +> CircleAnnotationsResponse get_document_circle_annotations(name, opts) + +Read document circle annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**CircleAnnotationsResponse**](CircleAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_document_free_text_annotations** > FreeTextAnnotationsResponse get_document_free_text_annotations(name, opts) @@ -579,6 +653,78 @@ Name | Type | Description | Notes +# **get_document_line_annotations** +> LineAnnotationsResponse get_document_line_annotations(name, opts) + +Read document line annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**LineAnnotationsResponse**](LineAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **get_document_poly_line_annotations** +> PolyLineAnnotationsResponse get_document_poly_line_annotations(name, opts) + +Read document polyline annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolyLineAnnotationsResponse**](PolyLineAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **get_document_polygon_annotations** +> PolygonAnnotationsResponse get_document_polygon_annotations(name, opts) + +Read document polygon annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolygonAnnotationsResponse**](PolygonAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_document_properties** > DocumentPropertiesResponse get_document_properties(name, opts) @@ -628,6 +774,30 @@ Name | Type | Description | Notes +# **get_document_square_annotations** +> SquareAnnotationsResponse get_document_square_annotations(name, opts) + +Read document square annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**SquareAnnotationsResponse**](SquareAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_document_text_annotations** > TextAnnotationsResponse get_document_text_annotations(name, opts) @@ -1010,6 +1180,31 @@ Name | Type | Description | Notes +# **get_line_annotation** +> LineAnnotationResponse get_line_annotation(name, annotation_id, opts) + +Read document page line annotation by ID. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**LineAnnotationResponse**](LineAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_link_annotation** > LinkAnnotationResponse get_link_annotation(name, link_id, opts) @@ -1108,6 +1303,31 @@ Name | Type | Description | Notes +# **get_page_circle_annotations** +> CircleAnnotationsResponse get_page_circle_annotations(name, page_number, opts) + +Read document page circle annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**CircleAnnotationsResponse**](CircleAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_page_convert_to_bmp** > File get_page_convert_to_bmp(name, page_number, opts) @@ -1295,6 +1515,31 @@ Name | Type | Description | Notes +# **get_page_line_annotations** +> LineAnnotationsResponse get_page_line_annotations(name, page_number, opts) + +Read document page line annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**LineAnnotationsResponse**](LineAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_page_link_annotation** > LinkAnnotationResponse get_page_link_annotation(name, page_number, link_id, opts) @@ -1346,6 +1591,81 @@ Name | Type | Description | Notes +# **get_page_poly_line_annotations** +> PolyLineAnnotationsResponse get_page_poly_line_annotations(name, page_number, opts) + +Read document page polyline annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolyLineAnnotationsResponse**](PolyLineAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **get_page_polygon_annotations** +> PolygonAnnotationsResponse get_page_polygon_annotations(name, page_number, opts) + +Read document page polygon annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolygonAnnotationsResponse**](PolygonAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **get_page_square_annotations** +> SquareAnnotationsResponse get_page_square_annotations(name, page_number, opts) + +Read document page square annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**SquareAnnotationsResponse**](SquareAnnotationsResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **get_page_text** > TextRectsResponse get_page_text(name, page_number, llx, lly, urx, ury, opts) @@ -1723,69 +2043,142 @@ Name | Type | Description | Notes -# **get_pdf_in_storage_to_xls** -> File get_pdf_in_storage_to_xls(name, opts) +# **get_pdf_in_storage_to_xls** +> File get_pdf_in_storage_to_xls(name, opts) + +Converts PDF document (located on storage) to XLS format and returns resulting file in response content + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **insert_blank_column_at_first** | **BOOLEAN**| Insert blank column at first | [optional] + **minimize_the_number_of_worksheets** | **BOOLEAN**| Minimize the number of worksheets | [optional] + **scale_factor** | **Float**| Scale factor | [optional] + **uniform_worksheets** | **BOOLEAN**| Uniform worksheets | [optional] + **folder** | **String**| The document folder. | [optional] + **storage** | **String**| The document storage. | [optional] + +### Return type + +**File** + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: multipart/form-data + + + +# **get_pdf_in_storage_to_xml** +> File get_pdf_in_storage_to_xml(name, opts) + +Converts PDF document (located on storage) to XML format and returns resulting file in response content + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **folder** | **String**| The document folder. | [optional] + **storage** | **String**| The document storage. | [optional] + +### Return type + +**File** + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: multipart/form-data + + + +# **get_pdf_in_storage_to_xps** +> File get_pdf_in_storage_to_xps(name, opts) + +Converts PDF document (located on storage) to XPS format and returns resulting file in response content + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **folder** | **String**| The document folder. | [optional] + **storage** | **String**| The document storage. | [optional] + +### Return type + +**File** + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: multipart/form-data + + + +# **get_poly_line_annotation** +> PolyLineAnnotationResponse get_poly_line_annotation(name, annotation_id, opts) -Converts PDF document (located on storage) to XLS format and returns resulting file in response content +Read document page polyline annotation by ID. ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **name** | **String**| The document name. | - **insert_blank_column_at_first** | **BOOLEAN**| Insert blank column at first | [optional] - **minimize_the_number_of_worksheets** | **BOOLEAN**| Minimize the number of worksheets | [optional] - **scale_factor** | **Float**| Scale factor | [optional] - **uniform_worksheets** | **BOOLEAN**| Uniform worksheets | [optional] - **folder** | **String**| The document folder. | [optional] + **annotation_id** | **String**| The annotation ID. | **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] ### Return type -**File** +[**PolyLineAnnotationResponse**](PolyLineAnnotationResponse.md) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: multipart/form-data + - **Accept**: application/json -# **get_pdf_in_storage_to_xml** -> File get_pdf_in_storage_to_xml(name, opts) +# **get_polygon_annotation** +> PolygonAnnotationResponse get_polygon_annotation(name, annotation_id, opts) -Converts PDF document (located on storage) to XML format and returns resulting file in response content +Read document page polygon annotation by ID. ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **name** | **String**| The document name. | - **folder** | **String**| The document folder. | [optional] + **annotation_id** | **String**| The annotation ID. | **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] ### Return type -**File** +[**PolygonAnnotationResponse**](PolygonAnnotationResponse.md) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: multipart/form-data + - **Accept**: application/json -# **get_pdf_in_storage_to_xps** -> File get_pdf_in_storage_to_xps(name, opts) +# **get_ps_in_storage_to_pdf** +> File get_ps_in_storage_to_pdf(src_path, opts) -Converts PDF document (located on storage) to XPS format and returns resulting file in response content +Convert PS file (located on storage) to PDF format and return resulting file in response. ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **String**| The document name. | - **folder** | **String**| The document folder. | [optional] + **src_path** | **String**| Full source filename (ex. /folder1/folder2/template.ps) | **storage** | **String**| The document storage. | [optional] ### Return type @@ -1799,26 +2192,28 @@ Name | Type | Description | Notes -# **get_ps_in_storage_to_pdf** -> File get_ps_in_storage_to_pdf(src_path, opts) +# **get_square_annotation** +> SquareAnnotationResponse get_square_annotation(name, annotation_id, opts) -Convert PS file (located on storage) to PDF format and return resulting file in response. +Read document page square annotation by ID. ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **src_path** | **String**| Full source filename (ex. /folder1/folder2/template.ps) | + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] ### Return type -**File** +[**SquareAnnotationResponse**](SquareAnnotationResponse.md) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: multipart/form-data + - **Accept**: application/json @@ -2243,6 +2638,32 @@ Name | Type | Description | Notes +# **post_page_circle_annotations** +> AsposeResponse post_page_circle_annotations(name, page_number, annotations, opts) + +Add document page circle annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **annotations** | [**Array<CircleAnnotation>**](CircleAnnotation.md)| The array of annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **post_page_free_text_annotations** > AsposeResponse post_page_free_text_annotations(name, page_number, annotations, opts) @@ -2269,6 +2690,32 @@ Name | Type | Description | Notes +# **post_page_line_annotations** +> AsposeResponse post_page_line_annotations(name, page_number, annotations, opts) + +Add document page line annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **annotations** | [**Array<LineAnnotation>**](LineAnnotation.md)| The array of annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **post_page_link_annotations** > AsposeResponse post_page_link_annotations(name, page_number, links, opts) @@ -2295,6 +2742,84 @@ Name | Type | Description | Notes +# **post_page_poly_line_annotations** +> AsposeResponse post_page_poly_line_annotations(name, page_number, annotations, opts) + +Add document page polyline annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **annotations** | [**Array<PolyLineAnnotation>**](PolyLineAnnotation.md)| The array of annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **post_page_polygon_annotations** +> AsposeResponse post_page_polygon_annotations(name, page_number, annotations, opts) + +Add document page polygon annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **annotations** | [**Array<PolygonAnnotation>**](PolygonAnnotation.md)| The array of annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **post_page_square_annotations** +> AsposeResponse post_page_square_annotations(name, page_number, annotations, opts) + +Add document page square annotations. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **page_number** | **Integer**| The page number. | + **annotations** | [**Array<SquareAnnotation>**](SquareAnnotation.md)| The array of annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **post_page_text_annotations** > AsposeResponse post_page_text_annotations(name, page_number, annotations, opts) @@ -2475,6 +3000,32 @@ Name | Type | Description | Notes +# **put_circle_annotation** +> CircleAnnotationResponse put_circle_annotation(name, annotation_id, annotation, opts) + +Replace document circle annotation + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **annotation** | [**CircleAnnotation**](CircleAnnotation.md)| Annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**CircleAnnotationResponse**](CircleAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **put_create** > AsposeResponse put_create(path, file, opts) @@ -2906,6 +3457,32 @@ Name | Type | Description | Notes +# **put_line_annotation** +> LineAnnotationResponse put_line_annotation(name, annotation_id, annotation, opts) + +Replace document line annotation + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **annotation** | [**LineAnnotation**](LineAnnotation.md)| Annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**LineAnnotationResponse**](LineAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **put_link_annotation** > LinkAnnotationResponse put_link_annotation(name, link_id, link, opts) @@ -3909,6 +4486,58 @@ Name | Type | Description | Notes +# **put_poly_line_annotation** +> PolyLineAnnotationResponse put_poly_line_annotation(name, annotation_id, annotation, opts) + +Replace document polyline annotation + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **annotation** | [**PolyLineAnnotation**](PolyLineAnnotation.md)| Annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolyLineAnnotationResponse**](PolyLineAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + +# **put_polygon_annotation** +> PolygonAnnotationResponse put_polygon_annotation(name, annotation_id, annotation, opts) + +Replace document polygon annotation + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **annotation** | [**PolygonAnnotation**](PolygonAnnotation.md)| Annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**PolygonAnnotationResponse**](PolygonAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **put_privileges** > AsposeResponse put_privileges(name, opts) @@ -4037,6 +4666,32 @@ Name | Type | Description | Notes +# **put_square_annotation** +> SquareAnnotationResponse put_square_annotation(name, annotation_id, annotation, opts) + +Replace document square annotation + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| The document name. | + **annotation_id** | **String**| The annotation ID. | + **annotation** | [**SquareAnnotation**](SquareAnnotation.md)| Annotation. | + **storage** | **String**| The document storage. | [optional] + **folder** | **String**| The document folder. | [optional] + +### Return type + +[**SquareAnnotationResponse**](SquareAnnotationResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + + # **put_svg_in_storage_to_pdf** > AsposeResponse put_svg_in_storage_to_pdf(name, src_path, opts) diff --git a/docs/Point.md b/docs/Point.md new file mode 100644 index 0000000..ef7ef9f --- /dev/null +++ b/docs/Point.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::Point +Represent point with fractional coordinates. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**x** | **Float** | X coordinate value. | +**y** | **Float** | Y coordinate value. | + + diff --git a/docs/PolyAnnotation.md b/docs/PolyAnnotation.md new file mode 100644 index 0000000..8c32dfb --- /dev/null +++ b/docs/PolyAnnotation.md @@ -0,0 +1,28 @@ +# AsposePdfCloud::PolyAnnotation +Provides PolyAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Gets or sets the interior color with which to fill the annotation?s line endings. | [optional] +**starting_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of first line ending. | [optional] +**ending_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of second line ending. | [optional] +**intent** | [**PolyIntent**](PolyIntent.md) | Gets or sets the intent of the polygon or polyline annotation. | [optional] +**vertices** | [**Array<Point>**](Point.md) | Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. | [optional] + + diff --git a/docs/PolyIntent.md b/docs/PolyIntent.md new file mode 100644 index 0000000..13ceb4a --- /dev/null +++ b/docs/PolyIntent.md @@ -0,0 +1,13 @@ +# AsposePdfCloud::PolyIntent +Enumerates the intents of the polygon or polyline annotation. + +## Enum +Name | Type | Value +------------ | ------------- | ------------- +**UNDEFINED** | **String** | 'Undefined' +**POLYGON_CLOUD** | **String** | 'PolygonCloud' +**POLY_LINE_DIMENSION** | **String** | 'PolyLineDimension' +**POLYGON_DIMENSION** | **String** | 'PolygonDimension' + + + diff --git a/docs/PolyLineAnnotation.md b/docs/PolyLineAnnotation.md new file mode 100644 index 0000000..16304d3 --- /dev/null +++ b/docs/PolyLineAnnotation.md @@ -0,0 +1,29 @@ +# AsposePdfCloud::PolyLineAnnotation +Provides PolyLineAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Gets or sets the interior color with which to fill the annotation?s line endings. | [optional] +**starting_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of first line ending. | [optional] +**ending_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of second line ending. | [optional] +**intent** | [**PolyIntent**](PolyIntent.md) | Gets or sets the intent of the polygon or polyline annotation. | [optional] +**vertices** | [**Array<Point>**](Point.md) | Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] + + diff --git a/docs/PolyLineAnnotationResponse.md b/docs/PolyLineAnnotationResponse.md new file mode 100644 index 0000000..326e59a --- /dev/null +++ b/docs/PolyLineAnnotationResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::PolyLineAnnotationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotation** | [**PolyLineAnnotation**](PolyLineAnnotation.md) | | [optional] + + diff --git a/docs/PolyLineAnnotations.md b/docs/PolyLineAnnotations.md new file mode 100644 index 0000000..32354ca --- /dev/null +++ b/docs/PolyLineAnnotations.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::PolyLineAnnotations +List of annotations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**list** | [**Array<PolyLineAnnotation>**](PolyLineAnnotation.md) | | [optional] + + diff --git a/docs/PolyLineAnnotationsResponse.md b/docs/PolyLineAnnotationsResponse.md new file mode 100644 index 0000000..e7fe0c5 --- /dev/null +++ b/docs/PolyLineAnnotationsResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::PolyLineAnnotationsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotations** | [**PolyLineAnnotations**](PolyLineAnnotations.md) | | [optional] + + diff --git a/docs/PolygonAnnotation.md b/docs/PolygonAnnotation.md new file mode 100644 index 0000000..3f8552e --- /dev/null +++ b/docs/PolygonAnnotation.md @@ -0,0 +1,29 @@ +# AsposePdfCloud::PolygonAnnotation +Provides PolygonAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Gets or sets the interior color with which to fill the annotation?s line endings. | [optional] +**starting_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of first line ending. | [optional] +**ending_style** | [**LineEnding**](LineEnding.md) | Gets or sets the style of second line ending. | [optional] +**intent** | [**PolyIntent**](PolyIntent.md) | Gets or sets the intent of the polygon or polyline annotation. | [optional] +**vertices** | [**Array<Point>**](Point.md) | Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] + + diff --git a/docs/PolygonAnnotationResponse.md b/docs/PolygonAnnotationResponse.md new file mode 100644 index 0000000..ada76e1 --- /dev/null +++ b/docs/PolygonAnnotationResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::PolygonAnnotationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotation** | [**PolygonAnnotation**](PolygonAnnotation.md) | | [optional] + + diff --git a/docs/PolygonAnnotations.md b/docs/PolygonAnnotations.md new file mode 100644 index 0000000..f3b4631 --- /dev/null +++ b/docs/PolygonAnnotations.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::PolygonAnnotations +List of annotations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**list** | [**Array<PolygonAnnotation>**](PolygonAnnotation.md) | | [optional] + + diff --git a/docs/PolygonAnnotationsResponse.md b/docs/PolygonAnnotationsResponse.md new file mode 100644 index 0000000..96a2816 --- /dev/null +++ b/docs/PolygonAnnotationsResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::PolygonAnnotationsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotations** | [**PolygonAnnotations**](PolygonAnnotations.md) | | [optional] + + diff --git a/docs/SquareAnnotation.md b/docs/SquareAnnotation.md new file mode 100644 index 0000000..ece0e6b --- /dev/null +++ b/docs/SquareAnnotation.md @@ -0,0 +1,26 @@ +# AsposePdfCloud::SquareAnnotation +Provides SquareAnnotation. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**contents** | **String** | Get the annotation content. | [optional] +**creation_date** | **String** | The date and time when the annotation was created. | [optional] +**subject** | **String** | Get the annotation subject. | [optional] +**title** | **String** | Get the annotation title. | [optional] +**modified** | **String** | The date and time when the annotation was last modified. | [optional] +**id** | **String** | Gets ID of the annotation. | [optional] +**flags** | [**Array<AnnotationFlags>**](AnnotationFlags.md) | Gets Flags of the annotation. | [optional] +**name** | **String** | Gets Name of the annotation. | [optional] +**rect** | [**RectanglePdf**](RectanglePdf.md) | Gets Rect of the annotation. | [optional] +**page_index** | **Integer** | Gets PageIndex of the annotation. | [optional] +**z_index** | **Integer** | Gets ZIndex of the annotation. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the annotation. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the annotation. | [optional] +**rich_text** | **String** | Get the annotation RichText. | [optional] +**interior_color** | [**Color**](Color.md) | Get the annotation InteriorColor. | [optional] +**frame** | [**RectanglePdf**](RectanglePdf.md) | Get or set the annotation Rectangle of frame. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] + + diff --git a/docs/SquareAnnotationResponse.md b/docs/SquareAnnotationResponse.md new file mode 100644 index 0000000..12d2357 --- /dev/null +++ b/docs/SquareAnnotationResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::SquareAnnotationResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotation** | [**SquareAnnotation**](SquareAnnotation.md) | | [optional] + + diff --git a/docs/SquareAnnotations.md b/docs/SquareAnnotations.md new file mode 100644 index 0000000..0382dd8 --- /dev/null +++ b/docs/SquareAnnotations.md @@ -0,0 +1,10 @@ +# AsposePdfCloud::SquareAnnotations +List of annotations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**Array<Link>**](Link.md) | Link to the document. | [optional] +**list** | [**Array<SquareAnnotation>**](SquareAnnotation.md) | | [optional] + + diff --git a/docs/SquareAnnotationsResponse.md b/docs/SquareAnnotationsResponse.md new file mode 100644 index 0000000..83bb9da --- /dev/null +++ b/docs/SquareAnnotationsResponse.md @@ -0,0 +1,11 @@ +# AsposePdfCloud::SquareAnnotationsResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Integer** | Response status code. | +**status** | **String** | Response status. | [optional] +**annotations** | [**SquareAnnotations**](SquareAnnotations.md) | | [optional] + + diff --git a/lib/aspose_pdf_cloud.rb b/lib/aspose_pdf_cloud.rb index d116576..17ea4ce 100644 --- a/lib/aspose_pdf_cloud.rb +++ b/lib/aspose_pdf_cloud.rb @@ -32,6 +32,7 @@ require_relative 'aspose_pdf_cloud/models/antialiasing_processing_type' require_relative 'aspose_pdf_cloud/models/append_document' require_relative 'aspose_pdf_cloud/models/aspose_response' +require_relative 'aspose_pdf_cloud/models/caption_position' require_relative 'aspose_pdf_cloud/models/color' require_relative 'aspose_pdf_cloud/models/color_depth' require_relative 'aspose_pdf_cloud/models/compression_type' @@ -52,6 +53,8 @@ require_relative 'aspose_pdf_cloud/models/image_templates_request' require_relative 'aspose_pdf_cloud/models/justification' require_relative 'aspose_pdf_cloud/models/letters_positioning_methods' +require_relative 'aspose_pdf_cloud/models/line_ending' +require_relative 'aspose_pdf_cloud/models/line_intent' require_relative 'aspose_pdf_cloud/models/line_spacing' require_relative 'aspose_pdf_cloud/models/link' require_relative 'aspose_pdf_cloud/models/link_action_type' @@ -64,6 +67,8 @@ require_relative 'aspose_pdf_cloud/models/paragraph' require_relative 'aspose_pdf_cloud/models/parts_embedding_modes' require_relative 'aspose_pdf_cloud/models/pdf_a_type' +require_relative 'aspose_pdf_cloud/models/point' +require_relative 'aspose_pdf_cloud/models/poly_intent' require_relative 'aspose_pdf_cloud/models/raster_images_saving_modes' require_relative 'aspose_pdf_cloud/models/rectangle_pdf' require_relative 'aspose_pdf_cloud/models/rotation' @@ -93,6 +98,9 @@ require_relative 'aspose_pdf_cloud/models/attachment_response' require_relative 'aspose_pdf_cloud/models/attachments' require_relative 'aspose_pdf_cloud/models/attachments_response' +require_relative 'aspose_pdf_cloud/models/circle_annotation_response' +require_relative 'aspose_pdf_cloud/models/circle_annotations' +require_relative 'aspose_pdf_cloud/models/circle_annotations_response' require_relative 'aspose_pdf_cloud/models/document' require_relative 'aspose_pdf_cloud/models/document_page_response' require_relative 'aspose_pdf_cloud/models/document_pages_response' @@ -112,15 +120,27 @@ require_relative 'aspose_pdf_cloud/models/image_response' require_relative 'aspose_pdf_cloud/models/images' require_relative 'aspose_pdf_cloud/models/images_response' +require_relative 'aspose_pdf_cloud/models/line_annotation_response' +require_relative 'aspose_pdf_cloud/models/line_annotations' +require_relative 'aspose_pdf_cloud/models/line_annotations_response' require_relative 'aspose_pdf_cloud/models/link_annotation' require_relative 'aspose_pdf_cloud/models/link_annotation_response' require_relative 'aspose_pdf_cloud/models/link_annotations' require_relative 'aspose_pdf_cloud/models/link_annotations_response' require_relative 'aspose_pdf_cloud/models/page' require_relative 'aspose_pdf_cloud/models/pages' +require_relative 'aspose_pdf_cloud/models/poly_line_annotation_response' +require_relative 'aspose_pdf_cloud/models/poly_line_annotations' +require_relative 'aspose_pdf_cloud/models/poly_line_annotations_response' +require_relative 'aspose_pdf_cloud/models/polygon_annotation_response' +require_relative 'aspose_pdf_cloud/models/polygon_annotations' +require_relative 'aspose_pdf_cloud/models/polygon_annotations_response' require_relative 'aspose_pdf_cloud/models/signature_verify_response' require_relative 'aspose_pdf_cloud/models/split_result_document' require_relative 'aspose_pdf_cloud/models/split_result_response' +require_relative 'aspose_pdf_cloud/models/square_annotation_response' +require_relative 'aspose_pdf_cloud/models/square_annotations' +require_relative 'aspose_pdf_cloud/models/square_annotations_response' require_relative 'aspose_pdf_cloud/models/text_annotation_response' require_relative 'aspose_pdf_cloud/models/text_annotations' require_relative 'aspose_pdf_cloud/models/text_annotations_response' @@ -129,8 +149,15 @@ require_relative 'aspose_pdf_cloud/models/word_count_response' require_relative 'aspose_pdf_cloud/models/annotation_info' require_relative 'aspose_pdf_cloud/models/markup_annotation' +require_relative 'aspose_pdf_cloud/models/common_figure_annotation' require_relative 'aspose_pdf_cloud/models/free_text_annotation' +require_relative 'aspose_pdf_cloud/models/line_annotation' +require_relative 'aspose_pdf_cloud/models/poly_annotation' require_relative 'aspose_pdf_cloud/models/text_annotation' +require_relative 'aspose_pdf_cloud/models/circle_annotation' +require_relative 'aspose_pdf_cloud/models/poly_line_annotation' +require_relative 'aspose_pdf_cloud/models/polygon_annotation' +require_relative 'aspose_pdf_cloud/models/square_annotation' # APIs require_relative 'aspose_pdf_cloud/api/pdf_api' diff --git a/lib/aspose_pdf_cloud/api/pdf_api.rb b/lib/aspose_pdf_cloud/api/pdf_api.rb index eb833aa..627633b 100644 --- a/lib/aspose_pdf_cloud/api/pdf_api.rb +++ b/lib/aspose_pdf_cloud/api/pdf_api.rb @@ -872,6 +872,84 @@ def delete_property_with_http_info(name, property_name, opts = {}) return data, status_code, headers end + # Read document page circle annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [CircleAnnotationResponse] + def get_circle_annotation(name, annotation_id, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_circle_annotation_with_http_info(name, annotation_id, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_circle_annotation_with_http_info(name, annotation_id, opts) + else + raise + end + return data + end + + # Read document page circle annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(CircleAnnotationResponse, Fixnum, Hash)>] CircleAnnotationResponse data, response status code and response headers + def get_circle_annotation_with_http_info(name, annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_circle_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_circle_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_circle_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/circle/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'CircleAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_circle_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Read common document info. # # @param name The document name. @@ -1241,43 +1319,43 @@ def get_document_bookmarks_with_http_info(name, opts = {}) return data, status_code, headers end - # Read document free text annotations. + # Read document circle annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [FreeTextAnnotationsResponse] - def get_document_free_text_annotations(name, opts = {}) + # @return [CircleAnnotationsResponse] + def get_document_circle_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts) + data, _status_code, _headers = get_document_circle_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts) + data, _status_code, _headers = get_document_circle_annotations_with_http_info(name, opts) else raise end return data end - # Read document free text annotations. + # Read document circle annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(FreeTextAnnotationsResponse, Fixnum, Hash)>] FreeTextAnnotationsResponse data, response status code and response headers - def get_document_free_text_annotations_with_http_info(name, opts = {}) + # @return [Array<(CircleAnnotationsResponse, Fixnum, Hash)>] CircleAnnotationsResponse data, response status code and response headers + def get_document_circle_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_document_free_text_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_circle_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_circle_annotations" end # resource path - local_var_path = "/pdf/{name}/annotations/freetext".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/annotations/circle".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1306,50 +1384,50 @@ def get_document_free_text_annotations_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'FreeTextAnnotationsResponse') + :return_type => 'CircleAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_document_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document properties. + # Read document free text annotations. # - # @param name + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [DocumentPropertiesResponse] - def get_document_properties(name, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [FreeTextAnnotationsResponse] + def get_document_free_text_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_document_properties_with_http_info(name, opts) + data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_document_properties_with_http_info(name, opts) + data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts) else raise end return data end - # Read document properties. + # Read document free text annotations. # - # @param name + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [Array<(DocumentPropertiesResponse, Fixnum, Hash)>] DocumentPropertiesResponse data, response status code and response headers - def get_document_properties_with_http_info(name, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(FreeTextAnnotationsResponse, Fixnum, Hash)>] FreeTextAnnotationsResponse data, response status code and response headers + def get_document_free_text_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_document_properties ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_free_text_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_properties" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_free_text_annotations" end # resource path - local_var_path = "/pdf/{name}/documentproperties".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/annotations/freetext".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1378,56 +1456,50 @@ def get_document_properties_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DocumentPropertiesResponse') + :return_type => 'FreeTextAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_document_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document property by name. + # Read document line annotations. # - # @param name - # @param property_name + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [DocumentPropertyResponse] - def get_document_property(name, property_name, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [LineAnnotationsResponse] + def get_document_line_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts) + data, _status_code, _headers = get_document_line_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts) + data, _status_code, _headers = get_document_line_annotations_with_http_info(name, opts) else raise end return data end - # Read document property by name. + # Read document line annotations. # - # @param name - # @param property_name + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [Array<(DocumentPropertyResponse, Fixnum, Hash)>] DocumentPropertyResponse data, response status code and response headers - def get_document_property_with_http_info(name, property_name, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(LineAnnotationsResponse, Fixnum, Hash)>] LineAnnotationsResponse data, response status code and response headers + def get_document_line_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_document_property ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_property" - end - # verify the required parameter 'property_name' is set - if @api_client.config.client_side_validation && property_name.nil? - fail ArgumentError, "Missing the required parameter 'property_name' when calling PdfApi.get_document_property" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_line_annotations" end # resource path - local_var_path = "/pdf/{name}/documentproperties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s) + local_var_path = "/pdf/{name}/annotations/line".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1456,50 +1528,50 @@ def get_document_property_with_http_info(name, property_name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DocumentPropertyResponse') + :return_type => 'LineAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_document_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document text annotations. + # Read document polyline annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [TextAnnotationsResponse] - def get_document_text_annotations(name, opts = {}) + # @return [PolyLineAnnotationsResponse] + def get_document_poly_line_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts) + data, _status_code, _headers = get_document_poly_line_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts) + data, _status_code, _headers = get_document_poly_line_annotations_with_http_info(name, opts) else raise end return data end - # Read document text annotations. + # Read document polyline annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(TextAnnotationsResponse, Fixnum, Hash)>] TextAnnotationsResponse data, response status code and response headers - def get_document_text_annotations_with_http_info(name, opts = {}) + # @return [Array<(PolyLineAnnotationsResponse, Fixnum, Hash)>] PolyLineAnnotationsResponse data, response status code and response headers + def get_document_poly_line_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_document_text_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_poly_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_text_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_poly_line_annotations" end # resource path - local_var_path = "/pdf/{name}/annotations/text".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/annotations/polyline".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1528,61 +1600,60 @@ def get_document_text_annotations_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextAnnotationsResponse') + :return_type => 'PolyLineAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_document_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Download a specific file + # Read document polygon annotations. # - # @param path Path of the file including the file name and extension e.g. /file.ext + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :version_id File's version - # @option opts [String] :storage User's storage name - # @return [File] - def get_download(path, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [PolygonAnnotationsResponse] + def get_document_polygon_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_download_with_http_info(path, opts) + data, _status_code, _headers = get_document_polygon_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_download_with_http_info(path, opts) + data, _status_code, _headers = get_document_polygon_annotations_with_http_info(name, opts) else raise end return data end - # Download a specific file + # Read document polygon annotations. # - # @param path Path of the file including the file name and extension e.g. /file.ext + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :version_id File's version - # @option opts [String] :storage User's storage name - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_download_with_http_info(path, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(PolygonAnnotationsResponse, Fixnum, Hash)>] PolygonAnnotationsResponse data, response status code and response headers + def get_document_polygon_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_download ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_polygon_annotations ..." end - # verify the required parameter 'path' is set - if @api_client.config.client_side_validation && path.nil? - fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.get_download" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_polygon_annotations" end # resource path - local_var_path = "/storage/file" + local_var_path = "/pdf/{name}/annotations/polygon".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'path'] = path - query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -1601,56 +1672,50 @@ def get_download_with_http_info(path, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'PolygonAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Download document attachment content by its index. + # Read document properties. # - # @param name The document name. - # @param attachment_index The attachment index. + # @param name # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [File] - def get_download_document_attachment_by_index(name, attachment_index, opts = {}) + # @option opts [String] :storage + # @option opts [String] :folder + # @return [DocumentPropertiesResponse] + def get_document_properties(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts) + data, _status_code, _headers = get_document_properties_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts) + data, _status_code, _headers = get_document_properties_with_http_info(name, opts) else raise end return data end - # Download document attachment content by its index. + # Read document properties. # - # @param name The document name. - # @param attachment_index The attachment index. + # @param name # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts = {}) + # @option opts [String] :storage + # @option opts [String] :folder + # @return [Array<(DocumentPropertiesResponse, Fixnum, Hash)>] DocumentPropertiesResponse data, response status code and response headers + def get_document_properties_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_download_document_attachment_by_index ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_properties ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_download_document_attachment_by_index" - end - # verify the required parameter 'attachment_index' is set - if @api_client.config.client_side_validation && attachment_index.nil? - fail ArgumentError, "Missing the required parameter 'attachment_index' when calling PdfApi.get_download_document_attachment_by_index" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_properties" end # resource path - local_var_path = "/pdf/{name}/attachments/{attachmentIndex}/download".sub('{' + 'name' + '}', name.to_s).sub('{' + 'attachmentIndex' + '}', attachment_index.to_s) + local_var_path = "/pdf/{name}/documentproperties".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1660,7 +1725,7 @@ def get_download_document_attachment_by_index_with_http_info(name, attachment_in # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -1679,58 +1744,66 @@ def get_download_document_attachment_by_index_with_http_info(name, attachment_in :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'DocumentPropertiesResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_download_document_attachment_by_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert EPUB file (located on storage) to PDF format and return resulting file in response. + # Read document property by name. # - # @param src_path Full source filename (ex. /folder1/folder2/template.epub) + # @param name + # @param property_name # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @return [File] - def get_epub_in_storage_to_pdf(src_path, opts = {}) + # @option opts [String] :storage + # @option opts [String] :folder + # @return [DocumentPropertyResponse] + def get_document_property(name, property_name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts) else raise end return data end - # Convert EPUB file (located on storage) to PDF format and return resulting file in response. + # Read document property by name. # - # @param src_path Full source filename (ex. /folder1/folder2/template.epub) + # @param name + # @param property_name # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_epub_in_storage_to_pdf_with_http_info(src_path, opts = {}) + # @option opts [String] :storage + # @option opts [String] :folder + # @return [Array<(DocumentPropertyResponse, Fixnum, Hash)>] DocumentPropertyResponse data, response status code and response headers + def get_document_property_with_http_info(name, property_name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_epub_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_property ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_epub_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_property" + end + # verify the required parameter 'property_name' is set + if @api_client.config.client_side_validation && property_name.nil? + fail ArgumentError, "Missing the required parameter 'property_name' when calling PdfApi.get_document_property" end # resource path - local_var_path = "/pdf/create/epub" + local_var_path = "/pdf/{name}/documentproperties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -1749,56 +1822,50 @@ def get_epub_in_storage_to_pdf_with_http_info(src_path, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'DocumentPropertyResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_epub_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get document field by name. + # Read document square annotations. # # @param name The document name. - # @param field_name The field name/ # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [FieldResponse] - def get_field(name, field_name, opts = {}) + # @return [SquareAnnotationsResponse] + def get_document_square_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_field_with_http_info(name, field_name, opts) + data, _status_code, _headers = get_document_square_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_field_with_http_info(name, field_name, opts) + data, _status_code, _headers = get_document_square_annotations_with_http_info(name, opts) else raise end return data end - # Get document field by name. + # Read document square annotations. # # @param name The document name. - # @param field_name The field name/ # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(FieldResponse, Fixnum, Hash)>] FieldResponse data, response status code and response headers - def get_field_with_http_info(name, field_name, opts = {}) + # @return [Array<(SquareAnnotationsResponse, Fixnum, Hash)>] SquareAnnotationsResponse data, response status code and response headers + def get_document_square_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_field ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_square_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_field" - end - # verify the required parameter 'field_name' is set - if @api_client.config.client_side_validation && field_name.nil? - fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_field" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_square_annotations" end # resource path - local_var_path = "/pdf/{name}/fields/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s) + local_var_path = "/pdf/{name}/annotations/square".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1827,50 +1894,50 @@ def get_field_with_http_info(name, field_name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'FieldResponse') + :return_type => 'SquareAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get document fields. + # Read document text annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [FieldsResponse] - def get_fields(name, opts = {}) + # @return [TextAnnotationsResponse] + def get_document_text_annotations(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_fields_with_http_info(name, opts) + data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_fields_with_http_info(name, opts) + data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts) else raise end return data end - # Get document fields. + # Read document text annotations. # # @param name The document name. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(FieldsResponse, Fixnum, Hash)>] FieldsResponse data, response status code and response headers - def get_fields_with_http_info(name, opts = {}) + # @return [Array<(TextAnnotationsResponse, Fixnum, Hash)>] TextAnnotationsResponse data, response status code and response headers + def get_document_text_annotations_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_fields ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_document_text_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_fields" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_text_annotations" end # resource path - local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/annotations/text".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} @@ -1899,66 +1966,61 @@ def get_fields_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'FieldsResponse') + :return_type => 'TextAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_document_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page free text annotation by ID. + # Download a specific file # - # @param name The document name. - # @param annotation_id The annotation ID. + # @param path Path of the file including the file name and extension e.g. /file.ext # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [FreeTextAnnotationResponse] - def get_free_text_annotation(name, annotation_id, opts = {}) + # @option opts [String] :version_id File's version + # @option opts [String] :storage User's storage name + # @return [File] + def get_download(path, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts) + data, _status_code, _headers = get_download_with_http_info(path, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts) + data, _status_code, _headers = get_download_with_http_info(path, opts) else raise end return data end - # Read document page free text annotation by ID. + # Download a specific file # - # @param name The document name. - # @param annotation_id The annotation ID. + # @param path Path of the file including the file name and extension e.g. /file.ext # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [Array<(FreeTextAnnotationResponse, Fixnum, Hash)>] FreeTextAnnotationResponse data, response status code and response headers - def get_free_text_annotation_with_http_info(name, annotation_id, opts = {}) + # @option opts [String] :version_id File's version + # @option opts [String] :storage User's storage name + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_download_with_http_info(path, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_free_text_annotation ..." - end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_free_text_annotation" + @api_client.config.logger.debug "Calling API: PdfApi.get_download ..." end - # verify the required parameter 'annotation_id' is set - if @api_client.config.client_side_validation && annotation_id.nil? - fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_free_text_annotation" + # verify the required parameter 'path' is set + if @api_client.config.client_side_validation && path.nil? + fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.get_download" end # resource path - local_var_path = "/pdf/{name}/annotations/freetext/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + local_var_path = "/storage/file" # query parameters query_params = {} + query_params[:'path'] = path + query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -1977,81 +2039,61 @@ def get_free_text_annotation_with_http_info(name, annotation_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'FreeTextAnnotationResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_free_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert HTML file (located on storage) to PDF format and return resulting file in response. + # Download document attachment content by its index. # - # @param src_path Full source filename (ex. /folder1/folder2/template.zip) - # @param html_file_name Name of HTML file in ZIP. + # @param name The document name. + # @param attachment_index The attachment index. # @param [Hash] opts the optional parameters - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [File] - def get_html_in_storage_to_pdf(src_path, html_file_name, opts = {}) + def get_download_document_attachment_by_index(name, attachment_index, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts) + data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts) + data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts) else raise end return data end - # Convert HTML file (located on storage) to PDF format and return resulting file in response. + # Download document attachment content by its index. # - # @param src_path Full source filename (ex. /folder1/folder2/template.zip) - # @param html_file_name Name of HTML file in ZIP. + # @param name The document name. + # @param attachment_index The attachment index. # @param [Hash] opts the optional parameters - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts = {}) + def get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_html_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_download_document_attachment_by_index ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_html_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_download_document_attachment_by_index" end - # verify the required parameter 'html_file_name' is set - if @api_client.config.client_side_validation && html_file_name.nil? - fail ArgumentError, "Missing the required parameter 'html_file_name' when calling PdfApi.get_html_in_storage_to_pdf" + # verify the required parameter 'attachment_index' is set + if @api_client.config.client_side_validation && attachment_index.nil? + fail ArgumentError, "Missing the required parameter 'attachment_index' when calling PdfApi.get_download_document_attachment_by_index" end # resource path - local_var_path = "/pdf/create/html" + local_var_path = "/pdf/{name}/attachments/{attachmentIndex}/download".sub('{' + 'name' + '}', name.to_s).sub('{' + 'attachmentIndex' + '}', attachment_index.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path - query_params[:'htmlFileName'] = html_file_name - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? - query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? - query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? - query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? - query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -2077,64 +2119,56 @@ def get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts = { :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_html_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_download_document_attachment_by_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document image by ID. + # Convert EPUB file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param image_id Image ID. + # @param src_path Full source filename (ex. /folder1/folder2/template.epub) # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [ImageResponse] - def get_image(name, image_id, opts = {}) + # @return [File] + def get_epub_in_storage_to_pdf(src_path, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_image_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_image_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts) else raise end return data end - # Read document image by ID. + # Convert EPUB file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param image_id Image ID. + # @param src_path Full source filename (ex. /folder1/folder2/template.epub) # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. - # @return [Array<(ImageResponse, Fixnum, Hash)>] ImageResponse data, response status code and response headers - def get_image_with_http_info(name, image_id, opts = {}) + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_epub_in_storage_to_pdf_with_http_info(src_path, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_image ..." - end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image" + @api_client.config.logger.debug "Calling API: PdfApi.get_epub_in_storage_to_pdf ..." end - # verify the required parameter 'image_id' is set - if @api_client.config.client_side_validation && image_id.nil? - fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image" + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_epub_in_storage_to_pdf" end # resource path - local_var_path = "/pdf/{name}/images/{imageId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) + local_var_path = "/pdf/create/epub" # query parameters query_params = {} + query_params[:'srcPath'] = src_path query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -2153,65 +2187,59 @@ def get_image_with_http_info(name, image_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ImageResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_epub_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Extract document image in GIF format + # Get document field by name. # # @param name The document name. - # @param image_id Image ID. + # @param field_name The field name/ # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [File] - def get_image_extract_as_gif(name, image_id, opts = {}) + # @return [FieldResponse] + def get_field(name, field_name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_field_with_http_info(name, field_name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_field_with_http_info(name, field_name, opts) else raise end return data end - # Extract document image in GIF format + # Get document field by name. # # @param name The document name. - # @param image_id Image ID. + # @param field_name The field name/ # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_image_extract_as_gif_with_http_info(name, image_id, opts = {}) + # @return [Array<(FieldResponse, Fixnum, Hash)>] FieldResponse data, response status code and response headers + def get_field_with_http_info(name, field_name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_gif ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_field ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_gif" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_field" end - # verify the required parameter 'image_id' is set - if @api_client.config.client_side_validation && image_id.nil? - fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_gif" + # verify the required parameter 'field_name' is set + if @api_client.config.client_side_validation && field_name.nil? + fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_field" end # resource path - local_var_path = "/pdf/{name}/images/{imageId}/extract/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) + local_var_path = "/pdf/{name}/fields/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -2237,65 +2265,53 @@ def get_image_extract_as_gif_with_http_info(name, image_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'FieldResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Extract document image in JPEG format + # Get document fields. # # @param name The document name. - # @param image_id Image ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [File] - def get_image_extract_as_jpeg(name, image_id, opts = {}) + # @return [FieldsResponse] + def get_fields(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_fields_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_fields_with_http_info(name, opts) else raise end return data end - # Extract document image in JPEG format + # Get document fields. # # @param name The document name. - # @param image_id Image ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_image_extract_as_jpeg_with_http_info(name, image_id, opts = {}) + # @return [Array<(FieldsResponse, Fixnum, Hash)>] FieldsResponse data, response status code and response headers + def get_fields_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_jpeg ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_fields ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_jpeg" - end - # verify the required parameter 'image_id' is set - if @api_client.config.client_side_validation && image_id.nil? - fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_jpeg" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_fields" end # resource path - local_var_path = "/pdf/{name}/images/{imageId}/extract/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) + local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -2321,65 +2337,59 @@ def get_image_extract_as_jpeg_with_http_info(name, image_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'FieldsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Extract document image in PNG format + # Read document page free text annotation by ID. # # @param name The document name. - # @param image_id Image ID. + # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [File] - def get_image_extract_as_png(name, image_id, opts = {}) + # @return [FreeTextAnnotationResponse] + def get_free_text_annotation(name, annotation_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts) else raise end return data end - # Extract document image in PNG format + # Read document page free text annotation by ID. # # @param name The document name. - # @param image_id Image ID. + # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_image_extract_as_png_with_http_info(name, image_id, opts = {}) + # @return [Array<(FreeTextAnnotationResponse, Fixnum, Hash)>] FreeTextAnnotationResponse data, response status code and response headers + def get_free_text_annotation_with_http_info(name, annotation_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_png ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_free_text_annotation ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_png" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_free_text_annotation" end - # verify the required parameter 'image_id' is set - if @api_client.config.client_side_validation && image_id.nil? - fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_png" + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_free_text_annotation" end # resource path - local_var_path = "/pdf/{name}/images/{imageId}/extract/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) + local_var_path = "/pdf/{name}/annotations/freetext/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -2405,72 +2415,86 @@ def get_image_extract_as_png_with_http_info(name, image_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'FreeTextAnnotationResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_free_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Extract document image in TIFF format + # Convert HTML file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param image_id Image ID. + # @param src_path Full source filename (ex. /folder1/folder2/template.zip) + # @param html_file_name Name of HTML file in ZIP. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. # @return [File] - def get_image_extract_as_tiff(name, image_id, opts = {}) + def get_html_in_storage_to_pdf(src_path, html_file_name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts) + data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts) else raise end return data end - # Extract document image in TIFF format + # Convert HTML file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param image_id Image ID. + # @param src_path Full source filename (ex. /folder1/folder2/template.zip) + # @param html_file_name Name of HTML file in ZIP. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top # @option opts [String] :storage The document storage. - # @option opts [String] :folder The document folder. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_image_extract_as_tiff_with_http_info(name, image_id, opts = {}) + def get_html_in_storage_to_pdf_with_http_info(src_path, html_file_name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_tiff ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_html_in_storage_to_pdf ..." end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_tiff" + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_html_in_storage_to_pdf" end - # verify the required parameter 'image_id' is set - if @api_client.config.client_side_validation && image_id.nil? - fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_tiff" + # verify the required parameter 'html_file_name' is set + if @api_client.config.client_side_validation && html_file_name.nil? + fail ArgumentError, "Missing the required parameter 'html_file_name' when calling PdfApi.get_html_in_storage_to_pdf" end # resource path - local_var_path = "/pdf/{name}/images/{imageId}/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) + local_var_path = "/pdf/create/html" # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'srcPath'] = src_path + query_params[:'htmlFileName'] = html_file_name query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? + query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? + query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? + query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? + query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -2491,54 +2515,54 @@ def get_image_extract_as_tiff_with_http_info(name, image_id, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_html_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document images. + # Read document image by ID. # # @param name The document name. - # @param page_number The page number. + # @param image_id Image ID. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [ImagesResponse] - def get_images(name, page_number, opts = {}) + # @return [ImageResponse] + def get_image(name, image_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_images_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_image_with_http_info(name, image_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_images_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_image_with_http_info(name, image_id, opts) else raise end return data end - # Read document images. + # Read document image by ID. # # @param name The document name. - # @param page_number The page number. + # @param image_id Image ID. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(ImagesResponse, Fixnum, Hash)>] ImagesResponse data, response status code and response headers - def get_images_with_http_info(name, page_number, opts = {}) + # @return [Array<(ImageResponse, Fixnum, Hash)>] ImageResponse data, response status code and response headers + def get_image_with_http_info(name, image_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_images ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_image ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_images" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image" end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_images" + # verify the required parameter 'image_id' is set + if @api_client.config.client_side_validation && image_id.nil? + fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/images/{imageId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) # query parameters query_params = {} @@ -2567,58 +2591,72 @@ def get_images_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'ImagesResponse') + :return_type => 'ImageResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert LaTeX file (located on storage) to PDF format and return resulting file in response. + # Extract document image in GIF format # - # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param name The document name. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [File] - def get_la_te_x_in_storage_to_pdf(src_path, opts = {}) + def get_image_extract_as_gif(name, image_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts) else raise end return data end - # Convert LaTeX file (located on storage) to PDF format and return resulting file in response. + # Extract document image in GIF format # - # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param name The document name. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_image_extract_as_gif_with_http_info(name, image_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_la_te_x_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_gif ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_la_te_x_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_gif" + end + # verify the required parameter 'image_id' is set + if @api_client.config.client_side_validation && image_id.nil? + fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_gif" end # resource path - local_var_path = "/pdf/create/latex" + local_var_path = "/pdf/{name}/images/{imageId}/extract/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -2639,57 +2677,63 @@ def get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_la_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document link annotation by ID. + # Extract document image in JPEG format # # @param name The document name. - # @param link_id The link ID. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [LinkAnnotationResponse] - def get_link_annotation(name, link_id, opts = {}) + # @return [File] + def get_image_extract_as_jpeg(name, image_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_link_annotation_with_http_info(name, link_id, opts) + data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_link_annotation_with_http_info(name, link_id, opts) + data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts) else raise end return data end - # Read document link annotation by ID. + # Extract document image in JPEG format # # @param name The document name. - # @param link_id The link ID. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(LinkAnnotationResponse, Fixnum, Hash)>] LinkAnnotationResponse data, response status code and response headers - def get_link_annotation_with_http_info(name, link_id, opts = {}) + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_image_extract_as_jpeg_with_http_info(name, image_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_link_annotation ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_jpeg ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_link_annotation" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_jpeg" end - # verify the required parameter 'link_id' is set - if @api_client.config.client_side_validation && link_id.nil? - fail ArgumentError, "Missing the required parameter 'link_id' when calling PdfApi.get_link_annotation" + # verify the required parameter 'image_id' is set + if @api_client.config.client_side_validation && image_id.nil? + fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_jpeg" end # resource path - local_var_path = "/pdf/{name}/links/{linkId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'linkId' + '}', link_id.to_s) + local_var_path = "/pdf/{name}/images/{imageId}/extract/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) # query parameters query_params = {} + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -2715,58 +2759,72 @@ def get_link_annotation_with_http_info(name, link_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'LinkAnnotationResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_link_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert MHT file (located on storage) to PDF format and return resulting file in response. + # Extract document image in PNG format # - # @param src_path Full source filename (ex. /folder1/folder2/template.mht) + # @param name The document name. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [File] - def get_mht_in_storage_to_pdf(src_path, opts = {}) + def get_image_extract_as_png(name, image_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts) else raise end return data end - # Convert MHT file (located on storage) to PDF format and return resulting file in response. + # Extract document image in PNG format # - # @param src_path Full source filename (ex. /folder1/folder2/template.mht) + # @param name The document name. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_mht_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_image_extract_as_png_with_http_info(name, image_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_mht_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_png ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_mht_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_png" + end + # verify the required parameter 'image_id' is set + if @api_client.config.client_side_validation && image_id.nil? + fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_png" end # resource path - local_var_path = "/pdf/create/mht" + local_var_path = "/pdf/{name}/images/{imageId}/extract/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -2787,57 +2845,63 @@ def get_mht_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_mht_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page info. + # Extract document image in TIFF format # # @param name The document name. - # @param page_number The page number. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [DocumentPageResponse] - def get_page(name, page_number, opts = {}) + # @return [File] + def get_image_extract_as_tiff(name, image_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts) else raise end return data end - # Read document page info. + # Extract document image in TIFF format # # @param name The document name. - # @param page_number The page number. + # @param image_id Image ID. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(DocumentPageResponse, Fixnum, Hash)>] DocumentPageResponse data, response status code and response headers - def get_page_with_http_info(name, page_number, opts = {}) + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_image_extract_as_tiff_with_http_info(name, image_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_tiff ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_tiff" end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page" + # verify the required parameter 'image_id' is set + if @api_client.config.client_side_validation && image_id.nil? + fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_tiff" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/images/{imageId}/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s) # query parameters query_params = {} + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -2863,56 +2927,56 @@ def get_page_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DocumentPageResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. + # Read document images. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [AnnotationsInfoResponse] - def get_page_annotations(name, page_number, opts = {}) + # @return [ImagesResponse] + def get_images(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_images_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_images_with_http_info(name, page_number, opts) else raise end return data end - # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. + # Read document images. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(AnnotationsInfoResponse, Fixnum, Hash)>] AnnotationsInfoResponse data, response status code and response headers - def get_page_annotations_with_http_info(name, page_number, opts = {}) + # @return [Array<(ImagesResponse, Fixnum, Hash)>] ImagesResponse data, response status code and response headers + def get_images_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_images ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_images" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_images" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -2941,72 +3005,58 @@ def get_page_annotations_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'AnnotationsInfoResponse') + :return_type => 'ImagesResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Bmp image and return resulting file in response. + # Convert LaTeX file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param page_number The page number. + # @param src_path Full source filename (ex. /folder1/folder2/template.tex) # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_page_convert_to_bmp(name, page_number, opts = {}) + def get_la_te_x_in_storage_to_pdf(src_path, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts) else raise end return data end - # Convert document page to Bmp image and return resulting file in response. + # Convert LaTeX file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param page_number The page number. + # @param src_path Full source filename (ex. /folder1/folder2/template.tex) # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_bmp_with_http_info(name, page_number, opts = {}) + def get_la_te_x_in_storage_to_pdf_with_http_info(src_path, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_bmp ..." - end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_bmp" + @api_client.config.logger.debug "Calling API: PdfApi.get_la_te_x_in_storage_to_pdf ..." end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_bmp" + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_la_te_x_in_storage_to_pdf" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/bmp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/create/latex" # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'srcPath'] = src_path query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -3027,65 +3077,59 @@ def get_page_convert_to_bmp_with_http_info(name, page_number, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_la_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Emf image and return resulting file in response. + # Read document page line annotation by ID. # # @param name The document name. - # @param page_number The page number. + # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_page_convert_to_emf(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LineAnnotationResponse] + def get_line_annotation(name, annotation_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_line_annotation_with_http_info(name, annotation_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_line_annotation_with_http_info(name, annotation_id, opts) else raise end return data end - # Convert document page to Emf image and return resulting file in response. + # Read document page line annotation by ID. # # @param name The document name. - # @param page_number The page number. + # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_emf_with_http_info(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LineAnnotationResponse, Fixnum, Hash)>] LineAnnotationResponse data, response status code and response headers + def get_line_annotation_with_http_info(name, annotation_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_emf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_line_annotation ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_emf" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_line_annotation" end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_emf" + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_line_annotation" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/emf".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/annotations/line/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -3109,67 +3153,61 @@ def get_page_convert_to_emf_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'LineAnnotationResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_emf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Gif image and return resulting file in response. + # Read document link annotation by ID. # # @param name The document name. - # @param page_number The page number. + # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_page_convert_to_gif(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LinkAnnotationResponse] + def get_link_annotation(name, link_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_link_annotation_with_http_info(name, link_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_link_annotation_with_http_info(name, link_id, opts) else raise end return data end - # Convert document page to Gif image and return resulting file in response. + # Read document link annotation by ID. # # @param name The document name. - # @param page_number The page number. + # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_gif_with_http_info(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LinkAnnotationResponse, Fixnum, Hash)>] LinkAnnotationResponse data, response status code and response headers + def get_link_annotation_with_http_info(name, link_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_gif ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_link_annotation ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_gif" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_link_annotation" end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_gif" + # verify the required parameter 'link_id' is set + if @api_client.config.client_side_validation && link_id.nil? + fail ArgumentError, "Missing the required parameter 'link_id' when calling PdfApi.get_link_annotation" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/links/{linkId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'linkId' + '}', link_id.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -3193,72 +3231,58 @@ def get_page_convert_to_gif_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'LinkAnnotationResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_link_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Jpeg image and return resulting file in response. + # Convert MHT file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param page_number The page number. + # @param src_path Full source filename (ex. /folder1/folder2/template.mht) # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_page_convert_to_jpeg(name, page_number, opts = {}) + def get_mht_in_storage_to_pdf(src_path, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts) else raise end return data end - # Convert document page to Jpeg image and return resulting file in response. + # Convert MHT file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. - # @param page_number The page number. + # @param src_path Full source filename (ex. /folder1/folder2/template.mht) # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_jpeg_with_http_info(name, page_number, opts = {}) + def get_mht_in_storage_to_pdf_with_http_info(src_path, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_jpeg ..." - end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_jpeg" + @api_client.config.logger.debug "Calling API: PdfApi.get_mht_in_storage_to_pdf ..." end - # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_jpeg" + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_mht_in_storage_to_pdf" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/create/mht" # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'srcPath'] = src_path query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -3279,65 +3303,59 @@ def get_page_convert_to_jpeg_with_http_info(name, page_number, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_mht_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Png image and return resulting file in response. + # Read document page info. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_page_convert_to_png(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [DocumentPageResponse] + def get_page(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_with_http_info(name, page_number, opts) else raise end return data end - # Convert document page to Png image and return resulting file in response. + # Read document page info. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_png_with_http_info(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(DocumentPageResponse, Fixnum, Hash)>] DocumentPageResponse data, response status code and response headers + def get_page_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_png ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_png" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_png" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -3361,67 +3379,61 @@ def get_page_convert_to_png_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'DocumentPageResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert document page to Tiff image and return resulting file in response. + # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_page_convert_to_tiff(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [AnnotationsInfoResponse] + def get_page_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Convert document page to Tiff image and return resulting file in response. + # Read documant page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :width The converted image width. - # @option opts [Integer] :height The converted image height. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_page_convert_to_tiff_with_http_info(name, page_number, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(AnnotationsInfoResponse, Fixnum, Hash)>] AnnotationsInfoResponse data, response status code and response headers + def get_page_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_tiff ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_tiff" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_annotations" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_tiff" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -3445,56 +3457,56 @@ def get_page_convert_to_tiff_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'AnnotationsInfoResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page free text annotations. + # Read document page circle annotations. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [FreeTextAnnotationsResponse] - def get_page_free_text_annotations(name, page_number, opts = {}) + # @return [CircleAnnotationsResponse] + def get_page_circle_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_circle_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_circle_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Read document page free text annotations. + # Read document page circle annotations. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(FreeTextAnnotationsResponse, Fixnum, Hash)>] FreeTextAnnotationsResponse data, response status code and response headers - def get_page_free_text_annotations_with_http_info(name, page_number, opts = {}) + # @return [Array<(CircleAnnotationsResponse, Fixnum, Hash)>] CircleAnnotationsResponse data, response status code and response headers + def get_page_circle_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_free_text_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_circle_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_circle_annotations" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_circle_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/circle".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -3523,67 +3535,67 @@ def get_page_free_text_annotations_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'FreeTextAnnotationsResponse') + :return_type => 'CircleAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page link annotation by ID. + # Convert document page to Bmp image and return resulting file in response. # # @param name The document name. # @param page_number The page number. - # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [LinkAnnotationResponse] - def get_page_link_annotation(name, page_number, link_id, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_page_convert_to_bmp(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_link_annotation_with_http_info(name, page_number, link_id, opts) + data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_link_annotation_with_http_info(name, page_number, link_id, opts) + data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts) else raise end return data end - # Read document page link annotation by ID. + # Convert document page to Bmp image and return resulting file in response. # # @param name The document name. # @param page_number The page number. - # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [Array<(LinkAnnotationResponse, Fixnum, Hash)>] LinkAnnotationResponse data, response status code and response headers - def get_page_link_annotation_with_http_info(name, page_number, link_id, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_page_convert_to_bmp_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_link_annotation ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_bmp ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_link_annotation" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_bmp" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_link_annotation" - end - # verify the required parameter 'link_id' is set - if @api_client.config.client_side_validation && link_id.nil? - fail ArgumentError, "Missing the required parameter 'link_id' when calling PdfApi.get_page_link_annotation" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_bmp" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/links/{linkId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s).sub('{' + 'linkId' + '}', link_id.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/bmp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} @@ -3607,61 +3619,67 @@ def get_page_link_annotation_with_http_info(name, page_number, link_id, opts = { :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'LinkAnnotationResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_link_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page link annotations. + # Convert document page to Emf image and return resulting file in response. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [LinkAnnotationsResponse] - def get_page_link_annotations(name, page_number, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_page_convert_to_emf(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_link_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_link_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts) else raise end return data end - # Read document page link annotations. + # Convert document page to Emf image and return resulting file in response. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [Array<(LinkAnnotationsResponse, Fixnum, Hash)>] LinkAnnotationsResponse data, response status code and response headers - def get_page_link_annotations_with_http_info(name, page_number, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_page_convert_to_emf_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_link_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_emf ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_link_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_emf" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_link_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_emf" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/links".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/emf".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} @@ -3685,96 +3703,65 @@ def get_page_link_annotations_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'LinkAnnotationsResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_link_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_emf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read page text items. + # Convert document page to Gif image and return resulting file in response. # # @param name The document name. - # @param page_number Number of page (starting from 1). - # @param llx - # @param lly - # @param urx - # @param ury + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Array] :format List of formats for search. - # @option opts [String] :regex Formats are specified as a regular expression. - # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [TextRectsResponse] - def get_page_text(name, page_number, llx, lly, urx, ury, opts = {}) + # @return [File] + def get_page_convert_to_gif(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts) + data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts) + data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts) else raise end return data end - # Read page text items. + # Convert document page to Gif image and return resulting file in response. # # @param name The document name. - # @param page_number Number of page (starting from 1). - # @param llx - # @param lly - # @param urx - # @param ury + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Array] :format List of formats for search. - # @option opts [String] :regex Formats are specified as a regular expression. - # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers - def get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_page_convert_to_gif_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_text ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_gif ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_gif" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text" - end - # verify the required parameter 'llx' is set - if @api_client.config.client_side_validation && llx.nil? - fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_page_text" - end - # verify the required parameter 'lly' is set - if @api_client.config.client_side_validation && lly.nil? - fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_page_text" - end - # verify the required parameter 'urx' is set - if @api_client.config.client_side_validation && urx.nil? - fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_page_text" - end - # verify the required parameter 'ury' is set - if @api_client.config.client_side_validation && ury.nil? - fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_page_text" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_gif" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'LLX'] = llx - query_params[:'LLY'] = lly - query_params[:'URX'] = urx - query_params[:'URY'] = ury - query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil? - query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil? - query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? @@ -3800,61 +3787,67 @@ def get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts = { :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextRectsResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page text annotations. + # Convert document page to Jpeg image and return resulting file in response. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [TextAnnotationsResponse] - def get_page_text_annotations(name, page_number, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_page_convert_to_jpeg(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts) + data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts) else raise end return data end - # Read document page text annotations. + # Convert document page to Jpeg image and return resulting file in response. # # @param name The document name. # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [Array<(TextAnnotationsResponse, Fixnum, Hash)>] TextAnnotationsResponse data, response status code and response headers - def get_page_text_annotations_with_http_info(name, page_number, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_page_convert_to_jpeg_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_page_text_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_jpeg ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_jpeg" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_jpeg" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} @@ -3878,55 +3871,67 @@ def get_page_text_annotations_with_http_info(name, page_number, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextAnnotationsResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_page_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document pages info. + # Convert document page to Png image and return resulting file in response. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [DocumentPagesResponse] - def get_pages(name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_page_convert_to_png(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pages_with_http_info(name, opts) + data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pages_with_http_info(name, opts) + data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts) else raise end return data end - # Read document pages info. + # Convert document page to Png image and return resulting file in response. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. # @option opts [String] :folder The document folder. - # @return [Array<(DocumentPagesResponse, Fixnum, Hash)>] DocumentPagesResponse data, response status code and response headers - def get_pages_with_http_info(name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_page_convert_to_png_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pages ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_png ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pages" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_png" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_png" end # resource path - local_var_path = "/pdf/{name}/pages".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} @@ -3950,58 +3955,72 @@ def get_pages_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DocumentPagesResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert PCL file (located on storage) to PDF format and return resulting file in response. + # Convert document page to Tiff image and return resulting file in response. # - # @param src_path Full source filename (ex. /folder1/folder2/template.pcl) + # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_pcl_in_storage_to_pdf(src_path, opts = {}) + def get_page_convert_to_tiff(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts) else raise end return data end - # Convert PCL file (located on storage) to PDF format and return resulting file in response. + # Convert document page to Tiff image and return resulting file in response. # - # @param src_path Full source filename (ex. /folder1/folder2/template.pcl) + # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters + # @option opts [Integer] :width The converted image width. + # @option opts [Integer] :height The converted image height. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pcl_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_page_convert_to_tiff_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pcl_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_tiff ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_pcl_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_tiff" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_tiff" end # resource path - local_var_path = "/pdf/create/pcl" + local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4022,82 +4041,64 @@ def get_pcl_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pcl_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to DOC format and returns resulting file in response content + # Read document page free text annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. - # @option opts [String] :format Allows to specify .doc or .docx file format. - # @option opts [Integer] :image_resolution_x Image resolution X. - # @option opts [Integer] :image_resolution_y Image resolution Y. - # @option opts [Float] :max_distance_between_text_lines Max distance between text lines. - # @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. - # @option opts [BOOLEAN] :recognize_bullets Recognize bullets. - # @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_doc(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [FreeTextAnnotationsResponse] + def get_page_free_text_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts) + data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts) + data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to DOC format and returns resulting file in response content + # Read document page free text annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. - # @option opts [String] :format Allows to specify .doc or .docx file format. - # @option opts [Integer] :image_resolution_x Image resolution X. - # @option opts [Integer] :image_resolution_y Image resolution Y. - # @option opts [Float] :max_distance_between_text_lines Max distance between text lines. - # @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. - # @option opts [BOOLEAN] :recognize_bullets Recognize bullets. - # @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_doc_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(FreeTextAnnotationsResponse, Fixnum, Hash)>] FreeTextAnnotationsResponse data, response status code and response headers + def get_page_free_text_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_doc ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_free_text_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_doc" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_free_text_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_free_text_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'addReturnToLineEnd'] = opts[:'add_return_to_line_end'] if !opts[:'add_return_to_line_end'].nil? - query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? - query_params[:'imageResolutionX'] = opts[:'image_resolution_x'] if !opts[:'image_resolution_x'].nil? - query_params[:'imageResolutionY'] = opts[:'image_resolution_y'] if !opts[:'image_resolution_y'].nil? - query_params[:'maxDistanceBetweenTextLines'] = opts[:'max_distance_between_text_lines'] if !opts[:'max_distance_between_text_lines'].nil? - query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil? - query_params[:'recognizeBullets'] = opts[:'recognize_bullets'] if !opts[:'recognize_bullets'].nil? - query_params[:'relativeHorizontalProximity'] = opts[:'relative_horizontal_proximity'] if !opts[:'relative_horizontal_proximity'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4116,63 +4117,66 @@ def get_pdf_in_storage_to_doc_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'FreeTextAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to EPUB format and returns resulting file in response content + # Read document page line annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :content_recognition_mode ?roperty tunes conversion for this or that desirable method of recognition of content. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_epub(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LineAnnotationsResponse] + def get_page_line_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts) + data, _status_code, _headers = get_page_line_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts) + data, _status_code, _headers = get_page_line_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to EPUB format and returns resulting file in response content + # Read document page line annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :content_recognition_mode ?roperty tunes conversion for this or that desirable method of recognition of content. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_epub_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LineAnnotationsResponse, Fixnum, Hash)>] LineAnnotationsResponse data, response status code and response headers + def get_page_line_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_epub ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_epub" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_line_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_line_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/epub".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/line".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'contentRecognitionMode'] = opts[:'content_recognition_mode'] if !opts[:'content_recognition_mode'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4191,144 +4195,72 @@ def get_pdf_in_storage_to_epub_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'LineAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_epub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to Html format and returns resulting file in response content + # Read document page link annotation by ID. # # @param name The document name. + # @param page_number The page number. + # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. - # @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. - # @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \"data-pdflayer\" attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. - # @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. - # @option opts [String] :document_type Result document type. - # @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. - # @option opts [Integer] :image_resolution Resolution for image rendering. - # @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. - # @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. - # @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e 'SplitIntoPages' is 'true'), then this attribute defines whether should be created separate CSS-file for each result HTML page. - # @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it's own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. - # @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. - # @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. - # @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \".stl_01 {}\" ... \".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. - # @option opts [Array] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. - # @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. - # @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. - # @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. - # @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. - # @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute 'SplitOnPages=false', than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. - # @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. - # @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. - # @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). - # @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). - # @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. - # @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. - # @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. - # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text's underlining and put this info into CSS instead of drawing of underlining graphically. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_html(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LinkAnnotationResponse] + def get_page_link_annotation(name, page_number, link_id, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts) + data, _status_code, _headers = get_page_link_annotation_with_http_info(name, page_number, link_id, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts) + data, _status_code, _headers = get_page_link_annotation_with_http_info(name, page_number, link_id, opts) else raise end return data end - # Converts PDF document (located on storage) to Html format and returns resulting file in response content + # Read document page link annotation by ID. # # @param name The document name. + # @param page_number The page number. + # @param link_id The link ID. # @param [Hash] opts the optional parameters - # @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. - # @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. - # @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \"data-pdflayer\" attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. - # @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. - # @option opts [String] :document_type Result document type. - # @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. - # @option opts [Integer] :image_resolution Resolution for image rendering. - # @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. - # @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. - # @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e 'SplitIntoPages' is 'true'), then this attribute defines whether should be created separate CSS-file for each result HTML page. - # @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it's own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. - # @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. - # @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. - # @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \".stl_01 {}\" ... \".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. - # @option opts [Array] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. - # @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. - # @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. - # @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. - # @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. - # @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute 'SplitOnPages=false', than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. - # @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. - # @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. - # @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). - # @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). - # @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. - # @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. - # @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. - # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text's underlining and put this info into CSS instead of drawing of underlining graphically. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_html_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LinkAnnotationResponse, Fixnum, Hash)>] LinkAnnotationResponse data, response status code and response headers + def get_page_link_annotation_with_http_info(name, page_number, link_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_html ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_link_annotation ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_html" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_link_annotation" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_link_annotation" + end + # verify the required parameter 'link_id' is set + if @api_client.config.client_side_validation && link_id.nil? + fail ArgumentError, "Missing the required parameter 'link_id' when calling PdfApi.get_page_link_annotation" end # resource path - local_var_path = "/pdf/{name}/convert/html".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/links/{linkId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s).sub('{' + 'linkId' + '}', link_id.to_s) # query parameters query_params = {} - query_params[:'additionalMarginWidthInPoints'] = opts[:'additional_margin_width_in_points'] if !opts[:'additional_margin_width_in_points'].nil? - query_params[:'compressSvgGraphicsIfAny'] = opts[:'compress_svg_graphics_if_any'] if !opts[:'compress_svg_graphics_if_any'].nil? - query_params[:'convertMarkedContentToLayers'] = opts[:'convert_marked_content_to_layers'] if !opts[:'convert_marked_content_to_layers'].nil? - query_params[:'defaultFontName'] = opts[:'default_font_name'] if !opts[:'default_font_name'].nil? - query_params[:'documentType'] = opts[:'document_type'] if !opts[:'document_type'].nil? - query_params[:'fixedLayout'] = opts[:'fixed_layout'] if !opts[:'fixed_layout'].nil? - query_params[:'imageResolution'] = opts[:'image_resolution'] if !opts[:'image_resolution'].nil? - query_params[:'minimalLineWidth'] = opts[:'minimal_line_width'] if !opts[:'minimal_line_width'].nil? - query_params[:'preventGlyphsGrouping'] = opts[:'prevent_glyphs_grouping'] if !opts[:'prevent_glyphs_grouping'].nil? - query_params[:'splitCssIntoPages'] = opts[:'split_css_into_pages'] if !opts[:'split_css_into_pages'].nil? - query_params[:'splitIntoPages'] = opts[:'split_into_pages'] if !opts[:'split_into_pages'].nil? - query_params[:'useZOrder'] = opts[:'use_z_order'] if !opts[:'use_z_order'].nil? - query_params[:'antialiasingProcessing'] = opts[:'antialiasing_processing'] if !opts[:'antialiasing_processing'].nil? - query_params[:'cssClassNamesPrefix'] = opts[:'css_class_names_prefix'] if !opts[:'css_class_names_prefix'].nil? - query_params[:'explicitListOfSavedPages'] = @api_client.build_collection_param(opts[:'explicit_list_of_saved_pages'], :multi) if !opts[:'explicit_list_of_saved_pages'].nil? - query_params[:'fontEncodingStrategy'] = opts[:'font_encoding_strategy'] if !opts[:'font_encoding_strategy'].nil? - query_params[:'fontSavingMode'] = opts[:'font_saving_mode'] if !opts[:'font_saving_mode'].nil? - query_params[:'htmlMarkupGenerationMode'] = opts[:'html_markup_generation_mode'] if !opts[:'html_markup_generation_mode'].nil? - query_params[:'lettersPositioningMethod'] = opts[:'letters_positioning_method'] if !opts[:'letters_positioning_method'].nil? - query_params[:'pagesFlowTypeDependsOnViewersScreenSize'] = opts[:'pages_flow_type_depends_on_viewers_screen_size'] if !opts[:'pages_flow_type_depends_on_viewers_screen_size'].nil? - query_params[:'partsEmbeddingMode'] = opts[:'parts_embedding_mode'] if !opts[:'parts_embedding_mode'].nil? - query_params[:'rasterImagesSavingMode'] = opts[:'raster_images_saving_mode'] if !opts[:'raster_images_saving_mode'].nil? - query_params[:'removeEmptyAreasOnTopAndBottom'] = opts[:'remove_empty_areas_on_top_and_bottom'] if !opts[:'remove_empty_areas_on_top_and_bottom'].nil? - query_params[:'saveShadowedTextsAsTransparentTexts'] = opts[:'save_shadowed_texts_as_transparent_texts'] if !opts[:'save_shadowed_texts_as_transparent_texts'].nil? - query_params[:'saveTransparentTexts'] = opts[:'save_transparent_texts'] if !opts[:'save_transparent_texts'].nil? - query_params[:'specialFolderForAllImages'] = opts[:'special_folder_for_all_images'] if !opts[:'special_folder_for_all_images'].nil? - query_params[:'specialFolderForSvgImages'] = opts[:'special_folder_for_svg_images'] if !opts[:'special_folder_for_svg_images'].nil? - query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4347,63 +4279,66 @@ def get_pdf_in_storage_to_html_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'LinkAnnotationResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_link_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content + # Read document page link annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :pages_count Pages count. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_la_te_x(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LinkAnnotationsResponse] + def get_page_link_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_la_te_x_with_http_info(name, opts) + data, _status_code, _headers = get_page_link_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_la_te_x_with_http_info(name, opts) + data, _status_code, _headers = get_page_link_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content + # Read document page link annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Integer] :pages_count Pages count. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_la_te_x_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LinkAnnotationsResponse, Fixnum, Hash)>] LinkAnnotationsResponse data, response status code and response headers + def get_page_link_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_la_te_x ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_link_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_la_te_x" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_link_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_link_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/latex".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/links".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'pagesCount'] = opts[:'pages_count'] if !opts[:'pages_count'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4422,60 +4357,66 @@ def get_pdf_in_storage_to_la_te_x_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'LinkAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_la_te_x\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_link_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to MOBIXML format and returns resulting file in response content + # Read document page polyline annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_mobi_xml(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [PolyLineAnnotationsResponse] + def get_page_poly_line_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts) + data, _status_code, _headers = get_page_poly_line_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts) + data, _status_code, _headers = get_page_poly_line_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to MOBIXML format and returns resulting file in response content + # Read document page polyline annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(PolyLineAnnotationsResponse, Fixnum, Hash)>] PolyLineAnnotationsResponse data, response status code and response headers + def get_page_poly_line_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_mobi_xml ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_poly_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_mobi_xml" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_poly_line_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_poly_line_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/mobixml".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polyline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4494,67 +4435,66 @@ def get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'PolyLineAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_mobi_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to PdfA format and returns resulting file in response content + # Read document page polygon annotations. # # @param name The document name. - # @param type Type of PdfA format. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_pdf_a(name, type, opts = {}) + # @option opts [String] :folder The document folder. + # @return [PolygonAnnotationsResponse] + def get_page_polygon_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts) + data, _status_code, _headers = get_page_polygon_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts) + data, _status_code, _headers = get_page_polygon_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to PdfA format and returns resulting file in response content + # Read document page polygon annotations. # # @param name The document name. - # @param type Type of PdfA format. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(PolygonAnnotationsResponse, Fixnum, Hash)>] PolygonAnnotationsResponse data, response status code and response headers + def get_page_polygon_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pdf_a ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_polygon_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pdf_a" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_polygon_annotations" end - # verify the required parameter 'type' is set - if @api_client.config.client_side_validation && type.nil? - fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.get_pdf_in_storage_to_pdf_a" + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_polygon_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polygon".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'type'] = type - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4573,66 +4513,66 @@ def get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'PolygonAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to PPTX format and returns resulting file in response content + # Read document page square annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :separate_images Separate images. - # @option opts [BOOLEAN] :slides_as_images Slides as images. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_pptx(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [SquareAnnotationsResponse] + def get_page_square_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts) + data, _status_code, _headers = get_page_square_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts) + data, _status_code, _headers = get_page_square_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to PPTX format and returns resulting file in response content + # Read document page square annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :separate_images Separate images. - # @option opts [BOOLEAN] :slides_as_images Slides as images. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_pptx_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(SquareAnnotationsResponse, Fixnum, Hash)>] SquareAnnotationsResponse data, response status code and response headers + def get_page_square_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pptx ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_square_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pptx" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_square_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_square_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/pptx".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/square".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'separateImages'] = opts[:'separate_images'] if !opts[:'separate_images'].nil? - query_params[:'slidesAsImages'] = opts[:'slides_as_images'] if !opts[:'slides_as_images'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4651,63 +4591,103 @@ def get_pdf_in_storage_to_pptx_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'SquareAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to SVG format and returns resulting file in response content + # Read page text items. # # @param name The document name. + # @param page_number Number of page (starting from 1). + # @param llx + # @param lly + # @param urx + # @param ury # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. + # @option opts [Array] :format List of formats for search. + # @option opts [String] :regex Formats are specified as a regular expression. + # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_svg(name, opts = {}) + # @return [TextRectsResponse] + def get_page_text(name, page_number, llx, lly, urx, ury, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts) + data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts) + data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts) else raise end return data end - # Converts PDF document (located on storage) to SVG format and returns resulting file in response content + # Read page text items. # # @param name The document name. + # @param page_number Number of page (starting from 1). + # @param llx + # @param lly + # @param urx + # @param ury # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. + # @option opts [Array] :format List of formats for search. + # @option opts [String] :regex Formats are specified as a regular expression. + # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_svg_with_http_info(name, opts = {}) + # @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers + def get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_svg ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_text ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_svg" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text" + end + # verify the required parameter 'llx' is set + if @api_client.config.client_side_validation && llx.nil? + fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_page_text" + end + # verify the required parameter 'lly' is set + if @api_client.config.client_side_validation && lly.nil? + fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_page_text" + end + # verify the required parameter 'urx' is set + if @api_client.config.client_side_validation && urx.nil? + fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_page_text" + end + # verify the required parameter 'ury' is set + if @api_client.config.client_side_validation && ury.nil? + fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_page_text" end # resource path - local_var_path = "/pdf/{name}/convert/svg".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'compressOutputToZipArchive'] = opts[:'compress_output_to_zip_archive'] if !opts[:'compress_output_to_zip_archive'].nil? + query_params[:'LLX'] = llx + query_params[:'LLY'] = lly + query_params[:'URX'] = urx + query_params[:'URY'] = ury + query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil? + query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil? + query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4726,105 +4706,66 @@ def get_pdf_in_storage_to_svg_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'TextRectsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to TIFF format and returns resulting file in response content + # Read document page text annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Float] :brightness Image brightness. - # @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. - # @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. - # @option opts [Integer] :left_margin Left image margin. - # @option opts [Integer] :right_margin Right image margin. - # @option opts [Integer] :top_margin Top image margin. - # @option opts [Integer] :bottom_margin Bottom image margin. - # @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. - # @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. - # @option opts [Integer] :width Image width. - # @option opts [Integer] :height Image height. - # @option opts [Integer] :x_resolution Horizontal resolution. - # @option opts [Integer] :y_resolution Vertical resolution. - # @option opts [Integer] :page_index Start page to export. - # @option opts [Integer] :page_count Number of pages to export. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_tiff(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [TextAnnotationsResponse] + def get_page_text_annotations(name, page_number, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts) + data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts) + data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts) else raise end return data end - # Converts PDF document (located on storage) to TIFF format and returns resulting file in response content + # Read document page text annotations. # # @param name The document name. + # @param page_number The page number. # @param [Hash] opts the optional parameters - # @option opts [Float] :brightness Image brightness. - # @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. - # @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. - # @option opts [Integer] :left_margin Left image margin. - # @option opts [Integer] :right_margin Right image margin. - # @option opts [Integer] :top_margin Top image margin. - # @option opts [Integer] :bottom_margin Bottom image margin. - # @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. - # @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. - # @option opts [Integer] :width Image width. - # @option opts [Integer] :height Image height. - # @option opts [Integer] :x_resolution Horizontal resolution. - # @option opts [Integer] :y_resolution Vertical resolution. - # @option opts [Integer] :page_index Start page to export. - # @option opts [Integer] :page_count Number of pages to export. - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_tiff_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(TextAnnotationsResponse, Fixnum, Hash)>] TextAnnotationsResponse data, response status code and response headers + def get_page_text_annotations_with_http_info(name, page_number, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_tiff ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_page_text_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_tiff" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text_annotations" end # resource path - local_var_path = "/pdf/{name}/convert/tiff".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'brightness'] = opts[:'brightness'] if !opts[:'brightness'].nil? - query_params[:'compression'] = opts[:'compression'] if !opts[:'compression'].nil? - query_params[:'colorDepth'] = opts[:'color_depth'] if !opts[:'color_depth'].nil? - query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil? - query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil? - query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil? - query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil? - query_params[:'orientation'] = opts[:'orientation'] if !opts[:'orientation'].nil? - query_params[:'skipBlankPages'] = opts[:'skip_blank_pages'] if !opts[:'skip_blank_pages'].nil? - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil? - query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].nil? - query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil? - query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4843,72 +4784,60 @@ def get_pdf_in_storage_to_tiff_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'TextAnnotationsResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_page_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to XLS format and returns resulting file in response content + # Read document pages info. # # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first - # @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets - # @option opts [Float] :scale_factor Scale factor - # @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [File] - def get_pdf_in_storage_to_xls(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [DocumentPagesResponse] + def get_pages(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts) + data, _status_code, _headers = get_pages_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts) + data, _status_code, _headers = get_pages_with_http_info(name, opts) else raise end return data end - # Converts PDF document (located on storage) to XLS format and returns resulting file in response content + # Read document pages info. # # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first - # @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets - # @option opts [Float] :scale_factor Scale factor - # @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_xls_with_http_info(name, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(DocumentPagesResponse, Fixnum, Hash)>] DocumentPagesResponse data, response status code and response headers + def get_pages_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xls ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pages ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xls" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pages" end # resource path - local_var_path = "/pdf/{name}/convert/xls".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil? - query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil? - query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil? - query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -4927,54 +4856,52 @@ def get_pdf_in_storage_to_xls_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'DocumentPagesResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to XML format and returns resulting file in response content + # Convert PCL file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. + # @param src_path Full source filename (ex. /folder1/folder2/template.pcl) # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_pdf_in_storage_to_xml(name, opts = {}) + def get_pcl_in_storage_to_pdf(src_path, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts) + data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts) + data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts) else raise end return data end - # Converts PDF document (located on storage) to XML format and returns resulting file in response content + # Convert PCL file (located on storage) to PDF format and return resulting file in response. # - # @param name The document name. + # @param src_path Full source filename (ex. /folder1/folder2/template.pcl) # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_xml_with_http_info(name, opts = {}) + def get_pcl_in_storage_to_pdf_with_http_info(src_path, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xml ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pcl_in_storage_to_pdf ..." end - # verify the required parameter 'name' is set - if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xml" + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_pcl_in_storage_to_pdf" end # resource path - local_var_path = "/pdf/{name}/convert/xml".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/create/pcl" # query parameters query_params = {} - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'srcPath'] = src_path query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters @@ -5001,51 +4928,75 @@ def get_pdf_in_storage_to_xml_with_http_info(name, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pcl_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document (located on storage) to XPS format and returns resulting file in response content + # Converts PDF document (located on storage) to DOC format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. + # @option opts [String] :format Allows to specify .doc or .docx file format. + # @option opts [Integer] :image_resolution_x Image resolution X. + # @option opts [Integer] :image_resolution_y Image resolution Y. + # @option opts [Float] :max_distance_between_text_lines Max distance between text lines. + # @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. + # @option opts [BOOLEAN] :recognize_bullets Recognize bullets. + # @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_pdf_in_storage_to_xps(name, opts = {}) + def get_pdf_in_storage_to_doc(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts) else raise end return data end - # Converts PDF document (located on storage) to XPS format and returns resulting file in response content + # Converts PDF document (located on storage) to DOC format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. + # @option opts [String] :format Allows to specify .doc or .docx file format. + # @option opts [Integer] :image_resolution_x Image resolution X. + # @option opts [Integer] :image_resolution_y Image resolution Y. + # @option opts [Float] :max_distance_between_text_lines Max distance between text lines. + # @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. + # @option opts [BOOLEAN] :recognize_bullets Recognize bullets. + # @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_pdf_in_storage_to_xps_with_http_info(name, opts = {}) + def get_pdf_in_storage_to_doc_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xps ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_doc ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xps" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_doc" end # resource path - local_var_path = "/pdf/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} + query_params[:'addReturnToLineEnd'] = opts[:'add_return_to_line_end'] if !opts[:'add_return_to_line_end'].nil? + query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil? + query_params[:'imageResolutionX'] = opts[:'image_resolution_x'] if !opts[:'image_resolution_x'].nil? + query_params[:'imageResolutionY'] = opts[:'image_resolution_y'] if !opts[:'image_resolution_y'].nil? + query_params[:'maxDistanceBetweenTextLines'] = opts[:'max_distance_between_text_lines'] if !opts[:'max_distance_between_text_lines'].nil? + query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil? + query_params[:'recognizeBullets'] = opts[:'recognize_bullets'] if !opts[:'recognize_bullets'].nil? + query_params[:'relativeHorizontalProximity'] = opts[:'relative_horizontal_proximity'] if !opts[:'relative_horizontal_proximity'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? @@ -5073,50 +5024,55 @@ def get_pdf_in_storage_to_xps_with_http_info(name, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert PS file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to EPUB format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.ps) + # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [String] :content_recognition_mode ?roperty tunes conversion for this or that desirable method of recognition of content. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_ps_in_storage_to_pdf(src_path, opts = {}) + def get_pdf_in_storage_to_epub(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts) else raise end return data end - # Convert PS file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to EPUB format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.ps) + # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [String] :content_recognition_mode ?roperty tunes conversion for this or that desirable method of recognition of content. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_ps_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_pdf_in_storage_to_epub_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_ps_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_epub ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_ps_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_epub" end # resource path - local_var_path = "/pdf/create/ps" + local_var_path = "/pdf/{name}/convert/epub".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'contentRecognitionMode'] = opts[:'content_recognition_mode'] if !opts[:'content_recognition_mode'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters @@ -5143,74 +5099,136 @@ def get_ps_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_ps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_epub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert SVG file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to Html format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.svg) + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :adjust_page_size Adjust page size - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top + # @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. + # @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. + # @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \"data-pdflayer\" attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. + # @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. + # @option opts [String] :document_type Result document type. + # @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. + # @option opts [Integer] :image_resolution Resolution for image rendering. + # @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. + # @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. + # @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e 'SplitIntoPages' is 'true'), then this attribute defines whether should be created separate CSS-file for each result HTML page. + # @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it's own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. + # @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. + # @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. + # @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \".stl_01 {}\" ... \".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. + # @option opts [Array] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. + # @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. + # @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. + # @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. + # @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. + # @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute 'SplitOnPages=false', than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. + # @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. + # @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. + # @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). + # @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). + # @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. + # @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. + # @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. + # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text's underlining and put this info into CSS instead of drawing of underlining graphically. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_svg_in_storage_to_pdf(src_path, opts = {}) + def get_pdf_in_storage_to_html(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts) else raise end return data end - # Convert SVG file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to Html format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.svg) + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [BOOLEAN] :adjust_page_size Adjust page size - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top + # @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. + # @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. + # @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with \"data-pdflayer\" attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. + # @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. + # @option opts [String] :document_type Result document type. + # @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. + # @option opts [Integer] :image_resolution Resolution for image rendering. + # @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. + # @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. + # @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e 'SplitIntoPages' is 'true'), then this attribute defines whether should be created separate CSS-file for each result HTML page. + # @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it's own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. + # @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. + # @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. + # @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like \".stl_01 {}\" ... \".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. + # @option opts [Array] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1...[NumberOfPagesInConvertedDocument]) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. + # @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. + # @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. + # @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. + # @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. + # @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute 'SplitOnPages=false', than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. + # @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. + # @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. + # @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). + # @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). + # @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. + # @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. + # @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. + # @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text's underlining and put this info into CSS instead of drawing of underlining graphically. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_svg_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_pdf_in_storage_to_html_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_svg_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_html ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_svg_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_html" end # resource path - local_var_path = "/pdf/create/svg" + local_var_path = "/pdf/{name}/convert/html".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path - query_params[:'adjustPageSize'] = opts[:'adjust_page_size'] if !opts[:'adjust_page_size'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? - query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? - query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? - query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? - query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? + query_params[:'additionalMarginWidthInPoints'] = opts[:'additional_margin_width_in_points'] if !opts[:'additional_margin_width_in_points'].nil? + query_params[:'compressSvgGraphicsIfAny'] = opts[:'compress_svg_graphics_if_any'] if !opts[:'compress_svg_graphics_if_any'].nil? + query_params[:'convertMarkedContentToLayers'] = opts[:'convert_marked_content_to_layers'] if !opts[:'convert_marked_content_to_layers'].nil? + query_params[:'defaultFontName'] = opts[:'default_font_name'] if !opts[:'default_font_name'].nil? + query_params[:'documentType'] = opts[:'document_type'] if !opts[:'document_type'].nil? + query_params[:'fixedLayout'] = opts[:'fixed_layout'] if !opts[:'fixed_layout'].nil? + query_params[:'imageResolution'] = opts[:'image_resolution'] if !opts[:'image_resolution'].nil? + query_params[:'minimalLineWidth'] = opts[:'minimal_line_width'] if !opts[:'minimal_line_width'].nil? + query_params[:'preventGlyphsGrouping'] = opts[:'prevent_glyphs_grouping'] if !opts[:'prevent_glyphs_grouping'].nil? + query_params[:'splitCssIntoPages'] = opts[:'split_css_into_pages'] if !opts[:'split_css_into_pages'].nil? + query_params[:'splitIntoPages'] = opts[:'split_into_pages'] if !opts[:'split_into_pages'].nil? + query_params[:'useZOrder'] = opts[:'use_z_order'] if !opts[:'use_z_order'].nil? + query_params[:'antialiasingProcessing'] = opts[:'antialiasing_processing'] if !opts[:'antialiasing_processing'].nil? + query_params[:'cssClassNamesPrefix'] = opts[:'css_class_names_prefix'] if !opts[:'css_class_names_prefix'].nil? + query_params[:'explicitListOfSavedPages'] = @api_client.build_collection_param(opts[:'explicit_list_of_saved_pages'], :multi) if !opts[:'explicit_list_of_saved_pages'].nil? + query_params[:'fontEncodingStrategy'] = opts[:'font_encoding_strategy'] if !opts[:'font_encoding_strategy'].nil? + query_params[:'fontSavingMode'] = opts[:'font_saving_mode'] if !opts[:'font_saving_mode'].nil? + query_params[:'htmlMarkupGenerationMode'] = opts[:'html_markup_generation_mode'] if !opts[:'html_markup_generation_mode'].nil? + query_params[:'lettersPositioningMethod'] = opts[:'letters_positioning_method'] if !opts[:'letters_positioning_method'].nil? + query_params[:'pagesFlowTypeDependsOnViewersScreenSize'] = opts[:'pages_flow_type_depends_on_viewers_screen_size'] if !opts[:'pages_flow_type_depends_on_viewers_screen_size'].nil? + query_params[:'partsEmbeddingMode'] = opts[:'parts_embedding_mode'] if !opts[:'parts_embedding_mode'].nil? + query_params[:'rasterImagesSavingMode'] = opts[:'raster_images_saving_mode'] if !opts[:'raster_images_saving_mode'].nil? + query_params[:'removeEmptyAreasOnTopAndBottom'] = opts[:'remove_empty_areas_on_top_and_bottom'] if !opts[:'remove_empty_areas_on_top_and_bottom'].nil? + query_params[:'saveShadowedTextsAsTransparentTexts'] = opts[:'save_shadowed_texts_as_transparent_texts'] if !opts[:'save_shadowed_texts_as_transparent_texts'].nil? + query_params[:'saveTransparentTexts'] = opts[:'save_transparent_texts'] if !opts[:'save_transparent_texts'].nil? + query_params[:'specialFolderForAllImages'] = opts[:'special_folder_for_all_images'] if !opts[:'special_folder_for_all_images'].nil? + query_params[:'specialFolderForSvgImages'] = opts[:'special_folder_for_svg_images'] if !opts[:'special_folder_for_svg_images'].nil? + query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters @@ -5237,95 +5255,61 @@ def get_svg_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_svg_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document text. + # Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content # # @param name The document name. - # @param llx - # @param lly - # @param urx - # @param ury # @param [Hash] opts the optional parameters - # @option opts [Array] :format List of formats for search. - # @option opts [String] :regex Formats are specified as a regular expression. - # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [Integer] :pages_count Pages count. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [TextRectsResponse] - def get_text(name, llx, lly, urx, ury, opts = {}) + # @return [File] + def get_pdf_in_storage_to_la_te_x(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts) + data, _status_code, _headers = get_pdf_in_storage_to_la_te_x_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts) + data, _status_code, _headers = get_pdf_in_storage_to_la_te_x_with_http_info(name, opts) else raise end return data end - # Read document text. + # Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content # # @param name The document name. - # @param llx - # @param lly - # @param urx - # @param ury # @param [Hash] opts the optional parameters - # @option opts [Array] :format List of formats for search. - # @option opts [String] :regex Formats are specified as a regular expression. - # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [Integer] :pages_count Pages count. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. - # @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers - def get_text_with_http_info(name, llx, lly, urx, ury, opts = {}) + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_pdf_in_storage_to_la_te_x_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_text ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_la_te_x ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text" - end - # verify the required parameter 'llx' is set - if @api_client.config.client_side_validation && llx.nil? - fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_text" - end - # verify the required parameter 'lly' is set - if @api_client.config.client_side_validation && lly.nil? - fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_text" - end - # verify the required parameter 'urx' is set - if @api_client.config.client_side_validation && urx.nil? - fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_text" - end - # verify the required parameter 'ury' is set - if @api_client.config.client_side_validation && ury.nil? - fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_text" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_la_te_x" end # resource path - local_var_path = "/pdf/{name}/text".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/convert/latex".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'LLX'] = llx - query_params[:'LLY'] = lly - query_params[:'URX'] = urx - query_params[:'URY'] = ury - query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil? - query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil? - query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil? + query_params[:'pagesCount'] = opts[:'pages_count'] if !opts[:'pages_count'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -5344,66 +5328,60 @@ def get_text_with_http_info(name, llx, lly, urx, ury, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextRectsResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_la_te_x\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Read document page text annotation by ID. + # Converts PDF document (located on storage) to MOBIXML format and returns resulting file in response content # # @param name The document name. - # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [TextAnnotationResponse] - def get_text_annotation(name, annotation_id, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_pdf_in_storage_to_mobi_xml(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts) + data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts) + data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts) else raise end return data end - # Read document page text annotation by ID. + # Converts PDF document (located on storage) to MOBIXML format and returns resulting file in response content # # @param name The document name. - # @param annotation_id The annotation ID. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(TextAnnotationResponse, Fixnum, Hash)>] TextAnnotationResponse data, response status code and response headers - def get_text_annotation_with_http_info(name, annotation_id, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_text_annotation ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_mobi_xml ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text_annotation" - end - # verify the required parameter 'annotation_id' is set - if @api_client.config.client_side_validation && annotation_id.nil? - fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_text_annotation" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_mobi_xml" end # resource path - local_var_path = "/pdf/{name}/annotations/text/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + local_var_path = "/pdf/{name}/convert/mobixml".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -5422,67 +5400,67 @@ def get_text_annotation_with_http_info(name, annotation_id, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextAnnotationResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_mobi_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Verify signature document. + # Converts PDF document (located on storage) to PdfA format and returns resulting file in response content # # @param name The document name. - # @param sign_name Sign name. + # @param type Type of PdfA format. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [SignatureVerifyResponse] - def get_verify_signature(name, sign_name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_pdf_in_storage_to_pdf_a(name, type, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts) else raise end return data end - # Verify signature document. + # Converts PDF document (located on storage) to PdfA format and returns resulting file in response content # # @param name The document name. - # @param sign_name Sign name. + # @param type Type of PdfA format. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @return [Array<(SignatureVerifyResponse, Fixnum, Hash)>] SignatureVerifyResponse data, response status code and response headers - def get_verify_signature_with_http_info(name, sign_name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_verify_signature ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pdf_a ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_verify_signature" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pdf_a" end - # verify the required parameter 'sign_name' is set - if @api_client.config.client_side_validation && sign_name.nil? - fail ArgumentError, "Missing the required parameter 'sign_name' when calling PdfApi.get_verify_signature" + # verify the required parameter 'type' is set + if @api_client.config.client_side_validation && type.nil? + fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.get_pdf_in_storage_to_pdf_a" end # resource path - local_var_path = "/pdf/{name}/verifySignature".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'signName'] = sign_name - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'type'] = type query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -5501,73 +5479,60 @@ def get_verify_signature_with_http_info(name, sign_name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'SignatureVerifyResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_verify_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert web page to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to PPTX format and returns resulting file in response content # - # @param url Source url + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top + # @option opts [BOOLEAN] :separate_images Separate images. + # @option opts [BOOLEAN] :slides_as_images Slides as images. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_web_in_storage_to_pdf(url, opts = {}) + def get_pdf_in_storage_to_pptx(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts) + data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts) + data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts) else raise end return data end - # Convert web page to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to PPTX format and returns resulting file in response content # - # @param url Source url + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [Float] :height Page height - # @option opts [Float] :width Page width - # @option opts [BOOLEAN] :is_landscape Is page landscaped - # @option opts [Float] :margin_left Page margin left - # @option opts [Float] :margin_bottom Page margin bottom - # @option opts [Float] :margin_right Page margin right - # @option opts [Float] :margin_top Page margin top + # @option opts [BOOLEAN] :separate_images Separate images. + # @option opts [BOOLEAN] :slides_as_images Slides as images. + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_web_in_storage_to_pdf_with_http_info(url, opts = {}) + def get_pdf_in_storage_to_pptx_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_web_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pptx ..." end - # verify the required parameter 'url' is set - if @api_client.config.client_side_validation && url.nil? - fail ArgumentError, "Missing the required parameter 'url' when calling PdfApi.get_web_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pptx" end # resource path - local_var_path = "/pdf/create/web" + local_var_path = "/pdf/{name}/convert/pptx".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'url'] = url - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? - query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? - query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? - query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? - query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? + query_params[:'separateImages'] = opts[:'separate_images'] if !opts[:'separate_images'].nil? + query_params[:'slidesAsImages'] = opts[:'slides_as_images'] if !opts[:'slides_as_images'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters @@ -5594,58 +5559,61 @@ def get_web_in_storage_to_pdf_with_http_info(url, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_web_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get number of words per document page. + # Converts PDF document (located on storage) to SVG format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. # @option opts [String] :folder The document folder. - # @return [WordCountResponse] - def get_words_per_page(name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [File] + def get_pdf_in_storage_to_svg(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_words_per_page_with_http_info(name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_words_per_page_with_http_info(name, opts) + data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts) else raise end return data end - # Get number of words per document page. + # Converts PDF document (located on storage) to SVG format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :storage The document storage. + # @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. # @option opts [String] :folder The document folder. - # @return [Array<(WordCountResponse, Fixnum, Hash)>] WordCountResponse data, response status code and response headers - def get_words_per_page_with_http_info(name, opts = {}) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_pdf_in_storage_to_svg_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_words_per_page ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_svg ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_words_per_page" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_svg" end # resource path - local_var_path = "/pdf/{name}/pages/wordCount".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/convert/svg".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'compressOutputToZipArchive'] = opts[:'compress_output_to_zip_archive'] if !opts[:'compress_output_to_zip_archive'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -5664,53 +5632,98 @@ def get_words_per_page_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'WordCountResponse') + :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_words_per_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content + # Converts PDF document (located on storage) to TIFF format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :folder The document folder. - # @option opts [String] :storage The document storage. - # @return [File] - def get_xfa_pdf_in_storage_to_acro_form(name, opts = {}) - @api_client.request_token_if_needed - data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts) - rescue ApiError => error - if error.code == 401 - @api_client.refresh_token - data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts) + # @option opts [Float] :brightness Image brightness. + # @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. + # @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. + # @option opts [Integer] :left_margin Left image margin. + # @option opts [Integer] :right_margin Right image margin. + # @option opts [Integer] :top_margin Top image margin. + # @option opts [Integer] :bottom_margin Bottom image margin. + # @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. + # @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. + # @option opts [Integer] :width Image width. + # @option opts [Integer] :height Image height. + # @option opts [Integer] :x_resolution Horizontal resolution. + # @option opts [Integer] :y_resolution Vertical resolution. + # @option opts [Integer] :page_index Start page to export. + # @option opts [Integer] :page_count Number of pages to export. + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [File] + def get_pdf_in_storage_to_tiff(name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts) else raise end return data end - # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content + # Converts PDF document (located on storage) to TIFF format and returns resulting file in response content # # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [Float] :brightness Image brightness. + # @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. + # @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. + # @option opts [Integer] :left_margin Left image margin. + # @option opts [Integer] :right_margin Right image margin. + # @option opts [Integer] :top_margin Top image margin. + # @option opts [Integer] :bottom_margin Bottom image margin. + # @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. + # @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. + # @option opts [Integer] :width Image width. + # @option opts [Integer] :height Image height. + # @option opts [Integer] :x_resolution Horizontal resolution. + # @option opts [Integer] :y_resolution Vertical resolution. + # @option opts [Integer] :page_index Start page to export. + # @option opts [Integer] :page_count Number of pages to export. # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts = {}) + def get_pdf_in_storage_to_tiff_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_xfa_pdf_in_storage_to_acro_form ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_tiff ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_xfa_pdf_in_storage_to_acro_form" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_tiff" end # resource path - local_var_path = "/pdf/{name}/convert/xfatoacroform".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/convert/tiff".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} + query_params[:'brightness'] = opts[:'brightness'] if !opts[:'brightness'].nil? + query_params[:'compression'] = opts[:'compression'] if !opts[:'compression'].nil? + query_params[:'colorDepth'] = opts[:'color_depth'] if !opts[:'color_depth'].nil? + query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil? + query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil? + query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil? + query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil? + query_params[:'orientation'] = opts[:'orientation'] if !opts[:'orientation'].nil? + query_params[:'skipBlankPages'] = opts[:'skip_blank_pages'] if !opts[:'skip_blank_pages'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil? + query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].nil? + query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil? + query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? @@ -5738,53 +5751,64 @@ def get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_xfa_pdf_in_storage_to_acro_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert XML file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to XLS format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.xml) + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) + # @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first + # @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets + # @option opts [Float] :scale_factor Scale factor + # @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_xml_in_storage_to_pdf(src_path, opts = {}) + def get_pdf_in_storage_to_xls(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts) else raise end return data end - # Convert XML file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to XLS format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.xml) + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) + # @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first + # @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets + # @option opts [Float] :scale_factor Scale factor + # @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_xml_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_pdf_in_storage_to_xls_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_xml_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xls ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xml_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xls" end # resource path - local_var_path = "/pdf/create/xml" + local_var_path = "/pdf/{name}/convert/xls".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path - query_params[:'xslFilePath'] = opts[:'xsl_file_path'] if !opts[:'xsl_file_path'].nil? + query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil? + query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil? + query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil? + query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? # header parameters @@ -5811,126 +5835,1679 @@ def get_xml_in_storage_to_pdf_with_http_info(src_path, opts = {}) :auth_names => auth_names, :return_type => 'File') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_xml_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert XPS file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to XML format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.xps) + # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [File] - def get_xps_in_storage_to_pdf(src_path, opts = {}) + def get_pdf_in_storage_to_xml(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts) else raise end return data end - # Convert XPS file (located on storage) to PDF format and return resulting file in response. + # Converts PDF document (located on storage) to XML format and returns resulting file in response content # - # @param src_path Full source filename (ex. /folder1/folder2/template.xps) + # @param name The document name. # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. # @option opts [String] :storage The document storage. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_xps_in_storage_to_pdf_with_http_info(src_path, opts = {}) + def get_pdf_in_storage_to_xml_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_xps_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xml ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xps_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xml" + end + # resource path + local_var_path = "/pdf/{name}/convert/xml".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Converts PDF document (located on storage) to XPS format and returns resulting file in response content + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [File] + def get_pdf_in_storage_to_xps(name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts) + else + raise + end + return data + end + + # Converts PDF document (located on storage) to XPS format and returns resulting file in response content + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_pdf_in_storage_to_xps_with_http_info(name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xps ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xps" + end + # resource path + local_var_path = "/pdf/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read document page polyline annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [PolyLineAnnotationResponse] + def get_poly_line_annotation(name, annotation_id, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_poly_line_annotation_with_http_info(name, annotation_id, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_poly_line_annotation_with_http_info(name, annotation_id, opts) + else + raise + end + return data + end + + # Read document page polyline annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(PolyLineAnnotationResponse, Fixnum, Hash)>] PolyLineAnnotationResponse data, response status code and response headers + def get_poly_line_annotation_with_http_info(name, annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_poly_line_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_poly_line_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_poly_line_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/polyline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'PolyLineAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_poly_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read document page polygon annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [PolygonAnnotationResponse] + def get_polygon_annotation(name, annotation_id, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_polygon_annotation_with_http_info(name, annotation_id, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_polygon_annotation_with_http_info(name, annotation_id, opts) + else + raise + end + return data + end + + # Read document page polygon annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(PolygonAnnotationResponse, Fixnum, Hash)>] PolygonAnnotationResponse data, response status code and response headers + def get_polygon_annotation_with_http_info(name, annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_polygon_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_polygon_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_polygon_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/polygon/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'PolygonAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_polygon_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert PS file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.ps) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [File] + def get_ps_in_storage_to_pdf(src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts) + else + raise + end + return data + end + + # Convert PS file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.ps) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_ps_in_storage_to_pdf_with_http_info(src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_ps_in_storage_to_pdf ..." + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_ps_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/ps" + + # query parameters + query_params = {} + query_params[:'srcPath'] = src_path + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_ps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read document page square annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [SquareAnnotationResponse] + def get_square_annotation(name, annotation_id, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_square_annotation_with_http_info(name, annotation_id, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_square_annotation_with_http_info(name, annotation_id, opts) + else + raise + end + return data + end + + # Read document page square annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(SquareAnnotationResponse, Fixnum, Hash)>] SquareAnnotationResponse data, response status code and response headers + def get_square_annotation_with_http_info(name, annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_square_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_square_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_square_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/square/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'SquareAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_square_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert SVG file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.svg) + # @param [Hash] opts the optional parameters + # @option opts [BOOLEAN] :adjust_page_size Adjust page size + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top + # @option opts [String] :storage The document storage. + # @return [File] + def get_svg_in_storage_to_pdf(src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts) + else + raise + end + return data + end + + # Convert SVG file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.svg) + # @param [Hash] opts the optional parameters + # @option opts [BOOLEAN] :adjust_page_size Adjust page size + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_svg_in_storage_to_pdf_with_http_info(src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_svg_in_storage_to_pdf ..." + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_svg_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/svg" + + # query parameters + query_params = {} + query_params[:'srcPath'] = src_path + query_params[:'adjustPageSize'] = opts[:'adjust_page_size'] if !opts[:'adjust_page_size'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? + query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? + query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? + query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? + query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_svg_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read document text. + # + # @param name The document name. + # @param llx + # @param lly + # @param urx + # @param ury + # @param [Hash] opts the optional parameters + # @option opts [Array] :format List of formats for search. + # @option opts [String] :regex Formats are specified as a regular expression. + # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [TextRectsResponse] + def get_text(name, llx, lly, urx, ury, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts) + else + raise + end + return data + end + + # Read document text. + # + # @param name The document name. + # @param llx + # @param lly + # @param urx + # @param ury + # @param [Hash] opts the optional parameters + # @option opts [Array] :format List of formats for search. + # @option opts [String] :regex Formats are specified as a regular expression. + # @option opts [BOOLEAN] :split_rects Split result fragments (default is true). + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers + def get_text_with_http_info(name, llx, lly, urx, ury, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_text ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text" + end + # verify the required parameter 'llx' is set + if @api_client.config.client_side_validation && llx.nil? + fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_text" + end + # verify the required parameter 'lly' is set + if @api_client.config.client_side_validation && lly.nil? + fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_text" + end + # verify the required parameter 'urx' is set + if @api_client.config.client_side_validation && urx.nil? + fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_text" + end + # verify the required parameter 'ury' is set + if @api_client.config.client_side_validation && ury.nil? + fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_text" + end + # resource path + local_var_path = "/pdf/{name}/text".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'LLX'] = llx + query_params[:'LLY'] = lly + query_params[:'URX'] = urx + query_params[:'URY'] = ury + query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil? + query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil? + query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TextRectsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Read document page text annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [TextAnnotationResponse] + def get_text_annotation(name, annotation_id, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts) + else + raise + end + return data + end + + # Read document page text annotation by ID. + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(TextAnnotationResponse, Fixnum, Hash)>] TextAnnotationResponse data, response status code and response headers + def get_text_annotation_with_http_info(name, annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_text_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_text_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/text/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TextAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Verify signature document. + # + # @param name The document name. + # @param sign_name Sign name. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [SignatureVerifyResponse] + def get_verify_signature(name, sign_name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts) + else + raise + end + return data + end + + # Verify signature document. + # + # @param name The document name. + # @param sign_name Sign name. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(SignatureVerifyResponse, Fixnum, Hash)>] SignatureVerifyResponse data, response status code and response headers + def get_verify_signature_with_http_info(name, sign_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_verify_signature ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_verify_signature" + end + # verify the required parameter 'sign_name' is set + if @api_client.config.client_side_validation && sign_name.nil? + fail ArgumentError, "Missing the required parameter 'sign_name' when calling PdfApi.get_verify_signature" + end + # resource path + local_var_path = "/pdf/{name}/verifySignature".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'signName'] = sign_name + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'SignatureVerifyResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_verify_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert web page to PDF format and return resulting file in response. + # + # @param url Source url + # @param [Hash] opts the optional parameters + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top + # @option opts [String] :storage The document storage. + # @return [File] + def get_web_in_storage_to_pdf(url, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts) + else + raise + end + return data + end + + # Convert web page to PDF format and return resulting file in response. + # + # @param url Source url + # @param [Hash] opts the optional parameters + # @option opts [Float] :height Page height + # @option opts [Float] :width Page width + # @option opts [BOOLEAN] :is_landscape Is page landscaped + # @option opts [Float] :margin_left Page margin left + # @option opts [Float] :margin_bottom Page margin bottom + # @option opts [Float] :margin_right Page margin right + # @option opts [Float] :margin_top Page margin top + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_web_in_storage_to_pdf_with_http_info(url, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_web_in_storage_to_pdf ..." + end + # verify the required parameter 'url' is set + if @api_client.config.client_side_validation && url.nil? + fail ArgumentError, "Missing the required parameter 'url' when calling PdfApi.get_web_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/web" + + # query parameters + query_params = {} + query_params[:'url'] = url + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil? + query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil? + query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil? + query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil? + query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_web_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get number of words per document page. + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [WordCountResponse] + def get_words_per_page(name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_words_per_page_with_http_info(name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_words_per_page_with_http_info(name, opts) + else + raise + end + return data + end + + # Get number of words per document page. + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(WordCountResponse, Fixnum, Hash)>] WordCountResponse data, response status code and response headers + def get_words_per_page_with_http_info(name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_words_per_page ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_words_per_page" + end + # resource path + local_var_path = "/pdf/{name}/pages/wordCount".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'WordCountResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_words_per_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [File] + def get_xfa_pdf_in_storage_to_acro_form(name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts) + else + raise + end + return data + end + + # Converts PDF document which contatins XFA form (located on storage) to PDF with AcroForm and returns resulting file response content + # + # @param name The document name. + # @param [Hash] opts the optional parameters + # @option opts [String] :folder The document folder. + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_xfa_pdf_in_storage_to_acro_form ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_xfa_pdf_in_storage_to_acro_form" + end + # resource path + local_var_path = "/pdf/{name}/convert/xfatoacroform".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_xfa_pdf_in_storage_to_acro_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert XML file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xml) + # @param [Hash] opts the optional parameters + # @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) + # @option opts [String] :storage The document storage. + # @return [File] + def get_xml_in_storage_to_pdf(src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts) + else + raise + end + return data + end + + # Convert XML file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xml) + # @param [Hash] opts the optional parameters + # @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_xml_in_storage_to_pdf_with_http_info(src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_xml_in_storage_to_pdf ..." + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xml_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/xml" + + # query parameters + query_params = {} + query_params[:'srcPath'] = src_path + query_params[:'xslFilePath'] = opts[:'xsl_file_path'] if !opts[:'xsl_file_path'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_xml_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert XPS file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xps) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [File] + def get_xps_in_storage_to_pdf(src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts) + else + raise + end + return data + end + + # Convert XPS file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xps) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_xps_in_storage_to_pdf_with_http_info(src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_xps_in_storage_to_pdf ..." + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xps_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/xps" + + # query parameters + query_params = {} + query_params[:'srcPath'] = src_path + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_xps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert XslFo file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xslfo) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [File] + def get_xsl_fo_in_storage_to_pdf(src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts) + else + raise + end + return data + end + + # Convert XslFo file (located on storage) to PDF format and return resulting file in response. + # + # @param src_path Full source filename (ex. /folder1/folder2/template.xslfo) + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers + def get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.get_xsl_fo_in_storage_to_pdf ..." + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xsl_fo_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/create/xslfo" + + # query parameters + query_params = {} + query_params[:'srcPath'] = src_path + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'File') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#get_xsl_fo_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Append document to existing one. + # + # @param name The original document name. + # @param [Hash] opts the optional parameters + # @option opts [AppendDocument] :append_document with the append document data. + # @option opts [String] :append_file Append file server path. + # @option opts [Integer] :start_page Appending start page. (default to 0) + # @option opts [Integer] :end_page Appending end page. (default to 0) + # @option opts [String] :storage The documents storage. + # @option opts [String] :folder The original document folder. + # @return [DocumentResponse] + def post_append_document(name, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = post_append_document_with_http_info(name, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = post_append_document_with_http_info(name, opts) + else + raise + end + return data + end + + # Append document to existing one. + # + # @param name The original document name. + # @param [Hash] opts the optional parameters + # @option opts [AppendDocument] :append_document with the append document data. + # @option opts [String] :append_file Append file server path. + # @option opts [Integer] :start_page Appending start page. + # @option opts [Integer] :end_page Appending end page. + # @option opts [String] :storage The documents storage. + # @option opts [String] :folder The original document folder. + # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers + def post_append_document_with_http_info(name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.post_append_document ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_append_document" + end + # resource path + local_var_path = "/pdf/{name}/appendDocument".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'appendFile'] = opts[:'append_file'] if !opts[:'append_file'].nil? + query_params[:'startPage'] = opts[:'start_page'] if !opts[:'start_page'].nil? + query_params[:'endPage'] = opts[:'end_page'] if !opts[:'end_page'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'append_document']) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'DocumentResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#post_append_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create field. + # + # @param name The document name. + # @param page Document page number. + # @param [Hash] opts the optional parameters + # @option opts [Field] :field with the field data. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [AsposeResponse] + def post_create_field(name, page, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = post_create_field_with_http_info(name, page, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = post_create_field_with_http_info(name, page, opts) + else + raise + end + return data + end + + # Create field. + # + # @param name The document name. + # @param page Document page number. + # @param [Hash] opts the optional parameters + # @option opts [Field] :field with the field data. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def post_create_field_with_http_info(name, page, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.post_create_field ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_create_field" + end + # verify the required parameter 'page' is set + if @api_client.config.client_side_validation && page.nil? + fail ArgumentError, "Missing the required parameter 'page' when calling PdfApi.post_create_field" + end + # resource path + local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'page'] = page + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'field']) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'AsposeResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#post_create_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Document's replace text method. + # + # @param name + # @param text_replace + # @param [Hash] opts the optional parameters + # @option opts [String] :storage + # @option opts [String] :folder + # @return [TextReplaceResponse] + def post_document_text_replace(name, text_replace, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts) + else + raise + end + return data + end + + # Document's replace text method. + # + # @param name + # @param text_replace + # @param [Hash] opts the optional parameters + # @option opts [String] :storage + # @option opts [String] :folder + # @return [Array<(TextReplaceResponse, Fixnum, Hash)>] TextReplaceResponse data, response status code and response headers + def post_document_text_replace_with_http_info(name, text_replace, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_replace ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_replace" + end + # verify the required parameter 'text_replace' is set + if @api_client.config.client_side_validation && text_replace.nil? + fail ArgumentError, "Missing the required parameter 'text_replace' when calling PdfApi.post_document_text_replace" + end + # resource path + local_var_path = "/pdf/{name}/text/replace".sub('{' + 'name' + '}', name.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(text_replace) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'TextReplaceResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#post_document_text_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Insert image to document page. + # + # @param name The document name. + # @param page_number The page number. + # @param llx Coordinate lower left X. + # @param lly Coordinate lower left Y. + # @param urx Coordinate upper right X. + # @param ury Coordinate upper right Y. + # @param [Hash] opts the optional parameters + # @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @option opts [File] :image Image file. + # @return [AsposeResponse] + def post_insert_image(name, page_number, llx, lly, urx, ury, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts) + else + raise + end + return data + end + + # Insert image to document page. + # + # @param name The document name. + # @param page_number The page number. + # @param llx Coordinate lower left X. + # @param lly Coordinate lower left Y. + # @param urx Coordinate upper right X. + # @param ury Coordinate upper right Y. + # @param [Hash] opts the optional parameters + # @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @option opts [File] :image Image file. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.post_insert_image ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_insert_image" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_insert_image" + end + # verify the required parameter 'llx' is set + if @api_client.config.client_side_validation && llx.nil? + fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.post_insert_image" + end + # verify the required parameter 'lly' is set + if @api_client.config.client_side_validation && lly.nil? + fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.post_insert_image" + end + # verify the required parameter 'urx' is set + if @api_client.config.client_side_validation && urx.nil? + fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.post_insert_image" + end + # verify the required parameter 'ury' is set + if @api_client.config.client_side_validation && ury.nil? + fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.post_insert_image" end # resource path - local_var_path = "/pdf/create/xps" + local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'llx'] = llx + query_params[:'lly'] = lly + query_params[:'urx'] = urx + query_params[:'ury'] = ury + query_params[:'imageFilePath'] = opts[:'image_file_path'] if !opts[:'image_file_path'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} # Fix header in file post_body = nil + post_body = opts[:'image'] if !opts[:'image'].nil? + header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) # http body (model) # Fix header in file # post_body = nil auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, + data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_xps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_insert_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert XslFo file (located on storage) to PDF format and return resulting file in response. + # Move page to new position. # - # @param src_path Full source filename (ex. /folder1/folder2/template.xslfo) + # @param name The document name. + # @param page_number The page number. + # @param new_index The new page position/index. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. - # @return [File] - def get_xsl_fo_in_storage_to_pdf(src_path, opts = {}) + # @option opts [String] :folder The document folder. + # @return [AsposeResponse] + def post_move_page(name, page_number, new_index, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts) + data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts) else raise end return data end - # Convert XslFo file (located on storage) to PDF format and return resulting file in response. + # Move page to new position. # - # @param src_path Full source filename (ex. /folder1/folder2/template.xslfo) + # @param name The document name. + # @param page_number The page number. + # @param new_index The new page position/index. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. - # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers - def get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def post_move_page_with_http_info(name, page_number, new_index, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.get_xsl_fo_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_move_page ..." end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xsl_fo_in_storage_to_pdf" + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_move_page" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_move_page" + end + # verify the required parameter 'new_index' is set + if @api_client.config.client_side_validation && new_index.nil? + fail ArgumentError, "Missing the required parameter 'new_index' when calling PdfApi.post_move_page" end # resource path - local_var_path = "/pdf/create/xslfo" + local_var_path = "/pdf/{name}/pages/{pageNumber}/movePage".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path + query_params[:'newIndex'] = new_index query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -5943,70 +7520,61 @@ def get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts = {}) # Fix header in file # post_body = nil auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, + data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'File') + :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#get_xsl_fo_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_move_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Append document to existing one. + # Optimize document. # - # @param name The original document name. + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [AppendDocument] :append_document with the append document data. - # @option opts [String] :append_file Append file server path. - # @option opts [Integer] :start_page Appending start page. (default to 0) - # @option opts [Integer] :end_page Appending end page. (default to 0) - # @option opts [String] :storage The documents storage. - # @option opts [String] :folder The original document folder. - # @return [DocumentResponse] - def post_append_document(name, opts = {}) + # @option opts [OptimizeOptions] :options The optimization options. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [AsposeResponse] + def post_optimize_document(name, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_append_document_with_http_info(name, opts) + data, _status_code, _headers = post_optimize_document_with_http_info(name, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_append_document_with_http_info(name, opts) + data, _status_code, _headers = post_optimize_document_with_http_info(name, opts) else raise end return data end - # Append document to existing one. + # Optimize document. # - # @param name The original document name. + # @param name The document name. # @param [Hash] opts the optional parameters - # @option opts [AppendDocument] :append_document with the append document data. - # @option opts [String] :append_file Append file server path. - # @option opts [Integer] :start_page Appending start page. - # @option opts [Integer] :end_page Appending end page. - # @option opts [String] :storage The documents storage. - # @option opts [String] :folder The original document folder. - # @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers - def post_append_document_with_http_info(name, opts = {}) + # @option opts [OptimizeOptions] :options The optimization options. + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def post_optimize_document_with_http_info(name, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_append_document ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_optimize_document ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_append_document" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_optimize_document" end # resource path - local_var_path = "/pdf/{name}/appendDocument".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/optimize".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'appendFile'] = opts[:'append_file'] if !opts[:'append_file'].nil? - query_params[:'startPage'] = opts[:'start_page'] if !opts[:'start_page'].nil? - query_params[:'endPage'] = opts[:'end_page'] if !opts[:'end_page'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -6023,7 +7591,7 @@ def post_append_document_with_http_info(name, opts = {}) post_body = nil # http body (model) - post_body = @api_client.object_to_http_body(opts[:'append_document']) + post_body = @api_client.object_to_http_body(opts[:'options']) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6031,62 +7599,65 @@ def post_append_document_with_http_info(name, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'DocumentResponse') + :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_append_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_optimize_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create field. + # Add document page circle annotations. # # @param name The document name. - # @param page Document page number. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [Field] :field with the field data. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [AsposeResponse] - def post_create_field(name, page, opts = {}) + def post_page_circle_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_create_field_with_http_info(name, page, opts) + data, _status_code, _headers = post_page_circle_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_create_field_with_http_info(name, page, opts) + data, _status_code, _headers = post_page_circle_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Create field. + # Add document page circle annotations. # # @param name The document name. - # @param page Document page number. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [Field] :field with the field data. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_create_field_with_http_info(name, page, opts = {}) + def post_page_circle_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_create_field ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_circle_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_create_field" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_circle_annotations" end - # verify the required parameter 'page' is set - if @api_client.config.client_side_validation && page.nil? - fail ArgumentError, "Missing the required parameter 'page' when calling PdfApi.post_create_field" + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_circle_annotations" + end + # verify the required parameter 'annotations' is set + if @api_client.config.client_side_validation && annotations.nil? + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_circle_annotations" end # resource path - local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/circle".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'page'] = page query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -6103,7 +7674,7 @@ def post_create_field_with_http_info(name, page, opts = {}) post_body = nil # http body (model) - post_body = @api_client.object_to_http_body(opts[:'field']) + post_body = @api_client.object_to_http_body(annotations) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6113,54 +7684,60 @@ def post_create_field_with_http_info(name, page, opts = {}) :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_create_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Document's replace text method. + # Add document page free text annotations. # - # @param name - # @param text_replace + # @param name The document name. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [TextReplaceResponse] - def post_document_text_replace(name, text_replace, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [AsposeResponse] + def post_page_free_text_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts) + data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts) + data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Document's replace text method. + # Add document page free text annotations. # - # @param name - # @param text_replace + # @param name The document name. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :storage - # @option opts [String] :folder - # @return [Array<(TextReplaceResponse, Fixnum, Hash)>] TextReplaceResponse data, response status code and response headers - def post_document_text_replace_with_http_info(name, text_replace, opts = {}) + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_replace ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_free_text_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_replace" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_free_text_annotations" end - # verify the required parameter 'text_replace' is set - if @api_client.config.client_side_validation && text_replace.nil? - fail ArgumentError, "Missing the required parameter 'text_replace' when calling PdfApi.post_document_text_replace" + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_free_text_annotations" + end + # verify the required parameter 'annotations' is set + if @api_client.config.client_side_validation && annotations.nil? + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_free_text_annotations" end # resource path - local_var_path = "/pdf/{name}/text/replace".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -6180,7 +7757,7 @@ def post_document_text_replace_with_http_info(name, text_replace, opts = {}) post_body = nil # http body (model) - post_body = @api_client.object_to_http_body(text_replace) + post_body = @api_client.object_to_http_body(annotations) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6188,92 +7765,65 @@ def post_document_text_replace_with_http_info(name, text_replace, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'TextReplaceResponse') + :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_document_text_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Insert image to document page. + # Add document page line annotations. # # @param name The document name. # @param page_number The page number. - # @param llx Coordinate lower left X. - # @param lly Coordinate lower left Y. - # @param urx Coordinate upper right X. - # @param ury Coordinate upper right Y. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @option opts [File] :image Image file. # @return [AsposeResponse] - def post_insert_image(name, page_number, llx, lly, urx, ury, opts = {}) + def post_page_line_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts) + data, _status_code, _headers = post_page_line_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts) + data, _status_code, _headers = post_page_line_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Insert image to document page. + # Add document page line annotations. # # @param name The document name. # @param page_number The page number. - # @param llx Coordinate lower left X. - # @param lly Coordinate lower left Y. - # @param urx Coordinate upper right X. - # @param ury Coordinate upper right Y. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. - # @option opts [File] :image Image file. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) + def post_page_line_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_insert_image ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_insert_image" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_line_annotations" end # verify the required parameter 'page_number' is set - if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_insert_image" - end - # verify the required parameter 'llx' is set - if @api_client.config.client_side_validation && llx.nil? - fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.post_insert_image" - end - # verify the required parameter 'lly' is set - if @api_client.config.client_side_validation && lly.nil? - fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.post_insert_image" - end - # verify the required parameter 'urx' is set - if @api_client.config.client_side_validation && urx.nil? - fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.post_insert_image" - end - # verify the required parameter 'ury' is set - if @api_client.config.client_side_validation && ury.nil? - fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.post_insert_image" + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_line_annotations" + end + # verify the required parameter 'annotations' is set + if @api_client.config.client_side_validation && annotations.nil? + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_line_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/line".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'llx'] = llx - query_params[:'lly'] = lly - query_params[:'urx'] = urx - query_params[:'ury'] = ury - query_params[:'imageFilePath'] = opts[:'image_file_path'] if !opts[:'image_file_path'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -6282,18 +7832,15 @@ def post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # Fix header in file post_body = nil - post_body = opts[:'image'] if !opts[:'image'].nil? - header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream']) # http body (model) - # Fix header in file - # post_body = nil + post_body = @api_client.object_to_http_body(annotations) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6303,64 +7850,63 @@ def post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_insert_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Move page to new position. + # Add document page link annotations. # # @param name The document name. # @param page_number The page number. - # @param new_index The new page position/index. + # @param links Array of link anotation. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [AsposeResponse] - def post_move_page(name, page_number, new_index, opts = {}) + def post_page_link_annotations(name, page_number, links, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts) + data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts) + data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts) else raise end return data end - # Move page to new position. + # Add document page link annotations. # # @param name The document name. # @param page_number The page number. - # @param new_index The new page position/index. + # @param links Array of link anotation. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_move_page_with_http_info(name, page_number, new_index, opts = {}) + def post_page_link_annotations_with_http_info(name, page_number, links, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_move_page ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_link_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_move_page" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_link_annotations" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_move_page" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_link_annotations" end - # verify the required parameter 'new_index' is set - if @api_client.config.client_side_validation && new_index.nil? - fail ArgumentError, "Missing the required parameter 'new_index' when calling PdfApi.post_move_page" + # verify the required parameter 'links' is set + if @api_client.config.client_side_validation && links.nil? + fail ArgumentError, "Missing the required parameter 'links' when calling PdfApi.post_page_link_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/movePage".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/links".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} - query_params[:'newIndex'] = new_index query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? @@ -6377,8 +7923,7 @@ def post_move_page_with_http_info(name, page_number, new_index, opts = {}) post_body = nil # http body (model) - # Fix header in file - # post_body = nil + post_body = @api_client.object_to_http_body(links) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6388,50 +7933,60 @@ def post_move_page_with_http_info(name, page_number, new_index, opts = {}) :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_move_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_link_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Optimize document. + # Add document page polyline annotations. # # @param name The document name. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [OptimizeOptions] :options The optimization options. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [AsposeResponse] - def post_optimize_document(name, opts = {}) + def post_page_poly_line_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_optimize_document_with_http_info(name, opts) + data, _status_code, _headers = post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_optimize_document_with_http_info(name, opts) + data, _status_code, _headers = post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Optimize document. + # Add document page polyline annotations. # # @param name The document name. + # @param page_number The page number. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters - # @option opts [OptimizeOptions] :options The optimization options. # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_optimize_document_with_http_info(name, opts = {}) + def post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_optimize_document ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_poly_line_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_optimize_document" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_poly_line_annotations" + end + # verify the required parameter 'page_number' is set + if @api_client.config.client_side_validation && page_number.nil? + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_poly_line_annotations" + end + # verify the required parameter 'annotations' is set + if @api_client.config.client_side_validation && annotations.nil? + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_poly_line_annotations" end # resource path - local_var_path = "/pdf/{name}/optimize".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polyline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -6451,7 +8006,7 @@ def post_optimize_document_with_http_info(name, opts = {}) post_body = nil # http body (model) - post_body = @api_client.object_to_http_body(opts[:'options']) + post_body = @api_client.object_to_http_body(annotations) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6461,12 +8016,12 @@ def post_optimize_document_with_http_info(name, opts = {}) :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_optimize_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Add document page free text annotations. + # Add document page polygon annotations. # # @param name The document name. # @param page_number The page number. @@ -6475,20 +8030,20 @@ def post_optimize_document_with_http_info(name, opts = {}) # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [AsposeResponse] - def post_page_free_text_annotations(name, page_number, annotations, opts = {}) + def post_page_polygon_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts) + data, _status_code, _headers = post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts) + data, _status_code, _headers = post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Add document page free text annotations. + # Add document page polygon annotations. # # @param name The document name. # @param page_number The page number. @@ -6497,24 +8052,24 @@ def post_page_free_text_annotations(name, page_number, annotations, opts = {}) # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts = {}) + def post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_page_free_text_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_polygon_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_polygon_annotations" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_polygon_annotations" end # verify the required parameter 'annotations' is set if @api_client.config.client_side_validation && annotations.nil? - fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_free_text_annotations" + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_polygon_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polygon".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -6544,60 +8099,60 @@ def post_page_free_text_annotations_with_http_info(name, page_number, annotation :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Add document page link annotations. + # Add document page square annotations. # # @param name The document name. # @param page_number The page number. - # @param links Array of link anotation. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [AsposeResponse] - def post_page_link_annotations(name, page_number, links, opts = {}) + def post_page_square_annotations(name, page_number, annotations, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts) + data, _status_code, _headers = post_page_square_annotations_with_http_info(name, page_number, annotations, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts) + data, _status_code, _headers = post_page_square_annotations_with_http_info(name, page_number, annotations, opts) else raise end return data end - # Add document page link annotations. + # Add document page square annotations. # # @param name The document name. # @param page_number The page number. - # @param links Array of link anotation. + # @param annotations The array of annotation. # @param [Hash] opts the optional parameters # @option opts [String] :storage The document storage. # @option opts [String] :folder The document folder. # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def post_page_link_annotations_with_http_info(name, page_number, links, opts = {}) + def post_page_square_annotations_with_http_info(name, page_number, annotations, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.post_page_link_annotations ..." + @api_client.config.logger.debug "Calling API: PdfApi.post_page_square_annotations ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_link_annotations" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_square_annotations" end # verify the required parameter 'page_number' is set if @api_client.config.client_side_validation && page_number.nil? - fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_link_annotations" + fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_square_annotations" end - # verify the required parameter 'links' is set - if @api_client.config.client_side_validation && links.nil? - fail ArgumentError, "Missing the required parameter 'links' when calling PdfApi.post_page_link_annotations" + # verify the required parameter 'annotations' is set + if @api_client.config.client_side_validation && annotations.nil? + fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_square_annotations" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/links".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/square".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) # query parameters query_params = {} @@ -6617,7 +8172,7 @@ def post_page_link_annotations_with_http_info(name, page_number, links, opts = { post_body = nil # http body (model) - post_body = @api_client.object_to_http_body(links) + post_body = @api_client.object_to_http_body(annotations) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, @@ -6627,7 +8182,7 @@ def post_page_link_annotations_with_http_info(name, page_number, links, opts = { :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#post_page_link_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#post_page_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -7182,6 +8737,89 @@ def put_add_text_with_http_info(name, page_number, opts = {}) return data, status_code, headers end + # Replace document circle annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [CircleAnnotationResponse] + def put_circle_annotation(name, annotation_id, annotation, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = put_circle_annotation_with_http_info(name, annotation_id, annotation, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = put_circle_annotation_with_http_info(name, annotation_id, annotation, opts) + else + raise + end + return data + end + + # Replace document circle annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(CircleAnnotationResponse, Fixnum, Hash)>] CircleAnnotationResponse data, response status code and response headers + def put_circle_annotation_with_http_info(name, annotation_id, annotation, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.put_circle_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_circle_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_circle_annotation" + end + # verify the required parameter 'annotation' is set + if @api_client.config.client_side_validation && annotation.nil? + fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_circle_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/circle/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(annotation) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'CircleAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#put_circle_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Upload a specific file # # @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext @@ -8411,15 +10049,94 @@ def put_images_extract_as_tiff_with_http_info(name, page_number, opts = {}) fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_images_extract_as_tiff" end # resource path - local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s) + + # query parameters + query_params = {} + query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? + query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + # Fix header in file + # post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'AsposeResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. + # + # @param name The document name. + # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param [Hash] opts the optional parameters + # @option opts [String] :dst_folder The destination document folder. + # @option opts [String] :storage The document storage. + # @return [AsposeResponse] + def put_la_te_x_in_storage_to_pdf(name, src_path, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts) + else + raise + end + return data + end + + # Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. + # + # @param name The document name. + # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param [Hash] opts the optional parameters + # @option opts [String] :dst_folder The destination document folder. + # @option opts [String] :storage The document storage. + # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers + def put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.put_la_te_x_in_storage_to_pdf ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_la_te_x_in_storage_to_pdf" + end + # verify the required parameter 'src_path' is set + if @api_client.config.client_side_validation && src_path.nil? + fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_la_te_x_in_storage_to_pdf" + end + # resource path + local_var_path = "/pdf/{name}/create/latex".sub('{' + 'name' + '}', name.to_s) # query parameters query_params = {} - query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil? - query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil? + query_params[:'srcPath'] = src_path + query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? - query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? - query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil? # header parameters header_params = {} @@ -8445,60 +10162,65 @@ def put_images_extract_as_tiff_with_http_info(name, page_number, opts = {}) :auth_names => auth_names, :return_type => 'AsposeResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#put_la_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. + # Replace document line annotation # # @param name The document name. - # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param annotation_id The annotation ID. + # @param annotation Annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :dst_folder The destination document folder. # @option opts [String] :storage The document storage. - # @return [AsposeResponse] - def put_la_te_x_in_storage_to_pdf(name, src_path, opts = {}) + # @option opts [String] :folder The document folder. + # @return [LineAnnotationResponse] + def put_line_annotation(name, annotation_id, annotation, opts = {}) @api_client.request_token_if_needed - data, _status_code, _headers = put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts) + data, _status_code, _headers = put_line_annotation_with_http_info(name, annotation_id, annotation, opts) rescue ApiError => error if error.code == 401 @api_client.refresh_token - data, _status_code, _headers = put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts) + data, _status_code, _headers = put_line_annotation_with_http_info(name, annotation_id, annotation, opts) else raise end return data end - # Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. + # Replace document line annotation # # @param name The document name. - # @param src_path Full source filename (ex. /folder1/folder2/template.tex) + # @param annotation_id The annotation ID. + # @param annotation Annotation. # @param [Hash] opts the optional parameters - # @option opts [String] :dst_folder The destination document folder. # @option opts [String] :storage The document storage. - # @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers - def put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) + # @option opts [String] :folder The document folder. + # @return [Array<(LineAnnotationResponse, Fixnum, Hash)>] LineAnnotationResponse data, response status code and response headers + def put_line_annotation_with_http_info(name, annotation_id, annotation, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: PdfApi.put_la_te_x_in_storage_to_pdf ..." + @api_client.config.logger.debug "Calling API: PdfApi.put_line_annotation ..." end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? - fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_la_te_x_in_storage_to_pdf" + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_line_annotation" end - # verify the required parameter 'src_path' is set - if @api_client.config.client_side_validation && src_path.nil? - fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_la_te_x_in_storage_to_pdf" + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_line_annotation" + end + # verify the required parameter 'annotation' is set + if @api_client.config.client_side_validation && annotation.nil? + fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_line_annotation" end # resource path - local_var_path = "/pdf/{name}/create/latex".sub('{' + 'name' + '}', name.to_s) + local_var_path = "/pdf/{name}/annotations/line/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) # query parameters query_params = {} - query_params[:'srcPath'] = src_path - query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil? query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? # header parameters header_params = {} @@ -8513,8 +10235,7 @@ def put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) post_body = nil # http body (model) - # Fix header in file - # post_body = nil + post_body = @api_client.object_to_http_body(annotation) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, @@ -8522,9 +10243,9 @@ def put_la_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'AsposeResponse') + :return_type => 'LineAnnotationResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: PdfApi#put_la_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: PdfApi#put_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -11676,6 +13397,172 @@ def put_pdf_in_storage_to_xps_with_http_info(name, out_path, opts = {}) return data, status_code, headers end + # Replace document polyline annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [PolyLineAnnotationResponse] + def put_poly_line_annotation(name, annotation_id, annotation, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts) + else + raise + end + return data + end + + # Replace document polyline annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(PolyLineAnnotationResponse, Fixnum, Hash)>] PolyLineAnnotationResponse data, response status code and response headers + def put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.put_poly_line_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_poly_line_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_poly_line_annotation" + end + # verify the required parameter 'annotation' is set + if @api_client.config.client_side_validation && annotation.nil? + fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_poly_line_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/polyline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(annotation) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'PolyLineAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#put_poly_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Replace document polygon annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [PolygonAnnotationResponse] + def put_polygon_annotation(name, annotation_id, annotation, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts) + else + raise + end + return data + end + + # Replace document polygon annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(PolygonAnnotationResponse, Fixnum, Hash)>] PolygonAnnotationResponse data, response status code and response headers + def put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.put_polygon_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_polygon_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_polygon_annotation" + end + # verify the required parameter 'annotation' is set + if @api_client.config.client_side_validation && annotation.nil? + fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_polygon_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/polygon/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(annotation) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'PolygonAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#put_polygon_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update privilege document. # # @param name The document name. @@ -12073,6 +13960,89 @@ def put_set_property_with_http_info(name, property_name, value, opts = {}) return data, status_code, headers end + # Replace document square annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [SquareAnnotationResponse] + def put_square_annotation(name, annotation_id, annotation, opts = {}) + @api_client.request_token_if_needed + data, _status_code, _headers = put_square_annotation_with_http_info(name, annotation_id, annotation, opts) + rescue ApiError => error + if error.code == 401 + @api_client.refresh_token + data, _status_code, _headers = put_square_annotation_with_http_info(name, annotation_id, annotation, opts) + else + raise + end + return data + end + + # Replace document square annotation + # + # @param name The document name. + # @param annotation_id The annotation ID. + # @param annotation Annotation. + # @param [Hash] opts the optional parameters + # @option opts [String] :storage The document storage. + # @option opts [String] :folder The document folder. + # @return [Array<(SquareAnnotationResponse, Fixnum, Hash)>] SquareAnnotationResponse data, response status code and response headers + def put_square_annotation_with_http_info(name, annotation_id, annotation, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PdfApi.put_square_annotation ..." + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_square_annotation" + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_square_annotation" + end + # verify the required parameter 'annotation' is set + if @api_client.config.client_side_validation && annotation.nil? + fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_square_annotation" + end + # resource path + local_var_path = "/pdf/{name}/annotations/square/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s) + + # query parameters + query_params = {} + query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil? + query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + # Fix header in file + post_body = nil + + # http body (model) + post_body = @api_client.object_to_http_body(annotation) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'SquareAnnotationResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PdfApi#put_square_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Convert SVG file (located on storage) to PDF format and upload resulting file to storage. # # @param name The document name. diff --git a/lib/aspose_pdf_cloud/models/caption_position.rb b/lib/aspose_pdf_cloud/models/caption_position.rb new file mode 100644 index 0000000..20e9404 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/caption_position.rb @@ -0,0 +1,43 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + class CaptionPosition + + INLINE = "Inline".freeze + TOP = "Top".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME) + # consantValues = CaptionPosition.constants.select{|c| c.to_s == value} + constantValues = CaptionPosition.constants.select{ |const_name| CaptionPosition.const_get(const_name) == value} + + raise "Invalid ENUM value #{value} for class #CaptionPosition" if constantValues.empty? + value + end + end + +end diff --git a/lib/aspose_pdf_cloud/models/circle_annotation.rb b/lib/aspose_pdf_cloud/models/circle_annotation.rb new file mode 100644 index 0000000..96890d5 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/circle_annotation.rb @@ -0,0 +1,372 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides CircleAnnotation. + class CircleAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Get the annotation InteriorColor. + attr_accessor :interior_color + + # Get or set the annotation Rectangle of frame. + attr_accessor :frame + + # Color of the annotation. + attr_accessor :color + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'frame' => :'Frame', + :'color' => :'Color' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'frame' => :'RectanglePdf', + :'color' => :'Color' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'Frame') + self.frame = attributes[:'Frame'] + end + + if attributes.has_key?(:'Color') + self.color = attributes[:'Color'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + frame == o.frame && + color == o.color + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, frame, color].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/circle_annotation_response.rb b/lib/aspose_pdf_cloud/models/circle_annotation_response.rb new file mode 100644 index 0000000..c854113 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/circle_annotation_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class CircleAnnotationResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotation + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotation' => :'Annotation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotation' => :'CircleAnnotation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotation') + self.annotation = attributes[:'Annotation'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotation == o.annotation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/circle_annotations.rb b/lib/aspose_pdf_cloud/models/circle_annotations.rb new file mode 100644 index 0000000..3151efb --- /dev/null +++ b/lib/aspose_pdf_cloud/models/circle_annotations.rb @@ -0,0 +1,211 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # List of annotations. + class CircleAnnotations + # Link to the document. + attr_accessor :links + + attr_accessor :list + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'list' => :'List' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'list' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'List') + if (value = attributes[:'List']).is_a?(Array) + self.list = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + list == o.list + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, list].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/circle_annotations_response.rb b/lib/aspose_pdf_cloud/models/circle_annotations_response.rb new file mode 100644 index 0000000..fbb1a6a --- /dev/null +++ b/lib/aspose_pdf_cloud/models/circle_annotations_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class CircleAnnotationsResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotations + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotations' => :'Annotations' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotations' => :'CircleAnnotations' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotations') + self.annotations = attributes[:'Annotations'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotations == o.annotations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/common_figure_annotation.rb b/lib/aspose_pdf_cloud/models/common_figure_annotation.rb new file mode 100644 index 0000000..6a678fc --- /dev/null +++ b/lib/aspose_pdf_cloud/models/common_figure_annotation.rb @@ -0,0 +1,362 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides CommonFigureAnnotation. + class CommonFigureAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Get the annotation InteriorColor. + attr_accessor :interior_color + + # Get or set the annotation Rectangle of frame. + attr_accessor :frame + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'frame' => :'Frame' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'frame' => :'RectanglePdf' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'Frame') + self.frame = attributes[:'Frame'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + frame == o.frame + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, frame].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_annotation.rb b/lib/aspose_pdf_cloud/models/line_annotation.rb new file mode 100644 index 0000000..bdf3fcc --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_annotation.rb @@ -0,0 +1,472 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides LineAnnotation. + class LineAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Gets or sets starting point of line. + attr_accessor :starting + + # Gets or sets line ending style for line starting point. + attr_accessor :starting_style + + # Gets or sets ending point of line. + attr_accessor :ending + + # Gets or sets ending style for end point of line. + attr_accessor :ending_style + + # Gets or sets interior color of the annotation. + attr_accessor :interior_color + + # Gets or sets leader line length. + attr_accessor :leader_line + + # Gets or sets length of leader line extension. + attr_accessor :leader_line_extension + + # Gets or sets leader line offset. + attr_accessor :leader_line_offset + + # Gets or sets boolean flag which determinies is contents must be shown as caption. + attr_accessor :show_caption + + # Gets or sets caption text offset from its normal position. + attr_accessor :caption_offset + + # Gets or sets annotation caption position. + attr_accessor :caption_position + + # Color of the annotation. + attr_accessor :color + + # Gets or sets the intent of the line annotation. + attr_accessor :intent + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'starting' => :'Starting', + :'starting_style' => :'StartingStyle', + :'ending' => :'Ending', + :'ending_style' => :'EndingStyle', + :'interior_color' => :'InteriorColor', + :'leader_line' => :'LeaderLine', + :'leader_line_extension' => :'LeaderLineExtension', + :'leader_line_offset' => :'LeaderLineOffset', + :'show_caption' => :'ShowCaption', + :'caption_offset' => :'CaptionOffset', + :'caption_position' => :'CaptionPosition', + :'color' => :'Color', + :'intent' => :'Intent' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'starting' => :'Point', + :'starting_style' => :'LineEnding', + :'ending' => :'Point', + :'ending_style' => :'LineEnding', + :'interior_color' => :'Color', + :'leader_line' => :'Float', + :'leader_line_extension' => :'Float', + :'leader_line_offset' => :'Float', + :'show_caption' => :'BOOLEAN', + :'caption_offset' => :'Point', + :'caption_position' => :'CaptionPosition', + :'color' => :'Color', + :'intent' => :'LineIntent' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'Starting') + self.starting = attributes[:'Starting'] + end + + if attributes.has_key?(:'StartingStyle') + self.starting_style = attributes[:'StartingStyle'] + end + + if attributes.has_key?(:'Ending') + self.ending = attributes[:'Ending'] + end + + if attributes.has_key?(:'EndingStyle') + self.ending_style = attributes[:'EndingStyle'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'LeaderLine') + self.leader_line = attributes[:'LeaderLine'] + end + + if attributes.has_key?(:'LeaderLineExtension') + self.leader_line_extension = attributes[:'LeaderLineExtension'] + end + + if attributes.has_key?(:'LeaderLineOffset') + self.leader_line_offset = attributes[:'LeaderLineOffset'] + end + + if attributes.has_key?(:'ShowCaption') + self.show_caption = attributes[:'ShowCaption'] + end + + if attributes.has_key?(:'CaptionOffset') + self.caption_offset = attributes[:'CaptionOffset'] + end + + if attributes.has_key?(:'CaptionPosition') + self.caption_position = attributes[:'CaptionPosition'] + end + + if attributes.has_key?(:'Color') + self.color = attributes[:'Color'] + end + + if attributes.has_key?(:'Intent') + self.intent = attributes[:'Intent'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + starting == o.starting && + starting_style == o.starting_style && + ending == o.ending && + ending_style == o.ending_style && + interior_color == o.interior_color && + leader_line == o.leader_line && + leader_line_extension == o.leader_line_extension && + leader_line_offset == o.leader_line_offset && + show_caption == o.show_caption && + caption_offset == o.caption_offset && + caption_position == o.caption_position && + color == o.color && + intent == o.intent + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, starting, starting_style, ending, ending_style, interior_color, leader_line, leader_line_extension, leader_line_offset, show_caption, caption_offset, caption_position, color, intent].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_annotation_response.rb b/lib/aspose_pdf_cloud/models/line_annotation_response.rb new file mode 100644 index 0000000..9d77528 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_annotation_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class LineAnnotationResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotation + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotation' => :'Annotation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotation' => :'LineAnnotation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotation') + self.annotation = attributes[:'Annotation'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotation == o.annotation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_annotations.rb b/lib/aspose_pdf_cloud/models/line_annotations.rb new file mode 100644 index 0000000..6446a18 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_annotations.rb @@ -0,0 +1,211 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # List of annotations. + class LineAnnotations + # Link to the document. + attr_accessor :links + + attr_accessor :list + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'list' => :'List' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'list' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'List') + if (value = attributes[:'List']).is_a?(Array) + self.list = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + list == o.list + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, list].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_annotations_response.rb b/lib/aspose_pdf_cloud/models/line_annotations_response.rb new file mode 100644 index 0000000..6da3417 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_annotations_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class LineAnnotationsResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotations + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotations' => :'Annotations' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotations' => :'LineAnnotations' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotations') + self.annotations = attributes[:'Annotations'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotations == o.annotations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_ending.rb b/lib/aspose_pdf_cloud/models/line_ending.rb new file mode 100644 index 0000000..911e209 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_ending.rb @@ -0,0 +1,51 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + class LineEnding + + NONE = "None".freeze + SQUARE = "Square".freeze + CIRCLE = "Circle".freeze + DIAMOND = "Diamond".freeze + OPEN_ARROW = "OpenArrow".freeze + CLOSED_ARROW = "ClosedArrow".freeze + BUTT = "Butt".freeze + R_OPEN_ARROW = "ROpenArrow".freeze + R_CLOSED_ARROW = "RClosedArrow".freeze + SLASH = "Slash".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME) + # consantValues = LineEnding.constants.select{|c| c.to_s == value} + constantValues = LineEnding.constants.select{ |const_name| LineEnding.const_get(const_name) == value} + + raise "Invalid ENUM value #{value} for class #LineEnding" if constantValues.empty? + value + end + end + +end diff --git a/lib/aspose_pdf_cloud/models/line_intent.rb b/lib/aspose_pdf_cloud/models/line_intent.rb new file mode 100644 index 0000000..4090b54 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/line_intent.rb @@ -0,0 +1,44 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + class LineIntent + + UNDEFINED = "Undefined".freeze + LINE_ARROW = "LineArrow".freeze + LINE_DIMENSION = "LineDimension".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME) + # consantValues = LineIntent.constants.select{|c| c.to_s == value} + constantValues = LineIntent.constants.select{ |const_name| LineIntent.const_get(const_name) == value} + + raise "Invalid ENUM value #{value} for class #LineIntent" if constantValues.empty? + value + end + end + +end diff --git a/lib/aspose_pdf_cloud/models/point.rb b/lib/aspose_pdf_cloud/models/point.rb new file mode 100644 index 0000000..3f493e6 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/point.rb @@ -0,0 +1,218 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Represent point with fractional coordinates. + class Point + # X coordinate value. + attr_accessor :x + + # Y coordinate value. + attr_accessor :y + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'x' => :'X', + :'y' => :'Y' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'x' => :'Float', + :'y' => :'Float' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'X') + self.x = attributes[:'X'] + end + + if attributes.has_key?(:'Y') + self.y = attributes[:'Y'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @x.nil? + invalid_properties.push("invalid value for 'x', x cannot be nil.") + end + + if @y.nil? + invalid_properties.push("invalid value for 'y', y cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @x.nil? + return false if @y.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + x == o.x && + y == o.y + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [x, y].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_annotation.rb b/lib/aspose_pdf_cloud/models/poly_annotation.rb new file mode 100644 index 0000000..2ba9e21 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_annotation.rb @@ -0,0 +1,394 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides PolyAnnotation. + class PolyAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Gets or sets the interior color with which to fill the annotation?s line endings. + attr_accessor :interior_color + + # Gets or sets the style of first line ending. + attr_accessor :starting_style + + # Gets or sets the style of second line ending. + attr_accessor :ending_style + + # Gets or sets the intent of the polygon or polyline annotation. + attr_accessor :intent + + # Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. + attr_accessor :vertices + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'starting_style' => :'StartingStyle', + :'ending_style' => :'EndingStyle', + :'intent' => :'Intent', + :'vertices' => :'Vertices' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'starting_style' => :'LineEnding', + :'ending_style' => :'LineEnding', + :'intent' => :'PolyIntent', + :'vertices' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'StartingStyle') + self.starting_style = attributes[:'StartingStyle'] + end + + if attributes.has_key?(:'EndingStyle') + self.ending_style = attributes[:'EndingStyle'] + end + + if attributes.has_key?(:'Intent') + self.intent = attributes[:'Intent'] + end + + if attributes.has_key?(:'Vertices') + if (value = attributes[:'Vertices']).is_a?(Array) + self.vertices = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + starting_style == o.starting_style && + ending_style == o.ending_style && + intent == o.intent && + vertices == o.vertices + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, starting_style, ending_style, intent, vertices].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_intent.rb b/lib/aspose_pdf_cloud/models/poly_intent.rb new file mode 100644 index 0000000..59fce7d --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_intent.rb @@ -0,0 +1,45 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + class PolyIntent + + UNDEFINED = "Undefined".freeze + POLYGON_CLOUD = "PolygonCloud".freeze + POLY_LINE_DIMENSION = "PolyLineDimension".freeze + POLYGON_DIMENSION = "PolygonDimension".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME) + # consantValues = PolyIntent.constants.select{|c| c.to_s == value} + constantValues = PolyIntent.constants.select{ |const_name| PolyIntent.const_get(const_name) == value} + + raise "Invalid ENUM value #{value} for class #PolyIntent" if constantValues.empty? + value + end + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_line_annotation.rb b/lib/aspose_pdf_cloud/models/poly_line_annotation.rb new file mode 100644 index 0000000..d20425d --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_line_annotation.rb @@ -0,0 +1,404 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides PolyLineAnnotation. + class PolyLineAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Gets or sets the interior color with which to fill the annotation?s line endings. + attr_accessor :interior_color + + # Gets or sets the style of first line ending. + attr_accessor :starting_style + + # Gets or sets the style of second line ending. + attr_accessor :ending_style + + # Gets or sets the intent of the polygon or polyline annotation. + attr_accessor :intent + + # Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. + attr_accessor :vertices + + # Color of the annotation. + attr_accessor :color + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'starting_style' => :'StartingStyle', + :'ending_style' => :'EndingStyle', + :'intent' => :'Intent', + :'vertices' => :'Vertices', + :'color' => :'Color' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'starting_style' => :'LineEnding', + :'ending_style' => :'LineEnding', + :'intent' => :'PolyIntent', + :'vertices' => :'Array', + :'color' => :'Color' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'StartingStyle') + self.starting_style = attributes[:'StartingStyle'] + end + + if attributes.has_key?(:'EndingStyle') + self.ending_style = attributes[:'EndingStyle'] + end + + if attributes.has_key?(:'Intent') + self.intent = attributes[:'Intent'] + end + + if attributes.has_key?(:'Vertices') + if (value = attributes[:'Vertices']).is_a?(Array) + self.vertices = value + end + end + + if attributes.has_key?(:'Color') + self.color = attributes[:'Color'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + starting_style == o.starting_style && + ending_style == o.ending_style && + intent == o.intent && + vertices == o.vertices && + color == o.color + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, starting_style, ending_style, intent, vertices, color].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb b/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb new file mode 100644 index 0000000..702e278 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_line_annotation_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class PolyLineAnnotationResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotation + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotation' => :'Annotation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotation' => :'PolyLineAnnotation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotation') + self.annotation = attributes[:'Annotation'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotation == o.annotation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_line_annotations.rb b/lib/aspose_pdf_cloud/models/poly_line_annotations.rb new file mode 100644 index 0000000..7374809 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_line_annotations.rb @@ -0,0 +1,211 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # List of annotations. + class PolyLineAnnotations + # Link to the document. + attr_accessor :links + + attr_accessor :list + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'list' => :'List' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'list' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'List') + if (value = attributes[:'List']).is_a?(Array) + self.list = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + list == o.list + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, list].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb b/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb new file mode 100644 index 0000000..f8a1f7c --- /dev/null +++ b/lib/aspose_pdf_cloud/models/poly_line_annotations_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class PolyLineAnnotationsResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotations + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotations' => :'Annotations' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotations' => :'PolyLineAnnotations' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotations') + self.annotations = attributes[:'Annotations'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotations == o.annotations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/polygon_annotation.rb b/lib/aspose_pdf_cloud/models/polygon_annotation.rb new file mode 100644 index 0000000..83bb0f7 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/polygon_annotation.rb @@ -0,0 +1,404 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides PolygonAnnotation. + class PolygonAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Gets or sets the interior color with which to fill the annotation?s line endings. + attr_accessor :interior_color + + # Gets or sets the style of first line ending. + attr_accessor :starting_style + + # Gets or sets the style of second line ending. + attr_accessor :ending_style + + # Gets or sets the intent of the polygon or polyline annotation. + attr_accessor :intent + + # Gets or sets an array of points representing the horizontal and vertical coordinates of each vertex. + attr_accessor :vertices + + # Color of the annotation. + attr_accessor :color + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'starting_style' => :'StartingStyle', + :'ending_style' => :'EndingStyle', + :'intent' => :'Intent', + :'vertices' => :'Vertices', + :'color' => :'Color' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'starting_style' => :'LineEnding', + :'ending_style' => :'LineEnding', + :'intent' => :'PolyIntent', + :'vertices' => :'Array', + :'color' => :'Color' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'StartingStyle') + self.starting_style = attributes[:'StartingStyle'] + end + + if attributes.has_key?(:'EndingStyle') + self.ending_style = attributes[:'EndingStyle'] + end + + if attributes.has_key?(:'Intent') + self.intent = attributes[:'Intent'] + end + + if attributes.has_key?(:'Vertices') + if (value = attributes[:'Vertices']).is_a?(Array) + self.vertices = value + end + end + + if attributes.has_key?(:'Color') + self.color = attributes[:'Color'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + starting_style == o.starting_style && + ending_style == o.ending_style && + intent == o.intent && + vertices == o.vertices && + color == o.color + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, starting_style, ending_style, intent, vertices, color].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb b/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb new file mode 100644 index 0000000..07e91b3 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/polygon_annotation_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class PolygonAnnotationResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotation + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotation' => :'Annotation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotation' => :'PolygonAnnotation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotation') + self.annotation = attributes[:'Annotation'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotation == o.annotation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/polygon_annotations.rb b/lib/aspose_pdf_cloud/models/polygon_annotations.rb new file mode 100644 index 0000000..cb5c210 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/polygon_annotations.rb @@ -0,0 +1,211 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # List of annotations. + class PolygonAnnotations + # Link to the document. + attr_accessor :links + + attr_accessor :list + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'list' => :'List' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'list' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'List') + if (value = attributes[:'List']).is_a?(Array) + self.list = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + list == o.list + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, list].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb b/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb new file mode 100644 index 0000000..18e2528 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/polygon_annotations_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class PolygonAnnotationsResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotations + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotations' => :'Annotations' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotations' => :'PolygonAnnotations' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotations') + self.annotations = attributes[:'Annotations'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotations == o.annotations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/square_annotation.rb b/lib/aspose_pdf_cloud/models/square_annotation.rb new file mode 100644 index 0000000..90072f2 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/square_annotation.rb @@ -0,0 +1,372 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # Provides SquareAnnotation. + class SquareAnnotation + # Link to the document. + attr_accessor :links + + # Get the annotation content. + attr_accessor :contents + + # The date and time when the annotation was created. + attr_accessor :creation_date + + # Get the annotation subject. + attr_accessor :subject + + # Get the annotation title. + attr_accessor :title + + # The date and time when the annotation was last modified. + attr_accessor :modified + + # Gets ID of the annotation. + attr_accessor :id + + # Gets Flags of the annotation. + attr_accessor :flags + + # Gets Name of the annotation. + attr_accessor :name + + # Gets Rect of the annotation. + attr_accessor :rect + + # Gets PageIndex of the annotation. + attr_accessor :page_index + + # Gets ZIndex of the annotation. + attr_accessor :z_index + + # Gets HorizontalAlignment of the annotation. + attr_accessor :horizontal_alignment + + # Gets VerticalAlignment of the annotation. + attr_accessor :vertical_alignment + + # Get the annotation RichText. + attr_accessor :rich_text + + # Get the annotation InteriorColor. + attr_accessor :interior_color + + # Get or set the annotation Rectangle of frame. + attr_accessor :frame + + # Color of the annotation. + attr_accessor :color + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'contents' => :'Contents', + :'creation_date' => :'CreationDate', + :'subject' => :'Subject', + :'title' => :'Title', + :'modified' => :'Modified', + :'id' => :'Id', + :'flags' => :'Flags', + :'name' => :'Name', + :'rect' => :'Rect', + :'page_index' => :'PageIndex', + :'z_index' => :'ZIndex', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'RichText', + :'interior_color' => :'InteriorColor', + :'frame' => :'Frame', + :'color' => :'Color' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'contents' => :'String', + :'creation_date' => :'String', + :'subject' => :'String', + :'title' => :'String', + :'modified' => :'String', + :'id' => :'String', + :'flags' => :'Array', + :'name' => :'String', + :'rect' => :'RectanglePdf', + :'page_index' => :'Integer', + :'z_index' => :'Integer', + :'horizontal_alignment' => :'HorizontalAlignment', + :'vertical_alignment' => :'VerticalAlignment', + :'rich_text' => :'String', + :'interior_color' => :'Color', + :'frame' => :'RectanglePdf', + :'color' => :'Color' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'Contents') + self.contents = attributes[:'Contents'] + end + + if attributes.has_key?(:'CreationDate') + self.creation_date = attributes[:'CreationDate'] + end + + if attributes.has_key?(:'Subject') + self.subject = attributes[:'Subject'] + end + + if attributes.has_key?(:'Title') + self.title = attributes[:'Title'] + end + + if attributes.has_key?(:'Modified') + self.modified = attributes[:'Modified'] + end + + if attributes.has_key?(:'Id') + self.id = attributes[:'Id'] + end + + if attributes.has_key?(:'Flags') + if (value = attributes[:'Flags']).is_a?(Array) + self.flags = value + end + end + + if attributes.has_key?(:'Name') + self.name = attributes[:'Name'] + end + + if attributes.has_key?(:'Rect') + self.rect = attributes[:'Rect'] + end + + if attributes.has_key?(:'PageIndex') + self.page_index = attributes[:'PageIndex'] + end + + if attributes.has_key?(:'ZIndex') + self.z_index = attributes[:'ZIndex'] + end + + if attributes.has_key?(:'HorizontalAlignment') + self.horizontal_alignment = attributes[:'HorizontalAlignment'] + end + + if attributes.has_key?(:'VerticalAlignment') + self.vertical_alignment = attributes[:'VerticalAlignment'] + end + + if attributes.has_key?(:'RichText') + self.rich_text = attributes[:'RichText'] + end + + if attributes.has_key?(:'InteriorColor') + self.interior_color = attributes[:'InteriorColor'] + end + + if attributes.has_key?(:'Frame') + self.frame = attributes[:'Frame'] + end + + if attributes.has_key?(:'Color') + self.color = attributes[:'Color'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + contents == o.contents && + creation_date == o.creation_date && + subject == o.subject && + title == o.title && + modified == o.modified && + id == o.id && + flags == o.flags && + name == o.name && + rect == o.rect && + page_index == o.page_index && + z_index == o.z_index && + horizontal_alignment == o.horizontal_alignment && + vertical_alignment == o.vertical_alignment && + rich_text == o.rich_text && + interior_color == o.interior_color && + frame == o.frame && + color == o.color + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, contents, creation_date, subject, title, modified, id, flags, name, rect, page_index, z_index, horizontal_alignment, vertical_alignment, rich_text, interior_color, frame, color].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/square_annotation_response.rb b/lib/aspose_pdf_cloud/models/square_annotation_response.rb new file mode 100644 index 0000000..4719177 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/square_annotation_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class SquareAnnotationResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotation + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotation' => :'Annotation' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotation' => :'SquareAnnotation' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotation') + self.annotation = attributes[:'Annotation'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotation == o.annotation + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotation].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/square_annotations.rb b/lib/aspose_pdf_cloud/models/square_annotations.rb new file mode 100644 index 0000000..8c11313 --- /dev/null +++ b/lib/aspose_pdf_cloud/models/square_annotations.rb @@ -0,0 +1,211 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + # List of annotations. + class SquareAnnotations + # Link to the document. + attr_accessor :links + + attr_accessor :list + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'links' => :'Links', + :'list' => :'List' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'links' => :'Array', + :'list' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Links') + if (value = attributes[:'Links']).is_a?(Array) + self.links = value + end + end + + if attributes.has_key?(:'List') + if (value = attributes[:'List']).is_a?(Array) + self.list = value + end + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + links == o.links && + list == o.list + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [links, list].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/models/square_annotations_response.rb b/lib/aspose_pdf_cloud/models/square_annotations_response.rb new file mode 100644 index 0000000..e2e681a --- /dev/null +++ b/lib/aspose_pdf_cloud/models/square_annotations_response.rb @@ -0,0 +1,222 @@ +=begin +-------------------------------------------------------------------------------------------------------------------- + Copyright (c) 2018 Aspose.PDF Cloud +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +-------------------------------------------------------------------------------------------------------------------- +=end + +require 'date' + +module AsposePdfCloud + + class SquareAnnotationsResponse + # Response status code. + attr_accessor :code + + # Response status. + attr_accessor :status + + attr_accessor :annotations + + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'Code', + :'status' => :'Status', + :'annotations' => :'Annotations' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'code' => :'Integer', + :'status' => :'String', + :'annotations' => :'SquareAnnotations' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + + if attributes.has_key?(:'Code') + self.code = attributes[:'Code'] + end + + if attributes.has_key?(:'Status') + self.status = attributes[:'Status'] + end + + if attributes.has_key?(:'Annotations') + self.annotations = attributes[:'Annotations'] + end + + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properies with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @code.nil? + invalid_properties.push("invalid value for 'code', code cannot be nil.") + end + + return invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @code.nil? + return true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + status == o.status && + annotations == o.annotations + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [code, status, annotations].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = AsposePdfCloud.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map{ |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/aspose_pdf_cloud/version.rb b/lib/aspose_pdf_cloud/version.rb index 9a500a5..52883f9 100644 --- a/lib/aspose_pdf_cloud/version.rb +++ b/lib/aspose_pdf_cloud/version.rb @@ -20,5 +20,5 @@ =end module AsposePdfCloud - VERSION = "18.9.0" + VERSION = "18.10.0" end diff --git a/test/pdf_tests.rb b/test/pdf_tests.rb index e99ac72..a0c61c6 100644 --- a/test/pdf_tests.rb +++ b/test/pdf_tests.rb @@ -121,6 +121,488 @@ def test_delete_annotation assert(response, 'Failed to delete annotation.') end + # PolyLine Annotations Tests + + def test_get_document_poly_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_document_poly_line_annotations(file_name, opts) + assert(response, 'Failed to read document polyline annotations.') + end + + def test_post_page_poly_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = PolyLineAnnotation.new + annotation.name = 'Test poly_line' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.title = 'Title' + annotation.vertices = [ + Point.new({:X => 10, :Y => 10}), + Point.new({:X => 20, :Y => 10}), + Point.new({:X => 10, :Y => 20}), + Point.new({:X => 10, :Y => 10}) + ] + + response = @pdf_api.post_page_poly_line_annotations(file_name, 1, [annotation], opts) + assert(response, 'Failed to add polyline annotations into page.') + end + + def test_get_page_poly_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + page_number = 1 + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_page_poly_line_annotations(file_name, page_number, opts) + assert(response, 'Failed to read page polyline annotations.') + end + + def test_get_poly_line_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotations_response = @pdf_api.get_document_poly_line_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document polyline annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.get_poly_line_annotation(file_name, annotation_id, opts) + assert(response, 'Failed to read page polyline annotations.') + end + + def test_put_poly_line_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = PolyLineAnnotation.new + annotation.name = 'Test poly_line' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.vertices = [ + Point.new({:X => 10, :Y => 10}), + Point.new({:X => 20, :Y => 10}), + Point.new({:X => 10, :Y => 20}), + Point.new({:X => 10, :Y => 10}) + ] + + annotations_response = @pdf_api.get_document_poly_line_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document polyline annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.put_poly_line_annotation(file_name, annotation_id, annotation, opts) + assert(response, 'Failed to replace polyline annotation.') + end + + + # Polygon Annotations Tests + + def test_get_document_polygon_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_document_polygon_annotations(file_name, opts) + assert(response, 'Failed to read document polygon annotations.') + end + + def test_post_page_polygon_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = PolygonAnnotation.new + annotation.name = 'Test polygon' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.title = 'Title' + annotation.vertices = [ + Point.new({:X => 10, :Y => 10}), + Point.new({:X => 20, :Y => 10}), + Point.new({:X => 10, :Y => 20}), + Point.new({:X => 10, :Y => 10}) + ] + + response = @pdf_api.post_page_polygon_annotations(file_name, 1, [annotation], opts) + assert(response, 'Failed to add polygon annotations into page.') + end + + def test_get_page_polygon_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + page_number = 1 + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_page_polygon_annotations(file_name, page_number, opts) + assert(response, 'Failed to read page polygon annotations.') + end + + def test_get_polygon_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotations_response = @pdf_api.get_document_polygon_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document polygon annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.get_polygon_annotation(file_name, annotation_id, opts) + assert(response, 'Failed to read page polygon annotations.') + end + + def test_put_polygon_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = PolygonAnnotation.new + annotation.name = 'Test polygon' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.vertices = [ + Point.new({:X => 10, :Y => 10}), + Point.new({:X => 20, :Y => 10}), + Point.new({:X => 10, :Y => 20}), + Point.new({:X => 10, :Y => 10}) + ] + + annotations_response = @pdf_api.get_document_polygon_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document polygon annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.put_polygon_annotation(file_name, annotation_id, annotation, opts) + assert(response, 'Failed to replace polygon annotation.') + end + + # Circle Annotations Tests + + def test_get_document_circle_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_document_circle_annotations(file_name, opts) + assert(response, 'Failed to read document circle annotations.') + end + + def test_post_page_circle_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = CircleAnnotation.new + annotation.name = 'Test circle' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.title = 'Title' + + response = @pdf_api.post_page_circle_annotations(file_name, 1, [annotation], opts) + assert(response, 'Failed to add circle annotations into page.') + end + + def test_get_page_circle_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + page_number = 1 + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_page_circle_annotations(file_name, page_number, opts) + assert(response, 'Failed to read page circle annotations.') + end + + def test_get_circle_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotations_response = @pdf_api.get_document_circle_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document circle annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.get_circle_annotation(file_name, annotation_id, opts) + assert(response, 'Failed to read page circle annotations.') + end + + def test_put_circle_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = CircleAnnotation.new + annotation.name = 'Test circle' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + + annotations_response = @pdf_api.get_document_circle_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document circle annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.put_circle_annotation(file_name, annotation_id, annotation, opts) + assert(response, 'Failed to replace circle annotation.') + end + + + # Square Annotations Tests + + def test_get_document_square_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_document_square_annotations(file_name, opts) + assert(response, 'Failed to read document square annotations.') + end + + def test_post_page_square_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = SquareAnnotation.new + annotation.name = 'Test square' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.title = 'Title' + + response = @pdf_api.post_page_square_annotations(file_name, 1, [annotation], opts) + assert(response, 'Failed to add square annotations into page.') + end + + def test_get_page_square_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + page_number = 1 + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_page_square_annotations(file_name, page_number, opts) + assert(response, 'Failed to read page square annotations.') + end + + def test_get_square_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotations_response = @pdf_api.get_document_square_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document square annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.get_square_annotation(file_name, annotation_id, opts) + assert(response, 'Failed to read page square annotations.') + end + + def test_put_square_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = SquareAnnotation.new + annotation.name = 'Test square' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + + annotations_response = @pdf_api.get_document_square_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document square annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.put_square_annotation(file_name, annotation_id, annotation, opts) + assert(response, 'Failed to replace square annotation.') + end + + + # Line Annotations Tests + + def test_get_document_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_document_line_annotations(file_name, opts) + assert(response, 'Failed to read document line annotations.') + end + + def test_post_page_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = LineAnnotation.new + annotation.name = 'Test Line' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.title = 'Title' + annotation.starting = Point.new({:X => 10, :Y => 10}) + annotation.ending = Point.new({:X => 100, :Y => 100}) + + response = @pdf_api.post_page_line_annotations(file_name, 1, [annotation], opts) + assert(response, 'Failed to add line annotations into page.') + end + + def test_get_page_line_annotations + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + page_number = 1 + opts = { + :folder => @temp_folder + } + + response = @pdf_api.get_page_line_annotations(file_name, page_number, opts) + assert(response, 'Failed to read page line annotations.') + end + + def test_get_line_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotations_response = @pdf_api.get_document_line_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document line annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.get_line_annotation(file_name, annotation_id, opts) + assert(response, 'Failed to read page line annotations.') + end + + def test_put_line_annotation + file_name = 'PdfWithAnnotations.pdf' + upload_file(file_name) + + opts = { + :folder => @temp_folder + } + + annotation = LineAnnotation.new + annotation.name = 'Test Line' + annotation.rect = RectanglePdf.new({:LLX => 100, :LLY => 100, :URX => 200, :URY => 200}) + annotation.flags = [AnnotationFlags::DEFAULT] + annotation.horizontal_alignment = HorizontalAlignment::CENTER + annotation.rich_text = 'Rich Text' + annotation.subject = 'Subj' + annotation.z_index = 1 + annotation.starting = Point.new({:X => 10, :Y => 10}) + annotation.ending = Point.new({:X => 100, :Y => 100}) + + annotations_response = @pdf_api.get_document_line_annotations(file_name, opts) + assert(annotations_response, 'Failed to read document line annotations.') + annotation_id = annotations_response[0].annotations.list[0].id + + response = @pdf_api.put_line_annotation(file_name, annotation_id, annotation, opts) + assert(response, 'Failed to replace line annotation.') + end + + # Free Text Annotations Tests def test_get_document_free_text_annotations @@ -1676,7 +2158,7 @@ def test_get_image_extract_as_png end - # Links Tests + # Link Annotations Tests def test_get_page_link_annotation file_name = 'PdfWithLinks.pdf'