class AsposeHtml::HtmlApi

Attributes

api_client[RW]

Public Class Methods

new(args) click to toggle source
# File lib/aspose_html/api/html_api.rb, line 35
def initialize(args)
  @api_client = AsposeHtml::ApiClient.default(args)
end

Public Instance Methods

get_convert_document_to_image(name, out_format, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to the specified image format.

@param name Document name. @param out_format Resulting image format. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [Integer] :x_resolution Horizontal resolution of resulting image. @option opts [Integer] :y_resolution Vertical resolution of resulting image. @option opts [String] :folder The source document folder. @option opts [String] :storage The source document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 61
def get_convert_document_to_image(name, out_format, opts = {})
  data, _status_code, _headers = get_convert_document_to_image_with_http_info(name, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_image_by_url(source_url, out_format, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to the specified image format.

@param source_url Source page URL. @param out_format Resulting image format. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [Integer] :x_resolution Horizontal resolution of resulting image. @option opts [Integer] :y_resolution Vertical resolution of resulting image. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 150
def get_convert_document_to_image_by_url(source_url, out_format, opts = {})
  data, _status_code, _headers = get_convert_document_to_image_by_url_with_http_info(source_url, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_image_by_url_with_http_info(source_url, out_format, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to the specified image format.

@param source_url Source page URL. @param out_format Resulting image format. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [Integer] :x_resolution Horizontal resolution of resulting image. @option opts [Integer] :y_resolution Vertical resolution of resulting image. @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

# File lib/aspose_html/api/html_api.rb, line 171
def get_convert_document_to_image_by_url_with_http_info(source_url, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_image_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_image_by_url"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_convert_document_to_image_by_url"
  end
  # resource path
  local_var_path = "/html/convert/image/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil?
  query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_image_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_convert_document_to_image_with_http_info(name, out_format, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to the specified image format.

@param name Document name. @param out_format Resulting image format. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [Integer] :x_resolution Horizontal resolution of resulting image. @option opts [Integer] :y_resolution Vertical resolution of resulting image. @option opts [String] :folder The source document folder. @option opts [String] :storage The source document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 82
def get_convert_document_to_image_with_http_info(name, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_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 HtmlApi.get_convert_document_to_image"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_convert_document_to_image"
  end
  # resource path
  local_var_path = "/html/{name}/convert/image/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.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[:'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[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil?
  query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_convert_document_to_pdf(name, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to PDF.

@param name Document name. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 237
def get_convert_document_to_pdf(name, opts = {})
  data, _status_code, _headers = get_convert_document_to_pdf_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_pdf_by_url(source_url, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to PDF.

@param source_url Source page URL. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 314
def get_convert_document_to_pdf_by_url(source_url, opts = {})
  data, _status_code, _headers = get_convert_document_to_pdf_by_url_with_http_info(source_url, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_pdf_by_url_with_http_info(source_url, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to PDF.

@param source_url Source page URL. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @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

# File lib/aspose_html/api/html_api.rb, line 332
def get_convert_document_to_pdf_by_url_with_http_info(source_url, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_pdf_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_pdf_by_url"
  end
  # resource path
  local_var_path = "/html/convert/pdf"

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_pdf_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_convert_document_to_pdf_with_http_info(name, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to PDF.

@param name Document name. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @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

# File lib/aspose_html/api/html_api.rb, line 255
def get_convert_document_to_pdf_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_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 HtmlApi.get_convert_document_to_pdf"
  end
  # resource path
  local_var_path = "/html/{name}/convert/pdf".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[:'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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_convert_document_to_xps(name, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to XPS.

@param name Document name. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 392
def get_convert_document_to_xps(name, opts = {})
  data, _status_code, _headers = get_convert_document_to_xps_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_xps_by_url(source_url, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to XPS.

@param source_url Source page URL. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 469
def get_convert_document_to_xps_by_url(source_url, opts = {})
  data, _status_code, _headers = get_convert_document_to_xps_by_url_with_http_info(source_url, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_convert_document_to_xps_by_url_with_http_info(source_url, opts = {}) click to toggle source

Convert the HTML page from the web by its URL to XPS.

@param source_url Source page URL. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @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

# File lib/aspose_html/api/html_api.rb, line 487
def get_convert_document_to_xps_by_url_with_http_info(source_url, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_to_xps_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_convert_document_to_xps_by_url"
  end
  # resource path
  local_var_path = "/html/convert/xps"

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_xps_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_convert_document_to_xps_with_http_info(name, opts = {}) click to toggle source

Convert the HTML document from the storage by its name to XPS.

@param name Document name. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting image width. @option opts [Integer] :height Resulting image height. @option opts [Integer] :left_margin Left resulting image margin. @option opts [Integer] :right_margin Right resulting image margin. @option opts [Integer] :top_margin Top resulting image margin. @option opts [Integer] :bottom_margin Bottom resulting image margin. @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

# File lib/aspose_html/api/html_api.rb, line 410
def get_convert_document_to_xps_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_convert_document_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 HtmlApi.get_convert_document_to_xps"
  end
  # resource path
  local_var_path = "/html/{name}/convert/xps".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[:'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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_convert_document_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_detect_html_keywords(name, opts = {}) click to toggle source

Get the HTML document keywords using the keyword detection service.

@param name Document name. @param [Hash] opts the optional parameters @option opts [String] :folder Document folder. @option opts [String] :storage Document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1793
def get_detect_html_keywords(name, opts = {})
  data, _status_code, _headers = get_detect_html_keywords_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_detect_html_keywords_by_url(source_url, opts = {}) click to toggle source

Get the keywords from HTML document from Web specified by its URL using the keyword detection service

@param source_url Source document URL. @param [Hash] opts the optional parameters @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1850
def get_detect_html_keywords_by_url(source_url, opts = {})
  data, _status_code, _headers = get_detect_html_keywords_by_url_with_http_info(source_url, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_detect_html_keywords_by_url_with_http_info(source_url, opts = {}) click to toggle source

Get the keywords from HTML document from Web specified by its URL using the keyword detection service

@param source_url Source document URL. @param [Hash] opts the optional parameters @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1860
def get_detect_html_keywords_by_url_with_http_info(source_url, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_detect_html_keywords_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_detect_html_keywords_by_url"
  end
  # resource path
  local_var_path = "/html/summ/keywords"

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url

  # 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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_detect_html_keywords_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_detect_html_keywords_with_http_info(name, opts = {}) click to toggle source

Get the HTML document keywords using the keyword detection service.

@param name Document name. @param [Hash] opts the optional parameters @option opts [String] :folder Document folder. @option opts [String] :storage Document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1805
def get_detect_html_keywords_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_detect_html_keywords ..."
  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 HtmlApi.get_detect_html_keywords"
  end
  # resource path
  local_var_path = "/html/{name}/summ/keywords".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(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_detect_html_keywords\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document(name, opts = {}) click to toggle source

Return the HTML document by the name from default or specified storage.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document folder @option opts [String] :folder The document folder. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1053
def get_document(name, opts = {})
  data, _status_code, _headers = get_document_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_fragment_by_x_path(name, x_path, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified XPath query.

@param name The document name. @param x_path XPath query string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1114
def get_document_fragment_by_x_path(name, x_path, out_format, opts = {})
  data, _status_code, _headers = get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_fragment_by_x_path_by_url(source_url, x_path, out_format) click to toggle source

Return list of HTML fragments matching the specified XPath query by the source page URL.

@param source_url Source page URL. @param x_path XPath query string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1183
def get_document_fragment_by_x_path_by_url(source_url, x_path, out_format)
  data, _status_code, _headers = get_document_fragment_by_x_path_by_url_with_http_info(source_url, x_path, out_format)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_fragment_by_x_path_by_url_with_http_info(source_url, x_path, out_format) click to toggle source

Return list of HTML fragments matching the specified XPath query by the source page URL.

@param source_url Source page URL. @param x_path XPath query string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1194
def get_document_fragment_by_x_path_by_url_with_http_info(source_url, x_path, out_format)
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragment_by_x_path_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
  end
  # verify the required parameter 'x_path' is set
  if @api_client.config.client_side_validation && x_path.nil?
    fail ArgumentError, "Missing the required parameter 'x_path' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragment_by_x_path_by_url"
  end
  # resource path
  local_var_path = "/html/fragments/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url
  query_params[:'xPath'] = x_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: DocumentApi#get_document_fragment_by_x_path_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified XPath query.

@param name The document name. @param x_path XPath query string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @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

# File lib/aspose_html/api/html_api.rb, line 1128
def get_document_fragment_by_x_path_with_http_info(name, x_path, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_document_fragment_by_x_path ..."
  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 HtmlApi.get_document_fragment_by_x_path"
  end
  # verify the required parameter 'x_path' is set
  if @api_client.config.client_side_validation && x_path.nil?
    fail ArgumentError, "Missing the required parameter 'x_path' when calling HtmlApi.get_document_fragment_by_x_path"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling HtmlApi.get_document_fragment_by_x_path"
  end
  # resource path
  local_var_path = "/html/{name}/fragments/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'xPath'] = x_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_document_fragment_by_x_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_fragments_by_css_selector(name, selector, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified CSS selector.

@param name The document name. @param selector CSS selector string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1251
def get_document_fragments_by_css_selector(name, selector, out_format, opts = {})
  data, _status_code, _headers = get_document_fragments_by_css_selector_with_http_info(name, selector, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_fragments_by_css_selector_by_url(source_url, selector, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified CSS selector by the source page URL.

@param source_url Source page URL. @param selector CSS selector string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @param [Hash] opts the optional parameters @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1321
def get_document_fragments_by_css_selector_by_url(source_url, selector, out_format, opts = {})
  data, _status_code, _headers = get_document_fragments_by_css_selector_by_url_with_http_info(source_url, selector, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_fragments_by_css_selector_by_url_with_http_info(source_url, selector, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified CSS selector by the source page URL.

@param source_url Source page URL. @param selector CSS selector string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @param [Hash] opts the optional parameters @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1333
def get_document_fragments_by_css_selector_by_url_with_http_info(source_url, selector, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragments_by_css_selector_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
  end
  # verify the required parameter 'selector' is set
  if @api_client.config.client_side_validation && selector.nil?
    fail ArgumentError, "Missing the required parameter 'selector' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragments_by_css_selector_by_url"
  end
  # resource path
  local_var_path = "/html/fragments/css/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url
  query_params[:'selector'] = selector

  # 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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: DocumentApi#get_document_fragments_by_css_selector_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_fragments_by_css_selector_with_http_info(name, selector, out_format, opts = {}) click to toggle source

Return list of HTML fragments matching the specified CSS selector.

@param name The document name. @param selector CSS selector string. @param out_format Output format. Possible values: &#39;plain&#39; and &#39;json&#39;. @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

# File lib/aspose_html/api/html_api.rb, line 1265
def get_document_fragments_by_css_selector_with_http_info(name, selector, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: DocumentApi.get_document_fragments_by_css_selector ..."
  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 DocumentApi.get_document_fragments_by_css_selector"
  end
  # verify the required parameter 'selector' is set
  if @api_client.config.client_side_validation && selector.nil?
    fail ArgumentError, "Missing the required parameter 'selector' when calling DocumentApi.get_document_fragments_by_css_selector"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling DocumentApi.get_document_fragments_by_css_selector"
  end
  # resource path
  local_var_path = "/html/{name}/fragments/css/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'selector'] = selector
  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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: DocumentApi#get_document_fragments_by_css_selector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_images(name, opts = {}) click to toggle source

Return all HTML document images packaged as a ZIP archive.

@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 [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1388
def get_document_images(name, opts = {})
  data, _status_code, _headers = get_document_images_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_images_by_url(source_url) click to toggle source

Return all HTML page images packaged as a ZIP archive by the source page URL.

@param source_url Source page URL. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1445
def get_document_images_by_url(source_url)
  data, _status_code, _headers = get_document_images_by_url_with_http_info(source_url)
  return {file: data, status: _status_code, headers: _headers}
end
get_document_images_by_url_with_http_info(source_url) click to toggle source

Return all HTML page images packaged as a ZIP archive by the source page URL.

@param source_url Source page URL. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1454
def get_document_images_by_url_with_http_info(source_url)
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: DocumentApi.get_document_images_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling DocumentApi.get_document_images_by_url"
  end
  # resource path
  local_var_path = "/html/images/all"

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/zip'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: DocumentApi#get_document_images_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_images_with_http_info(name, opts = {}) click to toggle source

Return all HTML document images packaged as a ZIP archive.

@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

# File lib/aspose_html/api/html_api.rb, line 1400
def get_document_images_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_document_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 HtmlApi.get_document_images"
  end
  # resource path
  local_var_path = "/html/{name}/images/all".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(['application/zip'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_document_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_with_http_info(name, opts = {}) click to toggle source

Return the HTML document by the name from default or specified storage.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document folder @option opts [String] :folder The document folder. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1065
def get_document_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_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 HtmlApi.get_document"
  end
  # resource path
  local_var_path = "/html/{name}".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(['multipart/form-data', 'application/zip'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_recognize_and_import_to_html(name, opts = {}) click to toggle source

Recognize text from the image file in the storage and import it to HTML format.

@param name The image file name. @param [Hash] opts the optional parameters @option opts [String] :ocr_engine_lang OCR engine language - language (default to en) @option opts [String] :folder The source image folder. @option opts [String] :storage The source image storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1506
def get_recognize_and_import_to_html(name, opts = {})
  data, _status_code, _headers = get_recognize_and_import_to_html_with_http_info(name, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_recognize_and_import_to_html_with_http_info(name, opts = {}) click to toggle source

Recognize text from the image file in the storage and import it to HTML format.

@param name The image file name. @param [Hash] opts the optional parameters @option opts [String] :ocr_engine_lang OCR engine language - language default “en” @option opts [String] :folder The source image folder. @option opts [String] :storage The source image storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1519
def get_recognize_and_import_to_html_with_http_info(name, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_recognize_and_import_to_html ..."
  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 HtmlApi.get_recognize_and_import_to_html"
  end
  # resource path
  local_var_path = "/html/{name}/ocr/import".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  if opts[:'ocr_engine_lang'].nil?
    query_params[:'ocrEngineLang'] = "en"
  else
    query_params[:'ocrEngineLang'] = opts[:'ocr_engine_lang']
  end

  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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_recognize_and_import_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_recognize_and_translate_to_html(name, src_lang, res_lang, opts = {}) click to toggle source

Recognize text from the image file in the storage, import it to HTML format and translate to specified language.

@param name The image file name. @param src_lang Source language - also supposed as the OCR engine language. @param res_lang Result language. @param [Hash] opts the optional parameters @option opts [String] :folder The source image folder. @option opts [String] :storage The source image storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1574
def get_recognize_and_translate_to_html(name, src_lang, res_lang, opts = {})
  data, _status_code, _headers = get_recognize_and_translate_to_html_with_http_info(name, src_lang, res_lang, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_recognize_and_translate_to_html_with_http_info(name, src_lang, res_lang, opts = {}) click to toggle source

Recognize text from the image file in the storage, import it to HTML format and translate to specified language.

@param name The image file name. @param src_lang Source language - also supposed as the OCR engine language. @param res_lang Result language. @param [Hash] opts the optional parameters @option opts [String] :folder The source image folder. @option opts [String] :storage The source image storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1588
def get_recognize_and_translate_to_html_with_http_info(name, src_lang, res_lang, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_recognize_and_translate_to_html ..."
  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 HtmlApi.get_recognize_and_translate_to_html"
  end
  # verify the required parameter 'src_lang' is set
  if @api_client.config.client_side_validation && src_lang.nil?
    fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_recognize_and_translate_to_html"
  end
  # verify the required parameter 'res_lang' is set
  if @api_client.config.client_side_validation && res_lang.nil?
    fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_recognize_and_translate_to_html"
  end
  # resource path
  local_var_path = "/html/{name}/ocr/translate/{srcLang}/{resLang}"
      .sub('{' + 'name' + '}', name.to_s)
      .sub('{' + 'srcLang' + '}', src_lang.to_s)
      .sub('{' + 'resLang' + '}', res_lang.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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_recognize_and_translate_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_translate_document(name, src_lang, res_lang, opts = {}) click to toggle source

Translate the HTML document specified by the name from default or specified storage.

@param name Document name. @param src_lang Source language. @param res_lang Result language. @param [Hash] opts the optional parameters @option opts [String] :storage The source document storage. @option opts [String] :folder The source document folder. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1654
def get_translate_document(name, src_lang, res_lang, opts = {})
  data, _status_code, _headers = get_translate_document_with_http_info(name, src_lang, res_lang, opts)
  return {file: data, status: _status_code, headers: _headers}
end
get_translate_document_by_url(source_url, src_lang, res_lang) click to toggle source

Translate the HTML document from Web specified by its URL.

@param source_url Source document URL. @param src_lang Source language. @param res_lang Result language. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 1722
def get_translate_document_by_url(source_url, src_lang, res_lang)
  data, _status_code, _headers = get_translate_document_by_url_with_http_info(source_url, src_lang, res_lang)
  return {file: data, status: _status_code, headers: _headers}
end
get_translate_document_by_url_with_http_info(source_url, src_lang, res_lang) click to toggle source

Translate the HTML document from Web specified by its URL.

@param source_url Source document URL. @param src_lang Source language. @param res_lang Result language. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1733
def get_translate_document_by_url_with_http_info(source_url, src_lang, res_lang)
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_translate_document_by_url ..."
  end
  # verify the required parameter 'source_url' is set
  if @api_client.config.client_side_validation && source_url.nil?
    fail ArgumentError, "Missing the required parameter 'source_url' when calling HtmlApi.get_translate_document_by_url"
  end
  # verify the required parameter 'src_lang' is set
  if @api_client.config.client_side_validation && src_lang.nil?
    fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_translate_document_by_url"
  end
  # verify the required parameter 'res_lang' is set
  if @api_client.config.client_side_validation && res_lang.nil?
    fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_translate_document_by_url"
  end
  # resource path
  local_var_path = "/html/translate/{srcLang}/{resLang}".sub('{' + 'srcLang' + '}', src_lang.to_s).sub('{' + 'resLang' + '}', res_lang.to_s)

  # query parameters
  query_params = {}
  query_params[:'sourceUrl'] = source_url

  # 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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_translate_document_by_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_translate_document_with_http_info(name, src_lang, res_lang, opts = {}) click to toggle source

Translate the HTML document specified by the name from default or specified storage.

@param name Document name. @param src_lang Source language. @param res_lang Result language. @param [Hash] opts the optional parameters @option opts [String] :storage The source document storage. @option opts [String] :folder The source document folder. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 1668
def get_translate_document_with_http_info(name, src_lang, res_lang, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: HtmlApi.get_translate_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 HtmlApi.get_translate_document"
  end
  # verify the required parameter 'src_lang' is set
  if @api_client.config.client_side_validation && src_lang.nil?
    fail ArgumentError, "Missing the required parameter 'src_lang' when calling HtmlApi.get_translate_document"
  end
  # verify the required parameter 'res_lang' is set
  if @api_client.config.client_side_validation && res_lang.nil?
    fail ArgumentError, "Missing the required parameter 'res_lang' when calling HtmlApi.get_translate_document"
  end
  # resource path
  local_var_path = "/html/{name}/translate/{srcLang}/{resLang}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'srcLang' + '}', src_lang.to_s).sub('{' + 'resLang' + '}', res_lang.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(['multipart/form-data'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: HtmlApi#get_translate_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_in_request_to_image(out_path, out_format, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.jpg) @param out_format @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 549
def put_convert_document_in_request_to_image(out_path, out_format, file, opts = {})
  data, _status_code, _headers = put_convert_document_in_request_to_image_with_http_info(out_path, out_format, file, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_in_request_to_image_with_http_info(out_path, out_format, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.jpg) @param out_format @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 568
def put_convert_document_in_request_to_image_with_http_info(out_path, out_format, file, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_in_request_to_image ..."
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_in_request_to_image"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling ConversionApi.put_convert_document_in_request_to_image"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.put_convert_document_in_request_to_image"
  end
  # resource path
  local_var_path = "/html/convert/image/{outFormat}".sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].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/octet-stream'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = ::File.open(file,"rb").read

  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_in_request_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_in_request_to_pdf(out_path, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to PDF and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 635
def put_convert_document_in_request_to_pdf(out_path, file, opts = {})
  data, _status_code, _headers = put_convert_document_in_request_to_pdf_with_http_info(out_path, file, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_in_request_to_pdf_with_http_info(out_path, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to PDF and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 652
def put_convert_document_in_request_to_pdf_with_http_info(out_path, file, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_in_request_to_pdf ..."
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_in_request_to_pdf"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.put_convert_document_in_request_to_pdf"
  end
  # resource path
  local_var_path = "/html/convert/pdf"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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?

  # 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/octet-stream'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = ::File.open(file,"rb").read
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_in_request_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_in_request_to_xps(out_path, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to XPS and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 713
def put_convert_document_in_request_to_xps(out_path, file, opts = {})
  data, _status_code, _headers = put_convert_document_in_request_to_xps_with_http_info(out_path, file, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_in_request_to_xps_with_http_info(out_path, file, opts = {}) click to toggle source

Converts the HTML document (in request content) to XPS and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param file A file to be converted. @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 730
def put_convert_document_in_request_to_xps_with_http_info(out_path, file, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_in_request_to_xps ..."
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_in_request_to_xps"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling ConversionApi.put_convert_document_in_request_to_xps"
  end
  # resource path
  local_var_path = "/html/convert/xps"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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?

  # 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/octet-stream'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = ::File.open(file,"rb").read
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_in_request_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_to_image(name, out_path, out_format, opts = {}) click to toggle source

Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg) @param out_format @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi. @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 795
def put_convert_document_to_image(name, out_path, out_format, opts = {})
  data, _status_code, _headers = put_convert_document_to_image_with_http_info(name, out_path, out_format, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_to_image_with_http_info(name, out_path, out_format, opts = {}) click to toggle source

Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.jpg) @param out_format @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [Integer] :resolution Resolution of resulting image. Default is 96 dpi. @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 816
def put_convert_document_to_image_with_http_info(name, out_path, out_format, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_to_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 ConversionApi.put_convert_document_to_image"
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_image"
  end
  # verify the required parameter 'out_format' is set
  if @api_client.config.client_side_validation && out_format.nil?
    fail ArgumentError, "Missing the required parameter 'out_format' when calling ConversionApi.put_convert_document_to_image"
  end
  # resource path
  local_var_path = "/html/{name}/convert/image/{outFormat}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'outFormat' + '}', out_format.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'resolution'] = opts[:'resolution'] if !opts[:'resolution'].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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_to_pdf(name, out_path, opts = {}) click to toggle source

Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 886
def put_convert_document_to_pdf(name, out_path, opts = {})
  data, _status_code, _headers = put_convert_document_to_pdf_with_http_info(name, out_path, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_to_pdf_with_http_info(name, out_path, opts = {}) click to toggle source

Converts the HTML document (located on storage) to PDF and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 905
def put_convert_document_to_pdf_with_http_info(name, out_path, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_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 ConversionApi.put_convert_document_to_pdf"
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_pdf"
  end
  # resource path
  local_var_path = "/html/{name}/convert/pdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_convert_document_to_xps(name, out_path, opts = {}) click to toggle source

Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Hash] {file: data, status: _status_code, headers: _headers}

# File lib/aspose_html/api/html_api.rb, line 970
def put_convert_document_to_xps(name, out_path, opts = {})
  data, _status_code, _headers = put_convert_document_to_xps_with_http_info(name, out_path, opts)
  return {file: data, status: _status_code, headers: _headers}
end
put_convert_document_to_xps_with_http_info(name, out_path, opts = {}) click to toggle source

Converts the HTML document (located on storage) to XPS and uploads resulting file to storage.

@param name Document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [Integer] :width Resulting document page width in points (1/96 inch). @option opts [Integer] :height Resulting document page height in points (1/96 inch). @option opts [Integer] :left_margin Left resulting document page margin in points (1/96 inch). @option opts [Integer] :right_margin Right resulting document page margin in points (1/96 inch). @option opts [Integer] :top_margin Top resulting document page margin in points (1/96 inch). @option opts [Integer] :bottom_margin Bottom resulting document page margin in points (1/96 inch). @option opts [String] :folder The source document folder. @option opts [String] :storage The source and resulting document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_html/api/html_api.rb, line 989
def put_convert_document_to_xps_with_http_info(name, out_path, opts = {})
  if @api_client.config.debug
    @api_client.config.logger.debug "Calling API: ConversionApi.put_convert_document_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 ConversionApi.put_convert_document_to_xps"
  end
  # verify the required parameter 'out_path' is set
  if @api_client.config.client_side_validation && out_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_path' when calling ConversionApi.put_convert_document_to_xps"
  end
  # resource path
  local_var_path = "/html/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].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[:'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 = {}

  # http body (model)
  post_body = nil
  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,
                                                    :return_type => 'File')
  if @api_client.config.debug
    @api_client.config.logger.debug "API called: ConversionApi#put_convert_document_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end