Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aspose_html

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspose_html

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Aspose HTML Cloud SDK

AsposeHtml - the Ruby gem for the Aspose.HTML for Cloud API Reference

  • API version: 1.1
  • Package version: 1.0.0

Requirements

  • Ruby >= 1.9
  • libcurl.dll (libcurl.so)

Installation

Build a gem

To build the Ruby code into a gem:

gem build aspose_html.gemspec

Then either install the gem locally:

gem install ./aspose_html-1.0.0.gem

(for development, run gem install --dev ./aspose_html-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'aspose_html', '~> 1.0.0'

Load from git

git clone https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git
cd aspose-html-cloud-ruby

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git, then add the following in the Gemfile:

gem 'aspose_html', :git => 'https://github.com/aspose-html-cloud/aspose-html-cloud-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'aspose_html'


CONFIG = {
    "basePath":"https://api.aspose.cloud/v1.1",
    "authPath":"https://api.aspose.cloud/oauth2/token",
    "apiKey":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "appSID":"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    "debug":true
}

api_instance = AsposeHtml::HtmlApi.new CONFIG

name = "test.html" # String | Document name.

out_format = "png" # String | Resulting image format.

opts = { 
  width: 800, # Integer | Resulting image width. 
  height: 1000, # Integer | Resulting image height. 
  left_margin: 10, # Integer | Left resulting image margin.
  right_margin: 10, # Integer | Right resulting image margin.
  top_margin: 20, # Integer | Top resulting image margin.
  bottom_margin: 20, # Integer | Bottom resulting image margin.
  x_resolution: 300, # Integer | Horizontal resolution of resulting image.
  y_resolution: 300, # Integer | Vertical resolution of resulting image.
  folder: "/", # String | The source document folder.
  storage: nil # String | The source document storage.
}

begin
  #Convert the HTML document from the storage by its name to the specified image format.
  result = api_instance.get_convert_document_to_image(name, out_format, opts)
  p result
rescue AsposeHtml::ApiError => e
  puts "Exception when calling HtmlApi->get_convert_document_to_image: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.aspose.cloud/v1.1

ClassMethodHTTP requestDescription
AsposeHtml::HtmlApiget_convert_document_to_imageGET /html/{name}/convert/image/{outFormat}Convert the HTML document from the storage by its name to the specified image format.
AsposeHtml::HtmlApiget_convert_document_to_image_by_urlGET /html/convert/image/{outFormat}Convert the HTML page from the web by its URL to the specified image format.
AsposeHtml::HtmlApiget_convert_document_to_pdfGET /html/{name}/convert/pdfConvert the HTML document from the storage by its name to PDF.
AsposeHtml::HtmlApiget_convert_document_to_pdf_by_urlGET /html/convert/pdfConvert the HTML page from the web by its URL to PDF.
AsposeHtml::HtmlApiget_convert_document_to_xpsGET /html/{name}/convert/xpsConvert the HTML document from the storage by its name to XPS.
AsposeHtml::HtmlApiget_convert_document_to_xps_by_urlGET /html/convert/xpsConvert the HTML page from the web by its URL to XPS.
AsposeHtml::HtmlApiput_convert_document_in_request_to_imagePUT /html/convert/image/{outFormat}Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.
AsposeHtml::HtmlApiput_convert_document_in_request_to_pdfPUT /html/convert/pdfConverts the HTML document (in request content) to PDF and uploads resulting file to storage.
AsposeHtml::HtmlApiput_convert_document_in_request_to_xpsPUT /html/convert/xpsConverts the HTML document (in request content) to XPS and uploads resulting file to storage.
AsposeHtml::HtmlApiput_convert_document_to_imagePUT /html/{name}/convert/image/{outFormat}Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.
AsposeHtml::HtmlApiput_convert_document_to_pdfPUT /html/{name}/convert/pdfConverts the HTML document (located on storage) to PDF and uploads resulting file to storage.
AsposeHtml::HtmlApiput_convert_document_to_xpsPUT /html/{name}/convert/xpsConverts the HTML document (located on storage) to XPS and uploads resulting file to storage.
AsposeHtml::HtmlApiget_documentGET /html/{name}Return the HTML document by the name from default or specified storage.
AsposeHtml::HtmlApiget_document_fragment_by_x_pathGET /html/{name}/fragments/{outFormat}Return list of HTML fragments matching the specified XPath query.
AsposeHtml::HtmlApiget_document_fragment_by_x_path_by_urlGET /html/fragments/{outFormat}Return list of HTML fragments matching the specified XPath query by the source page URL.
AsposeHtml::HtmlApiget_document_fragments_by_css_selectorGET /html/{name}/fragments/css/{outFormat}Return list of HTML fragments matching the specified CSS selector.
AsposeHtml::HtmlApiget_document_fragments_by_css_selector_by_urlGET /html/fragments/css/{outFormat}Return list of HTML fragments matching the specified CSS selector by the source page URL.
AsposeHtml::HtmlApiget_document_imagesGET /html/{name}/images/allReturn all HTML document images packaged as a ZIP archive.
AsposeHtml::HtmlApiget_document_images_by_urlGET /html/images/allReturn all HTML page images packaged as a ZIP archive by the source page URL.
AsposeHtml::HtmlApiget_recognize_and_import_to_htmlGET /html/{name}/ocr/importRecognize text from the image file in the storage and import it to HTML format.
AsposeHtml::HtmlApiget_recognize_and_translate_to_htmlGET /html/{name}/ocr/translate/{srcLang}/{resLang}Recognize text from the image file in the storage, import it to HTML format and translate to specified language.
AsposeHtml::HtmlApiget_translate_documentGET /html/{name}/translate/{srcLang}/{resLang}Translate the HTML document specified by the name from default or specified storage.
AsposeHtml::HtmlApiget_translate_document_by_urlGET /html/translate/{srcLang}/{resLang}Translate the HTML document from Web specified by its URL.
AsposeHtml::HtmlApiget_detect_html_keywordsGET /html/{name}/summ/keywordsGet the HTML document keywords using the keyword detection service.
AsposeHtml::HtmlApiget_detect_html_keywords_by_urlGET /html/summ/keywordsGet the keywords from HTML document from Web specified by its URL using the keyword detection service

oauth

Tests contain various examples of using the Aspose.HTML SDK.

Docs Documentation for Aspose.HTML Api SDK

Aspose HTML includes Aspose.Storage.Cloud to manipulate files on a remote server. This is used in tests for download test files to the server.

ClassMethodHTTP requestDescription
AsposeHtml::StorageApidelete_fileDELETE /storage/fileRemove a specific file
AsposeHtml::StorageApiget_downloadGET /storage/fileDownload a specific file
AsposeHtml::StorageApipost_move_filePOST /storage/fileMove a specific file
AsposeHtml::StorageApiput_createPUT /storage/fileUpload a specific file
AsposeHtml::StorageApidelete_folderDELETE /storage/folderRemove a specific folder
AsposeHtml::StorageApiget_list_filesGET /storage/folderGet the file listing of a specific folder
AsposeHtml::StorageApipost_move_folderPOST /storage/folderMove a specific folder
AsposeHtml::StorageApiput_create_folderPUT /storage/folderCreate the folder
AsposeHtml::StorageApiget_disc_usageGET /storage/discCheck the disk usage of the current account
AsposeHtml::StorageApiget_is_existGET /storage/existCheck if a specific file or folder exists
AsposeHtml::StorageApiget_is_storage_existGET /storage/{name}/existCheck if storage exists
AsposeHtml::StorageApiget_list_file_versionsGET /storage/versionGet the file's versions list

Documentation for Models

Tests contain various examples of using the Aspose.Storage SDK.

Docs Documentation for Aspose.Storage Api SDK

FAQs

Package last updated on 10 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc