class AsposePdfCloud::PdfApi

Attributes

api_client[RW]

Public Class Methods

new(app_key, app_sid, host = "", self_host = false, api_client = ApiClient.default) click to toggle source
# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28
def initialize(app_key, app_sid, host = "", self_host = false, api_client = ApiClient.default)
  @api_client = api_client
  @api_client.config.self_host = self_host
  @api_client.config.app_key = app_key
  @api_client.config.app_sid = app_sid
  if host != ""
    if @api_client.config.self_host
      @api_client.config.self_host_url = host
    else
      @api_client.config.host = host
    end
  end
end

Public Instance Methods

copy_file(src_path, dest_path, opts = {}) click to toggle source

Copy file

@param src_path Source file path e.g. '/folder/file.ext' @param dest_path Destination file path @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to copy @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 52
def copy_file(src_path, dest_path, opts = {})
  @api_client.request_token_if_needed
  copy_file_with_http_info(src_path, dest_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      copy_file_with_http_info(src_path, dest_path, opts)
    else
      raise
    end
  return nil
end
copy_file_with_http_info(src_path, dest_path, opts = {}) click to toggle source

Copy file

@param src_path Source file path e.g. &#39;/folder/file.ext&#39; @param dest_path Destination file path @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to copy @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 74
def copy_file_with_http_info(src_path, dest_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.copy_file ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.copy_file"
  end
  # verify the required parameter 'dest_path' is set
  if @api_client.config.client_side_validation && dest_path.nil?
    fail ArgumentError, "Missing the required parameter 'dest_path' when calling PdfApi.copy_file"
  end
  # resource path
  local_var_path = "/pdf/storage/file/copy/{srcPath}".sub('{' + 'srcPath' + '}', src_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'destPath'] = dest_path
  query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
  query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
  query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#copy_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
copy_folder(src_path, dest_path, opts = {}) click to toggle source

Copy folder

@param src_path Source folder path e.g. &#39;/src&#39; @param dest_path Destination folder path e.g. &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 132
def copy_folder(src_path, dest_path, opts = {})
  @api_client.request_token_if_needed
  copy_folder_with_http_info(src_path, dest_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      copy_folder_with_http_info(src_path, dest_path, opts)
    else
      raise
    end
  return nil
end
copy_folder_with_http_info(src_path, dest_path, opts = {}) click to toggle source

Copy folder

@param src_path Source folder path e.g. &#39;/src&#39; @param dest_path Destination folder path e.g. &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 153
def copy_folder_with_http_info(src_path, dest_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.copy_folder ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.copy_folder"
  end
  # verify the required parameter 'dest_path' is set
  if @api_client.config.client_side_validation && dest_path.nil?
    fail ArgumentError, "Missing the required parameter 'dest_path' when calling PdfApi.copy_folder"
  end
  # resource path
  local_var_path = "/pdf/storage/folder/copy/{srcPath}".sub('{' + 'srcPath' + '}', src_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'destPath'] = dest_path
  query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
  query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#copy_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_folder(path, opts = {}) click to toggle source

Create the folder

@param path Folder path to create e.g. &#39;folder_1/folder_2/&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 208
def create_folder(path, opts = {})
  @api_client.request_token_if_needed
  create_folder_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      create_folder_with_http_info(path, opts)
    else
      raise
    end
  return nil
end
create_folder_with_http_info(path, opts = {}) click to toggle source

Create the folder

@param path Folder path to create e.g. &#39;folder_1/folder_2/&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 227
def create_folder_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.create_folder ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.create_folder"
  end
  # resource path
  local_var_path = "/pdf/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#create_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_annotation(name, annotation_id, opts = {}) click to toggle source

Delete document annotation by ID

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 278
def delete_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
delete_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Delete document annotation by ID

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 299
def delete_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.delete_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_bookmark(name, bookmark_path, opts = {}) click to toggle source

Delete document bookmark by ID.

@param name The document name. @param bookmark_path The bookmark path. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 357
def delete_bookmark(name, bookmark_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_bookmark_with_http_info(name, bookmark_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_bookmark_with_http_info(name, bookmark_path, opts)
    else
      raise
    end
  return data
end
delete_bookmark_with_http_info(name, bookmark_path, opts = {}) click to toggle source

Delete document bookmark by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 379
def delete_bookmark_with_http_info(name, bookmark_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_bookmark ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_bookmark"
  end
  # verify the required parameter 'bookmark_path' is set
  if @api_client.config.client_side_validation && bookmark_path.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark_path' when calling PdfApi.delete_bookmark"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/bookmark/{bookmarkPath}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkPath' + '}', bookmark_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_bookmark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_document_annotations(name, opts = {}) click to toggle source

Delete all annotations from the document

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 436
def delete_document_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_document_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_document_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
delete_document_annotations_with_http_info(name, opts = {}) click to toggle source

Delete all annotations from the document

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 456
def delete_document_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_document_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_document_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_document_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_document_bookmarks(name, opts = {}) click to toggle source

Delete all document bookmarks.

@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. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 509
def delete_document_bookmarks(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_document_bookmarks_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_document_bookmarks_with_http_info(name, opts)
    else
      raise
    end
  return data
end
delete_document_bookmarks_with_http_info(name, opts = {}) click to toggle source

Delete all document bookmarks.

@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. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 530
def delete_document_bookmarks_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_document_bookmarks ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_document_bookmarks"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/tree".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?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_document_bookmarks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_document_layer(name, page_number, layer_id, opts = {}) click to toggle source

Remove document layer.

@param name The document name. @param page_number Layer page. @param layer_id Layer Id. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :pass_base64 The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 586
def delete_document_layer(name, page_number, layer_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_document_layer_with_http_info(name, page_number, layer_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_document_layer_with_http_info(name, page_number, layer_id, opts)
    else
      raise
    end
  return data
end
delete_document_layer_with_http_info(name, page_number, layer_id, opts = {}) click to toggle source

Remove document layer.

@param name The document name. @param page_number Layer page. @param layer_id Layer Id. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :pass_base64 The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 609
def delete_document_layer_with_http_info(name, page_number, layer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_document_layer ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_document_layer"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.delete_document_layer"
  end
  # verify the required parameter 'layer_id' is set
  if @api_client.config.client_side_validation && layer_id.nil?
    fail ArgumentError, "Missing the required parameter 'layer_id' when calling PdfApi.delete_document_layer"
  end
  # resource path
  local_var_path = "/pdf/{name}/layers".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageNumber'] = page_number
  query_params[:'layerId'] = layer_id
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_document_layer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_document_stamps(name, opts = {}) click to toggle source

Delete all stamps from the document

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 745
def delete_document_stamps(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_document_stamps_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_document_stamps_with_http_info(name, opts)
    else
      raise
    end
  return data
end
delete_document_stamps_with_http_info(name, opts = {}) click to toggle source

Delete all stamps from the document

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 766
def delete_document_stamps_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_document_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_document_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_document_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_document_tables(name, opts = {}) click to toggle source

Delete all tables from the document

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 819
def delete_document_tables(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_document_tables_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_document_tables_with_http_info(name, opts)
    else
      raise
    end
  return data
end
delete_document_tables_with_http_info(name, opts = {}) click to toggle source

Delete all tables from the document

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 839
def delete_document_tables_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_document_tables ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_document_tables"
  end
  # resource path
  local_var_path = "/pdf/{name}/tables".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_document_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_field(name, field_name, opts = {}) click to toggle source

Delete document field by name.

@param name The document name. @param field_name The field name/ @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 892
def delete_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
delete_field_with_http_info(name, field_name, opts = {}) click to toggle source

Delete document field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 913
def delete_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.delete_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_file(path, opts = {}) click to toggle source

Delete file

@param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to delete @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 969
def delete_file(path, opts = {})
  @api_client.request_token_if_needed
  delete_file_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      delete_file_with_http_info(path, opts)
    else
      raise
    end
  return nil
end
delete_file_with_http_info(path, opts = {}) click to toggle source

Delete file

@param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to delete @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 989
def delete_file_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_file ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.delete_file"
  end
  # resource path
  local_var_path = "/pdf/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
  query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_folder(path, opts = {}) click to toggle source

Delete folder

@param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [BOOLEAN] :recursive Enable to delete folders, subfolders and files (default to false) @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1040
def delete_folder(path, opts = {})
  @api_client.request_token_if_needed
  delete_folder_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      delete_folder_with_http_info(path, opts)
    else
      raise
    end
  return nil
end
delete_folder_with_http_info(path, opts = {}) click to toggle source

Delete folder

@param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [BOOLEAN] :recursive Enable to delete folders, subfolders and files @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1060
def delete_folder_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_folder ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.delete_folder"
  end
  # resource path
  local_var_path = "/pdf/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
  query_params[:'recursive'] = opts[:'recursive'] if !opts[:'recursive'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_image(name, image_id, opts = {}) click to toggle source

Delete image from document page.

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1112
def delete_image(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_image_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_image_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
delete_image_with_http_info(name, image_id, opts = {}) click to toggle source

Delete image from document page.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1133
def delete_image_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_image ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_image"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.delete_image"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_page(name, page_number, opts = {}) click to toggle source

Delete document page by its number.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1268
def delete_page(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_page_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_page_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
delete_page_annotations(name, page_number, opts = {}) click to toggle source

Delete all annotations from the page

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1346
def delete_page_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_page_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_page_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
delete_page_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Delete all annotations from the page

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1367
def delete_page_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_page_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_page_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.delete_page_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_page_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_page_stamps(name, page_number, opts = {}) click to toggle source

Delete all stamps from the page

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1503
def delete_page_stamps(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_page_stamps_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_page_stamps_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
delete_page_stamps_with_http_info(name, page_number, opts = {}) click to toggle source

Delete all stamps from the page

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1525
def delete_page_stamps_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_page_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_page_stamps"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.delete_page_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamps".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_page_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_page_tables(name, page_number, opts = {}) click to toggle source

Delete all tables from the page

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1583
def delete_page_tables(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_page_tables_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_page_tables_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
delete_page_tables_with_http_info(name, page_number, opts = {}) click to toggle source

Delete all tables from the page

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1604
def delete_page_tables_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_page_tables ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_page_tables"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.delete_page_tables"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/tables".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_page_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_page_with_http_info(name, page_number, opts = {}) click to toggle source

Delete document page by its number.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1289
def delete_page_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_page"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.delete_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_properties(name, opts = {}) click to toggle source

Delete custom document properties.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1661
def delete_properties(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_properties_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_properties_with_http_info(name, opts)
    else
      raise
    end
  return data
end
delete_properties_with_http_info(name, opts = {}) click to toggle source

Delete custom document properties.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1682
def delete_properties_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_properties ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_properties"
  end
  # resource path
  local_var_path = "/pdf/{name}/documentproperties".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_property(name, property_name, opts = {}) click to toggle source

Delete document property.

@param name The document name. @param property_name Property name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1737
def delete_property(name, property_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_property_with_http_info(name, property_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_property_with_http_info(name, property_name, opts)
    else
      raise
    end
  return data
end
delete_property_with_http_info(name, property_name, opts = {}) click to toggle source

Delete document property.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1759
def delete_property_with_http_info(name, property_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_property ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_property"
  end
  # verify the required parameter 'property_name' is set
  if @api_client.config.client_side_validation && property_name.nil?
    fail ArgumentError, "Missing the required parameter 'property_name' when calling PdfApi.delete_property"
  end
  # resource path
  local_var_path = "/pdf/{name}/documentproperties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_stamp(name, stamp_id, opts = {}) click to toggle source

Delete document stamp by ID

@param name The document name. @param stamp_id The stamp ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1818
def delete_stamp(name, stamp_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_stamp_with_http_info(name, stamp_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_stamp_with_http_info(name, stamp_id, opts)
    else
      raise
    end
  return data
end
delete_stamp_with_http_info(name, stamp_id, opts = {}) click to toggle source

Delete document stamp by ID

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1840
def delete_stamp_with_http_info(name, stamp_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_stamp ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_stamp"
  end
  # verify the required parameter 'stamp_id' is set
  if @api_client.config.client_side_validation && stamp_id.nil?
    fail ArgumentError, "Missing the required parameter 'stamp_id' when calling PdfApi.delete_stamp"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps/{stampId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'stampId' + '}', stamp_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_stamp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_table(name, table_id, opts = {}) click to toggle source

Delete document table by ID

@param name The document name. @param table_id The table ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1898
def delete_table(name, table_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = delete_table_with_http_info(name, table_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = delete_table_with_http_info(name, table_id, opts)
    else
      raise
    end
  return data
end
delete_table_with_http_info(name, table_id, opts = {}) click to toggle source

Delete document table by ID

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1919
def delete_table_with_http_info(name, table_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.delete_table ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.delete_table"
  end
  # verify the required parameter 'table_id' is set
  if @api_client.config.client_side_validation && table_id.nil?
    fail ArgumentError, "Missing the required parameter 'table_id' when calling PdfApi.delete_table"
  end
  # resource path
  local_var_path = "/pdf/{name}/tables/{tableId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'tableId' + '}', table_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#delete_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
download_file(path, opts = {}) click to toggle source

Download file

@param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to download @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1975
def download_file(path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = download_file_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = download_file_with_http_info(path, opts)
    else
      raise
    end
  return data
end
download_file_with_http_info(path, opts = {}) click to toggle source

Download file

@param path File path e.g. &#39;/folder/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID to download @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 1995
def download_file_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.download_file ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.download_file"
  end
  # resource path
  local_var_path = "/pdf/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
  query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#download_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_bookmark(name, bookmark_path, opts = {}) click to toggle source

Read document bookmark.

@param name The document name. @param bookmark_path The bookmark path. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [BookmarkResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2049
def get_bookmark(name, bookmark_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_bookmark_with_http_info(name, bookmark_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_bookmark_with_http_info(name, bookmark_path, opts)
    else
      raise
    end
  return data
end
get_bookmark_with_http_info(name, bookmark_path, opts = {}) click to toggle source

Read document bookmark.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2071
def get_bookmark_with_http_info(name, bookmark_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_bookmark ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_bookmark"
  end
  # verify the required parameter 'bookmark_path' is set
  if @api_client.config.client_side_validation && bookmark_path.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark_path' when calling PdfApi.get_bookmark"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/bookmark/{bookmarkPath}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkPath' + '}', bookmark_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BookmarkResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_bookmark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_bookmarks(name, bookmark_path, opts = {}) click to toggle source

Read document bookmarks node list.

@param name The document name. @param bookmark_path The bookmark path. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [BookmarksResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2130
def get_bookmarks(name, bookmark_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_bookmarks_with_http_info(name, bookmark_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_bookmarks_with_http_info(name, bookmark_path, opts)
    else
      raise
    end
  return data
end
get_bookmarks_with_http_info(name, bookmark_path, opts = {}) click to toggle source

Read document bookmarks node list.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2152
def get_bookmarks_with_http_info(name, bookmark_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_bookmarks ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_bookmarks"
  end
  # verify the required parameter 'bookmark_path' is set
  if @api_client.config.client_side_validation && bookmark_path.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark_path' when calling PdfApi.get_bookmarks"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/list/{bookmarkPath}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkPath' + '}', bookmark_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BookmarksResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_bookmarks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_caret_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page caret annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CaretAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2210
def get_caret_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_caret_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_caret_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_caret_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page caret annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2231
def get_caret_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_caret_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_caret_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_caret_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/caret/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CaretAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_caret_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_check_box_field(name, field_name, opts = {}) click to toggle source

Read document checkbox field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CheckBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2288
def get_check_box_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_check_box_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_check_box_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_check_box_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document checkbox field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2309
def get_check_box_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_check_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_check_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_check_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/checkbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CheckBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_check_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_circle_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page circle annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CircleAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2366
def get_circle_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_circle_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_circle_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_circle_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page circle annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2387
def get_circle_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_circle_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_circle_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_circle_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/circle/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CircleAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_circle_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_combo_box_field(name, field_name, opts = {}) click to toggle source

Read document combobox field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ComboBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2444
def get_combo_box_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_combo_box_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_combo_box_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_combo_box_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document combobox field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2465
def get_combo_box_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_combo_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_combo_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_combo_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/combobox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ComboBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_combo_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_disc_usage(opts = {}) click to toggle source

Get disc usage

@param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [DiscUsage]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2519
def get_disc_usage(opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_disc_usage_with_http_info(opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_disc_usage_with_http_info(opts)
    else
      raise
    end
  return data
end
get_disc_usage_with_http_info(opts = {}) click to toggle source

Get disc usage

@param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(DiscUsage, Fixnum, Hash)>] DiscUsage data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2537
def get_disc_usage_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_disc_usage ..."
  end
  # resource path
  local_var_path = "/pdf/storage/disc"

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DiscUsage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_disc_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document(name, opts = {}) click to toggle source

Read common document info.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [DocumentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2585
def get_document(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_annotations(name, opts = {}) click to toggle source

Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AnnotationsInfoResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2659
def get_document_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_annotations_with_http_info(name, opts = {}) click to toggle source

Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2679
def get_document_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AnnotationsInfoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_attachment_by_index(name, attachment_index, opts = {}) click to toggle source

Read document attachment info by its index.

@param name The document name. @param attachment_index The attachment index. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AttachmentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2732
def get_document_attachment_by_index(name, attachment_index, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_attachment_by_index_with_http_info(name, attachment_index, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_attachment_by_index_with_http_info(name, attachment_index, opts)
    else
      raise
    end
  return data
end
get_document_attachment_by_index_with_http_info(name, attachment_index, opts = {}) click to toggle source

Read document attachment info by its index.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2753
def get_document_attachment_by_index_with_http_info(name, attachment_index, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_attachment_by_index ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_attachment_by_index"
  end
  # verify the required parameter 'attachment_index' is set
  if @api_client.config.client_side_validation && attachment_index.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_index' when calling PdfApi.get_document_attachment_by_index"
  end
  # resource path
  local_var_path = "/pdf/{name}/attachments/{attachmentIndex}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'attachmentIndex' + '}', attachment_index.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AttachmentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_attachment_by_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_attachments(name, opts = {}) click to toggle source

Read document attachments info.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AttachmentsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2809
def get_document_attachments(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_attachments_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_attachments_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_attachments_with_http_info(name, opts = {}) click to toggle source

Read document attachments info.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2829
def get_document_attachments_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_attachments ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_attachments"
  end
  # resource path
  local_var_path = "/pdf/{name}/attachments".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AttachmentsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_bookmarks(name, opts = {}) click to toggle source

Read document bookmarks tree.

@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. @option opts [String] :password The password (Base64). @return [BookmarksResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2882
def get_document_bookmarks(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_bookmarks_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_bookmarks_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_bookmarks_with_http_info(name, opts = {}) click to toggle source

Read document bookmarks tree.

@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. @option opts [String] :password The password (Base64). @return [Array<(BookmarksResponse, Fixnum, Hash)>] BookmarksResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2903
def get_document_bookmarks_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_bookmarks ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_bookmarks"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/tree".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?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BookmarksResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_bookmarks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_caret_annotations(name, opts = {}) click to toggle source

Read document caret annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CaretAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2956
def get_document_caret_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_caret_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_caret_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_caret_annotations_with_http_info(name, opts = {}) click to toggle source

Read document caret annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2976
def get_document_caret_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_caret_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_caret_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/caret".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CaretAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_caret_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_check_box_fields(name, opts = {}) click to toggle source

Read document checkbox fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CheckBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3028
def get_document_check_box_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_check_box_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_check_box_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_check_box_fields_with_http_info(name, opts = {}) click to toggle source

Read document checkbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3048
def get_document_check_box_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_check_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_check_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/checkbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CheckBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_check_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_circle_annotations(name, opts = {}) click to toggle source

Read document circle annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CircleAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3100
def get_document_circle_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_circle_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_circle_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_circle_annotations_with_http_info(name, opts = {}) click to toggle source

Read document circle annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3120
def get_document_circle_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_circle_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_circle_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/circle".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CircleAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_combo_box_fields(name, opts = {}) click to toggle source

Read document combobox fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ComboBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3172
def get_document_combo_box_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_combo_box_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_combo_box_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_combo_box_fields_with_http_info(name, opts = {}) click to toggle source

Read document combobox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3192
def get_document_combo_box_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_combo_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_combo_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/combobox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ComboBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_combo_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_display_properties(name, opts = {}) click to toggle source

Read document display properties.

@param name @param [Hash] opts the optional parameters @option opts [String] :storage @option opts [String] :folder @return [DisplayPropertiesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3244
def get_document_display_properties(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_display_properties_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_display_properties_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_display_properties_with_http_info(name, opts = {}) click to toggle source

Read document display properties.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3264
def get_document_display_properties_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_display_properties ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_display_properties"
  end
  # resource path
  local_var_path = "/pdf/{name}/displayproperties".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DisplayPropertiesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_display_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_file_attachment_annotations(name, opts = {}) click to toggle source

Read document FileAttachment annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FileAttachmentAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3316
def get_document_file_attachment_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_file_attachment_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_file_attachment_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_file_attachment_annotations_with_http_info(name, opts = {}) click to toggle source

Read document FileAttachment annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3336
def get_document_file_attachment_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_file_attachment_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_file_attachment_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/fileattachment".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileAttachmentAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_file_attachment_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_free_text_annotations(name, opts = {}) click to toggle source

Read document free text annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FreeTextAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3388
def get_document_free_text_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_free_text_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_free_text_annotations_with_http_info(name, opts = {}) click to toggle source

Read document free text annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3408
def get_document_free_text_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_free_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_free_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/freetext".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeTextAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_highlight_annotations(name, opts = {}) click to toggle source

Read document highlight annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [HighlightAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3460
def get_document_highlight_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_highlight_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_highlight_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_highlight_annotations_with_http_info(name, opts = {}) click to toggle source

Read document highlight annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3480
def get_document_highlight_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_highlight_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_highlight_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/highlight".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'HighlightAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_highlight_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_ink_annotations(name, opts = {}) click to toggle source

Read document ink annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [InkAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3532
def get_document_ink_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_ink_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_ink_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_ink_annotations_with_http_info(name, opts = {}) click to toggle source

Read document ink annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3552
def get_document_ink_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_ink_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_ink_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/ink".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InkAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_ink_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_layers(name, opts = {}) click to toggle source

Gets document layers.

@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. @option opts [String] :pass_base64 The password (Base64). @return [DocumentLayers]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3605
def get_document_layers(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_layers_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_layers_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_layers_with_http_info(name, opts = {}) click to toggle source

Gets document layers.

@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. @option opts [String] :pass_base64 The password (Base64). @return [Array<(DocumentLayers, Fixnum, Hash)>] DocumentLayers data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3626
def get_document_layers_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_layers ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_layers"
  end
  # resource path
  local_var_path = "/pdf/{name}/layers".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?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentLayers')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_layers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_line_annotations(name, opts = {}) click to toggle source

Read document line annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [LineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3679
def get_document_line_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_line_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_line_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_line_annotations_with_http_info(name, opts = {}) click to toggle source

Read document line annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3699
def get_document_line_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/line".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_list_box_fields(name, opts = {}) click to toggle source

Read document listbox fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ListBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3751
def get_document_list_box_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_list_box_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_list_box_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_list_box_fields_with_http_info(name, opts = {}) click to toggle source

Read document listbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3771
def get_document_list_box_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_list_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_list_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/listbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_list_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_movie_annotations(name, opts = {}) click to toggle source

Read document movie annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [MovieAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3823
def get_document_movie_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_movie_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_movie_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_movie_annotations_with_http_info(name, opts = {}) click to toggle source

Read document movie annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3843
def get_document_movie_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_movie_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_movie_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/movie".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MovieAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_movie_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_poly_line_annotations(name, opts = {}) click to toggle source

Read document polyline annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolyLineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3895
def get_document_poly_line_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_poly_line_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_poly_line_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_poly_line_annotations_with_http_info(name, opts = {}) click to toggle source

Read document polyline annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3915
def get_document_poly_line_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_poly_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_poly_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polyline".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolyLineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_polygon_annotations(name, opts = {}) click to toggle source

Read document polygon annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolygonAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3967
def get_document_polygon_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_polygon_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_polygon_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_polygon_annotations_with_http_info(name, opts = {}) click to toggle source

Read document polygon annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 3987
def get_document_polygon_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_polygon_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_polygon_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polygon".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolygonAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_popup_annotations(name, opts = {}) click to toggle source

Read document popup annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PopupAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4039
def get_document_popup_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_popup_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_popup_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_popup_annotations_by_parent(name, annotation_id, opts = {}) click to toggle source

Read document popup annotations by parent id.

@param name The document name. @param annotation_id The parent annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PopupAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4112
def get_document_popup_annotations_by_parent(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_popup_annotations_by_parent_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_popup_annotations_by_parent_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_document_popup_annotations_by_parent_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document popup annotations by parent id.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4133
def get_document_popup_annotations_by_parent_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_popup_annotations_by_parent ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_popup_annotations_by_parent"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_document_popup_annotations_by_parent"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/{annotationId}/popup".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PopupAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_popup_annotations_by_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_popup_annotations_with_http_info(name, opts = {}) click to toggle source

Read document popup annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4059
def get_document_popup_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_popup_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_popup_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/popup".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PopupAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_popup_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_properties(name, opts = {}) click to toggle source

Read document properties.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password The password (Base64). @return [DocumentPropertiesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4190
def get_document_properties(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_properties_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_properties_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_properties_with_http_info(name, opts = {}) click to toggle source

Read document properties.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4211
def get_document_properties_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_properties ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_properties"
  end
  # resource path
  local_var_path = "/pdf/{name}/documentproperties".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPropertiesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_property(name, property_name, opts = {}) click to toggle source

Read document property by name.

@param name The document name. @param property_name Property name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password The password (Base64). @return [DocumentPropertyResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4266
def get_document_property(name, property_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_property_with_http_info(name, property_name, opts)
    else
      raise
    end
  return data
end
get_document_property_with_http_info(name, property_name, opts = {}) click to toggle source

Read document property by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4288
def get_document_property_with_http_info(name, property_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_property ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_property"
  end
  # verify the required parameter 'property_name' is set
  if @api_client.config.client_side_validation && property_name.nil?
    fail ArgumentError, "Missing the required parameter 'property_name' when calling PdfApi.get_document_property"
  end
  # resource path
  local_var_path = "/pdf/{name}/documentproperties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPropertyResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_radio_button_fields(name, opts = {}) click to toggle source

Read document radiobutton fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RadioButtonFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4345
def get_document_radio_button_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_radio_button_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_radio_button_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_radio_button_fields_with_http_info(name, opts = {}) click to toggle source

Read document radiobutton fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4365
def get_document_radio_button_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_radio_button_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_radio_button_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/radiobutton".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RadioButtonFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_radio_button_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_redaction_annotations(name, opts = {}) click to toggle source

Read document redaction annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RedactionAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4417
def get_document_redaction_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_redaction_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_redaction_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_redaction_annotations_with_http_info(name, opts = {}) click to toggle source

Read document redaction annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4437
def get_document_redaction_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_redaction_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_redaction_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/redaction".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RedactionAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_redaction_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_screen_annotations(name, opts = {}) click to toggle source

Read document screen annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ScreenAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4489
def get_document_screen_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_screen_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_screen_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_screen_annotations_with_http_info(name, opts = {}) click to toggle source

Read document screen annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4509
def get_document_screen_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_screen_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_screen_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/screen".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScreenAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_screen_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_signature_fields(name, opts = {}) click to toggle source

Read document signature fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SignatureFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4561
def get_document_signature_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_signature_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_signature_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_signature_fields_with_http_info(name, opts = {}) click to toggle source

Read document signature fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4581
def get_document_signature_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_signature_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_signature_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/signature".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SignatureFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_signature_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_sound_annotations(name, opts = {}) click to toggle source

Read document sound annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SoundAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4633
def get_document_sound_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_sound_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_sound_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_sound_annotations_with_http_info(name, opts = {}) click to toggle source

Read document sound annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4653
def get_document_sound_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_sound_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_sound_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/sound".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SoundAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_sound_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_square_annotations(name, opts = {}) click to toggle source

Read document square annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquareAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4705
def get_document_square_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_square_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_square_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_square_annotations_with_http_info(name, opts = {}) click to toggle source

Read document square annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4725
def get_document_square_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_square_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_square_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/square".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquareAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_squiggly_annotations(name, opts = {}) click to toggle source

Read document squiggly annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquigglyAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4777
def get_document_squiggly_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_squiggly_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_squiggly_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_squiggly_annotations_with_http_info(name, opts = {}) click to toggle source

Read document squiggly annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4797
def get_document_squiggly_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_squiggly_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_squiggly_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/squiggly".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquigglyAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_squiggly_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_stamp_annotations(name, opts = {}) click to toggle source

Read document stamp annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StampAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4849
def get_document_stamp_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_stamp_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_stamp_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_stamp_annotations_with_http_info(name, opts = {}) click to toggle source

Read document stamp annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4869
def get_document_stamp_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_stamp_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_stamp_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/stamp".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_stamp_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_stamps(name, opts = {}) click to toggle source

Read document stamps.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StampsInfoResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4921
def get_document_stamps(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_stamps_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_stamps_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_stamps_with_http_info(name, opts = {}) click to toggle source

Read document stamps.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4941
def get_document_stamps_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampsInfoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_strike_out_annotations(name, opts = {}) click to toggle source

Read document StrikeOut annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StrikeOutAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 4993
def get_document_strike_out_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_strike_out_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_strike_out_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_strike_out_annotations_with_http_info(name, opts = {}) click to toggle source

Read document StrikeOut annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5013
def get_document_strike_out_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_strike_out_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_strike_out_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/strikeout".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StrikeOutAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_strike_out_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_tables(name, opts = {}) click to toggle source

Read document tables.

@param name @param [Hash] opts the optional parameters @option opts [String] :storage @option opts [String] :folder @return [TablesRecognizedResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5065
def get_document_tables(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_tables_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_tables_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_tables_with_http_info(name, opts = {}) click to toggle source

Read document tables.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5085
def get_document_tables_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_tables ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_tables"
  end
  # resource path
  local_var_path = "/pdf/{name}/tables".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TablesRecognizedResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_text_annotations(name, opts = {}) click to toggle source

Read document text annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5137
def get_document_text_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_text_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_text_annotations_with_http_info(name, opts = {}) click to toggle source

Read document text annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5157
def get_document_text_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_text_box_fields(name, opts = {}) click to toggle source

Read document text box fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5209
def get_document_text_box_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_text_box_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_text_box_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_text_box_fields_with_http_info(name, opts = {}) click to toggle source

Read document text box fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5229
def get_document_text_box_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_text_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_text_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/textbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_text_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_document_underline_annotations(name, opts = {}) click to toggle source

Read document underline annotations.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [UnderlineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5281
def get_document_underline_annotations(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_document_underline_annotations_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_document_underline_annotations_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_document_underline_annotations_with_http_info(name, opts = {}) click to toggle source

Read document underline annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5301
def get_document_underline_annotations_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_document_underline_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_document_underline_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/underline".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UnderlineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document_underline_annotations\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

Read common document info.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 2606
def get_document_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.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 PdfApi.get_document"
  end
  # resource path
  local_var_path = "/pdf/{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?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_download_document_attachment_by_index(name, attachment_index, opts = {}) click to toggle source

Download document attachment content by its index.

@param name The document name. @param attachment_index The attachment index. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5354
def get_download_document_attachment_by_index(name, attachment_index, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts)
    else
      raise
    end
  return data
end
get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts = {}) click to toggle source

Download document attachment content by its index.

@param name The document name. @param attachment_index The attachment index. @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_pdf_cloud/api/pdf_api.rb, line 5375
def get_download_document_attachment_by_index_with_http_info(name, attachment_index, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_download_document_attachment_by_index ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_download_document_attachment_by_index"
  end
  # verify the required parameter 'attachment_index' is set
  if @api_client.config.client_side_validation && attachment_index.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_index' when calling PdfApi.get_download_document_attachment_by_index"
  end
  # resource path
  local_var_path = "/pdf/{name}/attachments/{attachmentIndex}/download".sub('{' + 'name' + '}', name.to_s).sub('{' + 'attachmentIndex' + '}', attachment_index.to_s)

  # query parameters
  query_params = {}
  query_params[:'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 = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_download_document_attachment_by_index\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_epub_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert EPUB file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.epub) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5430
def get_epub_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_epub_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_epub_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert EPUB file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.epub) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5449
def get_epub_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_epub_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_epub_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/epub"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_epub_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_export_fields_from_pdf_to_fdf_in_storage(name, opts = {}) click to toggle source

Export fields from from PDF in storage to FDF file.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5501
def get_export_fields_from_pdf_to_fdf_in_storage(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, opts = {}) click to toggle source

Export fields from from PDF in storage to FDF file.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5521
def get_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_export_fields_from_pdf_to_fdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_export_fields_from_pdf_to_fdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/fdf".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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_export_fields_from_pdf_to_fdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_export_fields_from_pdf_to_xfdf_in_storage(name, opts = {}) click to toggle source

Export fields from from PDF in storage to XFDF file.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5573
def get_export_fields_from_pdf_to_xfdf_in_storage(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, opts = {}) click to toggle source

Export fields from from PDF in storage to XFDF file.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5593
def get_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_export_fields_from_pdf_to_xfdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_export_fields_from_pdf_to_xfdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/xfdf".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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_export_fields_from_pdf_to_xfdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_export_fields_from_pdf_to_xml_in_storage(name, opts = {}) click to toggle source

Export fields from from PDF in storage to XML file.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5645
def get_export_fields_from_pdf_to_xml_in_storage(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, opts = {}) click to toggle source

Export fields from from PDF in storage to XML file.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5665
def get_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_export_fields_from_pdf_to_xml_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_export_fields_from_pdf_to_xml_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/xml".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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_export_fields_from_pdf_to_xml_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_field(name, field_name, opts = {}) click to toggle source

Get document field by name.

@param name The document name. @param field_name The field name (name should be encoded). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5718
def get_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_field_with_http_info(name, field_name, opts = {}) click to toggle source

Get document field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5739
def get_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_fields(name, opts = {}) click to toggle source

Get document fields.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5795
def get_fields(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_fields_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_fields_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_fields_with_http_info(name, opts = {}) click to toggle source

Get document fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5815
def get_fields_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_file_attachment_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page FileAttachment annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FileAttachmentAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5868
def get_file_attachment_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_file_attachment_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_file_attachment_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_file_attachment_annotation_data(name, annotation_id, opts = {}) click to toggle source

Read document page FileAttachment annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5946
def get_file_attachment_annotation_data(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_file_attachment_annotation_data_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_file_attachment_annotation_data_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_file_attachment_annotation_data_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page FileAttachment annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5967
def get_file_attachment_annotation_data_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_file_attachment_annotation_data ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_file_attachment_annotation_data"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_file_attachment_annotation_data"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/fileattachment/{annotationId}/data".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_file_attachment_annotation_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_file_attachment_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page FileAttachment annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 5889
def get_file_attachment_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_file_attachment_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_file_attachment_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_file_attachment_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/fileattachment/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileAttachmentAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_file_attachment_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_file_versions(path, opts = {}) click to toggle source

Get file versions

@param path File path e.g. &#39;/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FileVersions]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6022
def get_file_versions(path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_file_versions_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_file_versions_with_http_info(path, opts)
    else
      raise
    end
  return data
end
get_file_versions_with_http_info(path, opts = {}) click to toggle source

Get file versions

@param path File path e.g. &#39;/file.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FileVersions, Fixnum, Hash)>] FileVersions data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6041
def get_file_versions_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_file_versions ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.get_file_versions"
  end
  # resource path
  local_var_path = "/pdf/storage/version/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileVersions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_file_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_files_list(path, opts = {}) click to toggle source

Get all files and folders within a folder

@param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FilesList]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6091
def get_files_list(path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_files_list_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_files_list_with_http_info(path, opts)
    else
      raise
    end
  return data
end
get_files_list_with_http_info(path, opts = {}) click to toggle source

Get all files and folders within a folder

@param path Folder path e.g. &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FilesList, Fixnum, Hash)>] FilesList data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6110
def get_files_list_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_files_list ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.get_files_list"
  end
  # resource path
  local_var_path = "/pdf/storage/folder/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FilesList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_files_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_free_text_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page free text annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FreeTextAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6162
def get_free_text_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_free_text_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_free_text_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page free text annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6183
def get_free_text_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_free_text_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_free_text_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_free_text_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/freetext/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeTextAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_free_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_highlight_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page highlight annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [HighlightAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6240
def get_highlight_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_highlight_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_highlight_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_highlight_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page highlight annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6261
def get_highlight_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_highlight_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_highlight_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_highlight_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/highlight/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'HighlightAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_highlight_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_html_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert HTML file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.zip) @param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6324
def get_html_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_html_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_html_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert HTML file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.zip) @param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6351
def get_html_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_html_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_html_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/html"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'htmlFileName'] = opts[:'html_file_name'] if !opts[:'html_file_name'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_html_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_image(name, image_id, opts = {}) click to toggle source

Read document image by ID.

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ImageResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6412
def get_image(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_image_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_image_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
get_image_extract_as_gif(name, image_id, opts = {}) click to toggle source

Extract document image in GIF format

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6492
def get_image_extract_as_gif(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_image_extract_as_gif_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
get_image_extract_as_gif_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in GIF format

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6515
def get_image_extract_as_gif_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_gif ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_gif"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_gif"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_image_extract_as_jpeg(name, image_id, opts = {}) click to toggle source

Extract document image in JPEG format

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6576
def get_image_extract_as_jpeg(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_image_extract_as_jpeg_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
get_image_extract_as_jpeg_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in JPEG format

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6599
def get_image_extract_as_jpeg_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_jpeg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_jpeg"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_jpeg"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_image_extract_as_png(name, image_id, opts = {}) click to toggle source

Extract document image in PNG format

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6660
def get_image_extract_as_png(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_image_extract_as_png_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
get_image_extract_as_png_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in PNG format

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6683
def get_image_extract_as_png_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_png ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_png"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_png"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_image_extract_as_tiff(name, image_id, opts = {}) click to toggle source

Extract document image in TIFF format

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6744
def get_image_extract_as_tiff(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_image_extract_as_tiff_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
get_image_extract_as_tiff_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in TIFF format

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6767
def get_image_extract_as_tiff_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_image_extract_as_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image_extract_as_tiff"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image_extract_as_tiff"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_image_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_image_with_http_info(name, image_id, opts = {}) click to toggle source

Read document image by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6433
def get_image_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_image ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_image"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.get_image"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ImageResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_images(name, page_number, opts = {}) click to toggle source

Read document images.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ImagesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6826
def get_images(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_images_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_images_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_images_with_http_info(name, page_number, opts = {}) click to toggle source

Read document images.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6847
def get_images_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_images ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_images"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_images"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ImagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_import_fields_from_fdf_in_storage(name, fdf_file_path, opts = {}) click to toggle source

Update fields from FDF file in storage.

@param name The document name. @param fdf_file_path The Fdf file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6904
def get_import_fields_from_fdf_in_storage(name, fdf_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts)
    else
      raise
    end
  return data
end
get_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts = {}) click to toggle source

Update fields from FDF file in storage.

@param name The document name. @param fdf_file_path The Fdf file path. @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_pdf_cloud/api/pdf_api.rb, line 6925
def get_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_import_fields_from_fdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_import_fields_from_fdf_in_storage"
  end
  # verify the required parameter 'fdf_file_path' is set
  if @api_client.config.client_side_validation && fdf_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'fdf_file_path' when calling PdfApi.get_import_fields_from_fdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/fdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'fdfFilePath'] = fdf_file_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 = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_import_fields_from_fdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_import_fields_from_xfdf_in_storage(name, xfdf_file_path, opts = {}) click to toggle source

Update fields from XFDF file in storage.

@param name The document name. @param xfdf_file_path The XFDF file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 6983
def get_import_fields_from_xfdf_in_storage(name, xfdf_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts)
    else
      raise
    end
  return data
end
get_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts = {}) click to toggle source

Update fields from XFDF file in storage.

@param name The document name. @param xfdf_file_path The XFDF file path. @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_pdf_cloud/api/pdf_api.rb, line 7004
def get_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_import_fields_from_xfdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_import_fields_from_xfdf_in_storage"
  end
  # verify the required parameter 'xfdf_file_path' is set
  if @api_client.config.client_side_validation && xfdf_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xfdf_file_path' when calling PdfApi.get_import_fields_from_xfdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xfdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xfdfFilePath'] = xfdf_file_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 = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_import_fields_from_xfdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_import_fields_from_xml_in_storage(name, xml_file_path, opts = {}) click to toggle source

Import from XML file (located on storage) to PDF format and return resulting file in response.

@param name The document name. @param xml_file_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7062
def get_import_fields_from_xml_in_storage(name, xml_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts)
    else
      raise
    end
  return data
end
get_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts = {}) click to toggle source

Import from XML file (located on storage) to PDF format and return resulting file in response.

@param name The document name. @param xml_file_path Full source filename (ex. /folder1/folder2/template.xml) @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_pdf_cloud/api/pdf_api.rb, line 7083
def get_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_import_fields_from_xml_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_import_fields_from_xml_in_storage"
  end
  # verify the required parameter 'xml_file_path' is set
  if @api_client.config.client_side_validation && xml_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xml_file_path' when calling PdfApi.get_import_fields_from_xml_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xmlFilePath'] = xml_file_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 = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_import_fields_from_xml_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ink_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page ink annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [InkAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7141
def get_ink_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_ink_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_ink_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_ink_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page ink annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7162
def get_ink_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_ink_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_ink_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_ink_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/ink/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InkAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_ink_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_line_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page line annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [LineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7219
def get_line_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_line_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_line_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_line_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page line annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7240
def get_line_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_line_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_line_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_line_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/line/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_list_box_field(name, field_name, opts = {}) click to toggle source

Read document listbox field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ListBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7375
def get_list_box_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_list_box_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_list_box_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_list_box_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document listbox field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7396
def get_list_box_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_list_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_list_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_list_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/listbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_list_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_markdown_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert MD file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.md) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7451
def get_markdown_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_markdown_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_markdown_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_markdown_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert MD file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.md) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7470
def get_markdown_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_markdown_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_markdown_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/markdown"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_markdown_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_mht_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert MHT file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.mht) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7521
def get_mht_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_mht_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_mht_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert MHT file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.mht) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7540
def get_mht_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_mht_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_mht_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/mht"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_mht_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_movie_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page movie annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [MovieAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7593
def get_movie_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_movie_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_movie_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_movie_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page movie annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7614
def get_movie_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_movie_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_movie_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_movie_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/movie/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MovieAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_movie_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page(name, page_number, opts = {}) click to toggle source

Read document page info.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [DocumentPageResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7671
def get_page(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_annotations(name, page_number, opts = {}) click to toggle source

Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AnnotationsInfoResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7749
def get_page_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page annotations. Returns only FreeTextAnnotations, TextAnnotations, other annotations will implemented next releases.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7770
def get_page_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AnnotationsInfoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_caret_annotations(name, page_number, opts = {}) click to toggle source

Read document page caret annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CaretAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7827
def get_page_caret_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_caret_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_caret_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_caret_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page caret annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7848
def get_page_caret_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_caret_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_caret_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_caret_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/caret".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CaretAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_caret_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_check_box_fields(name, page_number, opts = {}) click to toggle source

Read document page checkbox fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CheckBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7905
def get_page_check_box_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_check_box_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_check_box_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_check_box_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page checkbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7926
def get_page_check_box_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_check_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_check_box_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_check_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/checkbox".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CheckBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_check_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_circle_annotations(name, page_number, opts = {}) click to toggle source

Read document page circle annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CircleAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7983
def get_page_circle_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_circle_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_circle_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_circle_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page circle annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8004
def get_page_circle_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_circle_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_circle_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_circle_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/circle".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CircleAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_combo_box_fields(name, page_number, opts = {}) click to toggle source

Read document page combobox fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ComboBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8061
def get_page_combo_box_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_combo_box_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_combo_box_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_combo_box_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page combobox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8082
def get_page_combo_box_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_combo_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_combo_box_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_combo_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/combobox".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ComboBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_combo_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_bmp(name, page_number, opts = {}) click to toggle source

Convert document page to Bmp image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8142
def get_page_convert_to_bmp(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_bmp_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_bmp_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Bmp image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8166
def get_page_convert_to_bmp_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_bmp ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_bmp"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_bmp"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/bmp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_emf(name, page_number, opts = {}) click to toggle source

Convert document page to Emf image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8229
def get_page_convert_to_emf(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_emf_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_emf_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Emf image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8253
def get_page_convert_to_emf_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_emf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_emf"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_emf"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/emf".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_emf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_gif(name, page_number, opts = {}) click to toggle source

Convert document page to Gif image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8316
def get_page_convert_to_gif(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_gif_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_gif_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Gif image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8340
def get_page_convert_to_gif_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_gif ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_gif"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_gif"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_jpeg(name, page_number, opts = {}) click to toggle source

Convert document page to Jpeg image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8403
def get_page_convert_to_jpeg(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_jpeg_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_jpeg_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Jpeg image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8427
def get_page_convert_to_jpeg_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_jpeg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_jpeg"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_jpeg"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_png(name, page_number, opts = {}) click to toggle source

Convert document page to Png image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8490
def get_page_convert_to_png(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_png_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_png_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Png image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8514
def get_page_convert_to_png_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_png ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_png"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_png"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_convert_to_tiff(name, page_number, opts = {}) click to toggle source

Convert document page to Tiff image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8577
def get_page_convert_to_tiff(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_convert_to_tiff_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_convert_to_tiff_with_http_info(name, page_number, opts = {}) click to toggle source

Convert document page to Tiff image and return resulting file in response.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8601
def get_page_convert_to_tiff_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_convert_to_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_convert_to_tiff"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_convert_to_tiff"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_convert_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_file_attachment_annotations(name, page_number, opts = {}) click to toggle source

Read document page FileAttachment annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FileAttachmentAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8661
def get_page_file_attachment_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_file_attachment_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_file_attachment_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_file_attachment_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page FileAttachment annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8682
def get_page_file_attachment_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_file_attachment_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_file_attachment_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_file_attachment_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/fileattachment".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileAttachmentAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_file_attachment_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_free_text_annotations(name, page_number, opts = {}) click to toggle source

Read document page free text annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FreeTextAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8739
def get_page_free_text_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_free_text_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_free_text_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page free text annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8760
def get_page_free_text_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_free_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_free_text_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_free_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeTextAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_highlight_annotations(name, page_number, opts = {}) click to toggle source

Read document page highlight annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [HighlightAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8817
def get_page_highlight_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_highlight_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_highlight_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_highlight_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page highlight annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8838
def get_page_highlight_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_highlight_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_highlight_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_highlight_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/highlight".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'HighlightAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_highlight_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_ink_annotations(name, page_number, opts = {}) click to toggle source

Read document page ink annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [InkAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8895
def get_page_ink_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_ink_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_ink_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_ink_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page ink annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8916
def get_page_ink_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_ink_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_ink_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_ink_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/ink".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InkAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_ink_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_line_annotations(name, page_number, opts = {}) click to toggle source

Read document page line annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [LineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8973
def get_page_line_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_line_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_line_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_line_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page line annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 8994
def get_page_line_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_line_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/line".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_list_box_fields(name, page_number, opts = {}) click to toggle source

Read document page listbox fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ListBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9213
def get_page_list_box_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_list_box_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_list_box_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_list_box_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page listbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9234
def get_page_list_box_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_list_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_list_box_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_list_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/listbox".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_list_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_movie_annotations(name, page_number, opts = {}) click to toggle source

Read document page movie annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [MovieAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9291
def get_page_movie_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_movie_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_movie_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_movie_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page movie annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9312
def get_page_movie_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_movie_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_movie_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_movie_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/movie".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MovieAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_movie_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_poly_line_annotations(name, page_number, opts = {}) click to toggle source

Read document page polyline annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolyLineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9369
def get_page_poly_line_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_poly_line_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_poly_line_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_poly_line_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page polyline annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9390
def get_page_poly_line_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_poly_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_poly_line_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_poly_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polyline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolyLineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_polygon_annotations(name, page_number, opts = {}) click to toggle source

Read document page polygon annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolygonAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9447
def get_page_polygon_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_polygon_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_polygon_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_polygon_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page polygon annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9468
def get_page_polygon_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_polygon_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_polygon_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_polygon_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polygon".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolygonAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_popup_annotations(name, page_number, opts = {}) click to toggle source

Read document page popup annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PopupAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9525
def get_page_popup_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_popup_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_popup_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_popup_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page popup annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9546
def get_page_popup_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_popup_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_popup_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_popup_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/popup".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PopupAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_popup_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_radio_button_fields(name, page_number, opts = {}) click to toggle source

Read document page radiobutton fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RadioButtonFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9603
def get_page_radio_button_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_radio_button_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_radio_button_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_radio_button_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page radiobutton fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9624
def get_page_radio_button_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_radio_button_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_radio_button_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_radio_button_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/radiobutton".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RadioButtonFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_radio_button_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_redaction_annotations(name, page_number, opts = {}) click to toggle source

Read document page redaction annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RedactionAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9681
def get_page_redaction_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_redaction_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_redaction_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_redaction_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page redaction annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9702
def get_page_redaction_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_redaction_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_redaction_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_redaction_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/redaction".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RedactionAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_redaction_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_screen_annotations(name, page_number, opts = {}) click to toggle source

Read document page screen annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ScreenAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9759
def get_page_screen_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_screen_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_screen_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_screen_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page screen annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9780
def get_page_screen_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_screen_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_screen_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_screen_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/screen".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScreenAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_screen_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_signature_fields(name, page_number, opts = {}) click to toggle source

Read document page signature fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SignatureFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9837
def get_page_signature_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_signature_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_signature_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_signature_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page signature fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9858
def get_page_signature_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_signature_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_signature_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_signature_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/signature".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SignatureFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_signature_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_sound_annotations(name, page_number, opts = {}) click to toggle source

Read document page sound annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SoundAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9915
def get_page_sound_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_sound_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_sound_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_sound_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page sound annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9936
def get_page_sound_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_sound_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_sound_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_sound_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/sound".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SoundAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_sound_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_square_annotations(name, page_number, opts = {}) click to toggle source

Read document page square annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquareAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 9993
def get_page_square_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_square_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_square_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_square_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page square annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10014
def get_page_square_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_square_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_square_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_square_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/square".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquareAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_squiggly_annotations(name, page_number, opts = {}) click to toggle source

Read document page squiggly annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquigglyAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10071
def get_page_squiggly_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_squiggly_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_squiggly_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_squiggly_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page squiggly annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10092
def get_page_squiggly_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_squiggly_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_squiggly_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_squiggly_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/squiggly".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquigglyAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_squiggly_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_stamp_annotations(name, page_number, opts = {}) click to toggle source

Read document page stamp annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StampAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10149
def get_page_stamp_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_stamp_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_stamp_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_stamp_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page stamp annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10170
def get_page_stamp_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_stamp_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_stamp_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_stamp_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/stamp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_stamp_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_stamps(name, page_number, opts = {}) click to toggle source

Read page document stamps.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [StampsInfoResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10228
def get_page_stamps(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_stamps_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_stamps_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_stamps_with_http_info(name, page_number, opts = {}) click to toggle source

Read page document stamps.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10250
def get_page_stamps_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_stamps"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamps".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampsInfoResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_strike_out_annotations(name, page_number, opts = {}) click to toggle source

Read document page StrikeOut annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StrikeOutAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10308
def get_page_strike_out_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_strike_out_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_strike_out_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_strike_out_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page StrikeOut annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10329
def get_page_strike_out_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_strike_out_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_strike_out_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_strike_out_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/strikeout".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StrikeOutAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_strike_out_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_tables(name, page_number, opts = {}) click to toggle source

Read document page tables.

@param name @param page_number @param [Hash] opts the optional parameters @option opts [String] :storage @option opts [String] :folder @return [TablesRecognizedResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10386
def get_page_tables(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_tables_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_tables_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_tables_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page tables.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10407
def get_page_tables_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_tables ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_tables"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_tables"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/tables".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TablesRecognizedResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_text(name, page_number, llx, lly, urx, ury, opts = {}) click to toggle source

Read page text items.

@param name The document name. @param page_number Number of page (starting from 1). @param llx X-coordinate of lower - left corner. @param lly Y - coordinate of lower-left corner. @param urx X - coordinate of upper-right corner. @param ury Y - coordinate of upper-right corner. @param [Hash] opts the optional parameters @option opts [Array<String>] :format List of formats for search. @option opts [String] :regex Formats are specified as a regular expression. @option opts [BOOLEAN] :split_rects Split result fragments (default is true). (default to true) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [TextRectsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10471
def get_page_text(name, page_number, llx, lly, urx, ury, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts)
    else
      raise
    end
  return data
end
get_page_text_annotations(name, page_number, opts = {}) click to toggle source

Read document page text annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10579
def get_page_text_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_text_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_text_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page text annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10600
def get_page_text_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_text_box_fields(name, page_number, opts = {}) click to toggle source

Read document page text box fields.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextBoxFieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10657
def get_page_text_box_fields(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_text_box_fields_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_text_box_fields_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_text_box_fields_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page text box fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10678
def get_page_text_box_fields_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_text_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text_box_fields"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/page/{pageNumber}/fields/textbox".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextBoxFieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_text_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) click to toggle source

Read page text items.

@param name The document name. @param page_number Number of page (starting from 1). @param llx X-coordinate of lower - left corner. @param lly Y - coordinate of lower-left corner. @param urx X - coordinate of upper-right corner. @param ury Y - coordinate of upper-right corner. @param [Hash] opts the optional parameters @option opts [Array<String>] :format List of formats for search. @option opts [String] :regex Formats are specified as a regular expression. @option opts [BOOLEAN] :split_rects Split result fragments (default is true). @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10499
def get_page_text_with_http_info(name, page_number, llx, lly, urx, ury, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_text ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_text"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_text"
  end
  # verify the required parameter 'llx' is set
  if @api_client.config.client_side_validation && llx.nil?
    fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_page_text"
  end
  # verify the required parameter 'lly' is set
  if @api_client.config.client_side_validation && lly.nil?
    fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_page_text"
  end
  # verify the required parameter 'urx' is set
  if @api_client.config.client_side_validation && urx.nil?
    fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_page_text"
  end
  # verify the required parameter 'ury' is set
  if @api_client.config.client_side_validation && ury.nil?
    fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_page_text"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'LLX'] = llx
  query_params[:'LLY'] = lly
  query_params[:'URX'] = urx
  query_params[:'URY'] = ury
  query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil?
  query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil?
  query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextRectsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_underline_annotations(name, page_number, opts = {}) click to toggle source

Read document page underline annotations.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [UnderlineAnnotationsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10735
def get_page_underline_annotations(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_page_underline_annotations_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_page_underline_annotations_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
get_page_underline_annotations_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page underline annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10756
def get_page_underline_annotations_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page_underline_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page_underline_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page_underline_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/underline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UnderlineAnnotationsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page_underline_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_page_with_http_info(name, page_number, opts = {}) click to toggle source

Read document page info.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 7692
def get_page_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_page"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.get_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPageResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pages(name, opts = {}) click to toggle source

Read document pages info.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [DocumentPagesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10812
def get_pages(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pages_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pages_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pages_with_http_info(name, opts = {}) click to toggle source

Read document pages info.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10832
def get_pages_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pages ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pages"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pcl_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert PCL file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.pcl) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10883
def get_pcl_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pcl_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_pcl_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert PCL file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.pcl) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10902
def get_pcl_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pcl_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_pcl_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/pcl"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pcl_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_a_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert PDFA file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.pdf) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :dont_optimize If set, document resources will not be optimized. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10954
def get_pdf_a_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_a_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_a_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_pdf_a_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert PDFA file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.pdf) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :dont_optimize If set, document resources will not be optimized. @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 10974
def get_pdf_a_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_a_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_pdf_a_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/pdfa"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dontOptimize'] = opts[:'dont_optimize'] if !opts[:'dont_optimize'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_a_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_doc(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to DOC format and returns resulting file in response content.

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11036
def get_pdf_in_storage_to_doc(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_doc_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_doc_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to DOC format and returns resulting file in response content.

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11065
def get_pdf_in_storage_to_doc_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_doc ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_doc"
  end
  if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
    fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
  end
  if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
    fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'addReturnToLineEnd'] = opts[:'add_return_to_line_end'] if !opts[:'add_return_to_line_end'].nil?
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
  query_params[:'imageResolutionX'] = opts[:'image_resolution_x'] if !opts[:'image_resolution_x'].nil?
  query_params[:'imageResolutionY'] = opts[:'image_resolution_y'] if !opts[:'image_resolution_y'].nil?
  query_params[:'maxDistanceBetweenTextLines'] = opts[:'max_distance_between_text_lines'] if !opts[:'max_distance_between_text_lines'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
  query_params[:'recognizeBullets'] = opts[:'recognize_bullets'] if !opts[:'recognize_bullets'].nil?
  query_params[:'relativeHorizontalProximity'] = opts[:'relative_horizontal_proximity'] if !opts[:'relative_horizontal_proximity'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_epub(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to EPUB format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11133
def get_pdf_in_storage_to_epub(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_epub_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_epub_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to EPUB format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11154
def get_pdf_in_storage_to_epub_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_epub ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_epub"
  end
  if @api_client.config.client_side_validation && opts[:'content_recognition_mode'] && !['Flow', 'PdfFlow', 'Fixed'].include?(opts[:'content_recognition_mode'])
    fail ArgumentError, 'invalid value for "content_recognition_mode", must be one of Flow, PdfFlow, Fixed'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/epub".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'contentRecognitionMode'] = opts[:'content_recognition_mode'] if !opts[:'content_recognition_mode'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_epub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_html(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to Html format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11239
def get_pdf_in_storage_to_html(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_html_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_html_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to Html format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11288
def get_pdf_in_storage_to_html_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_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 PdfApi.get_pdf_in_storage_to_html"
  end
  if @api_client.config.client_side_validation && opts[:'document_type'] && !['Xhtml', 'Html5'].include?(opts[:'document_type'])
    fail ArgumentError, 'invalid value for "document_type", must be one of Xhtml, Html5'
  end
  if @api_client.config.client_side_validation && opts[:'antialiasing_processing'] && !['NoAdditionalProcessing', 'TryCorrectResultHtml'].include?(opts[:'antialiasing_processing'])
    fail ArgumentError, 'invalid value for "antialiasing_processing", must be one of NoAdditionalProcessing, TryCorrectResultHtml'
  end
  if @api_client.config.client_side_validation && opts[:'font_encoding_strategy'] && !['Default', 'DecreaseToUnicodePriorityLevel'].include?(opts[:'font_encoding_strategy'])
    fail ArgumentError, 'invalid value for "font_encoding_strategy", must be one of Default, DecreaseToUnicodePriorityLevel'
  end
  if @api_client.config.client_side_validation && opts[:'font_saving_mode'] && !['AlwaysSaveAsWOFF', 'AlwaysSaveAsTTF', 'AlwaysSaveAsEOT', 'SaveInAllFormats'].include?(opts[:'font_saving_mode'])
    fail ArgumentError, 'invalid value for "font_saving_mode", must be one of AlwaysSaveAsWOFF, AlwaysSaveAsTTF, AlwaysSaveAsEOT, SaveInAllFormats'
  end
  if @api_client.config.client_side_validation && opts[:'html_markup_generation_mode'] && !['WriteAllHtml', 'WriteOnlyBodyContent'].include?(opts[:'html_markup_generation_mode'])
    fail ArgumentError, 'invalid value for "html_markup_generation_mode", must be one of WriteAllHtml, WriteOnlyBodyContent'
  end
  if @api_client.config.client_side_validation && opts[:'letters_positioning_method'] && !['UseEmUnitsAndCompensationOfRoundingErrorsInCss', 'UsePixelUnitsInCssLetterSpacingForIE'].include?(opts[:'letters_positioning_method'])
    fail ArgumentError, 'invalid value for "letters_positioning_method", must be one of UseEmUnitsAndCompensationOfRoundingErrorsInCss, UsePixelUnitsInCssLetterSpacingForIE'
  end
  if @api_client.config.client_side_validation && opts[:'parts_embedding_mode'] && !['EmbedAllIntoHtml', 'EmbedCssOnly', 'NoEmbedding'].include?(opts[:'parts_embedding_mode'])
    fail ArgumentError, 'invalid value for "parts_embedding_mode", must be one of EmbedAllIntoHtml, EmbedCssOnly, NoEmbedding'
  end
  if @api_client.config.client_side_validation && opts[:'raster_images_saving_mode'] && !['AsPngImagesEmbeddedIntoSvg', 'AsExternalPngFilesReferencedViaSvg', 'AsEmbeddedPartsOfPngPageBackground'].include?(opts[:'raster_images_saving_mode'])
    fail ArgumentError, 'invalid value for "raster_images_saving_mode", must be one of AsPngImagesEmbeddedIntoSvg, AsExternalPngFilesReferencedViaSvg, AsEmbeddedPartsOfPngPageBackground'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/html".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'additionalMarginWidthInPoints'] = opts[:'additional_margin_width_in_points'] if !opts[:'additional_margin_width_in_points'].nil?
  query_params[:'compressSvgGraphicsIfAny'] = opts[:'compress_svg_graphics_if_any'] if !opts[:'compress_svg_graphics_if_any'].nil?
  query_params[:'convertMarkedContentToLayers'] = opts[:'convert_marked_content_to_layers'] if !opts[:'convert_marked_content_to_layers'].nil?
  query_params[:'defaultFontName'] = opts[:'default_font_name'] if !opts[:'default_font_name'].nil?
  query_params[:'documentType'] = opts[:'document_type'] if !opts[:'document_type'].nil?
  query_params[:'fixedLayout'] = opts[:'fixed_layout'] if !opts[:'fixed_layout'].nil?
  query_params[:'imageResolution'] = opts[:'image_resolution'] if !opts[:'image_resolution'].nil?
  query_params[:'minimalLineWidth'] = opts[:'minimal_line_width'] if !opts[:'minimal_line_width'].nil?
  query_params[:'preventGlyphsGrouping'] = opts[:'prevent_glyphs_grouping'] if !opts[:'prevent_glyphs_grouping'].nil?
  query_params[:'splitCssIntoPages'] = opts[:'split_css_into_pages'] if !opts[:'split_css_into_pages'].nil?
  query_params[:'splitIntoPages'] = opts[:'split_into_pages'] if !opts[:'split_into_pages'].nil?
  query_params[:'useZOrder'] = opts[:'use_z_order'] if !opts[:'use_z_order'].nil?
  query_params[:'antialiasingProcessing'] = opts[:'antialiasing_processing'] if !opts[:'antialiasing_processing'].nil?
  query_params[:'cssClassNamesPrefix'] = opts[:'css_class_names_prefix'] if !opts[:'css_class_names_prefix'].nil?
  query_params[:'explicitListOfSavedPages'] = @api_client.build_collection_param(opts[:'explicit_list_of_saved_pages'], :multi) if !opts[:'explicit_list_of_saved_pages'].nil?
  query_params[:'fontEncodingStrategy'] = opts[:'font_encoding_strategy'] if !opts[:'font_encoding_strategy'].nil?
  query_params[:'fontSavingMode'] = opts[:'font_saving_mode'] if !opts[:'font_saving_mode'].nil?
  query_params[:'htmlMarkupGenerationMode'] = opts[:'html_markup_generation_mode'] if !opts[:'html_markup_generation_mode'].nil?
  query_params[:'lettersPositioningMethod'] = opts[:'letters_positioning_method'] if !opts[:'letters_positioning_method'].nil?
  query_params[:'pagesFlowTypeDependsOnViewersScreenSize'] = opts[:'pages_flow_type_depends_on_viewers_screen_size'] if !opts[:'pages_flow_type_depends_on_viewers_screen_size'].nil?
  query_params[:'partsEmbeddingMode'] = opts[:'parts_embedding_mode'] if !opts[:'parts_embedding_mode'].nil?
  query_params[:'rasterImagesSavingMode'] = opts[:'raster_images_saving_mode'] if !opts[:'raster_images_saving_mode'].nil?
  query_params[:'removeEmptyAreasOnTopAndBottom'] = opts[:'remove_empty_areas_on_top_and_bottom'] if !opts[:'remove_empty_areas_on_top_and_bottom'].nil?
  query_params[:'saveShadowedTextsAsTransparentTexts'] = opts[:'save_shadowed_texts_as_transparent_texts'] if !opts[:'save_shadowed_texts_as_transparent_texts'].nil?
  query_params[:'saveTransparentTexts'] = opts[:'save_transparent_texts'] if !opts[:'save_transparent_texts'].nil?
  query_params[:'specialFolderForAllImages'] = opts[:'special_folder_for_all_images'] if !opts[:'special_folder_for_all_images'].nil?
  query_params[:'specialFolderForSvgImages'] = opts[:'special_folder_for_svg_images'] if !opts[:'special_folder_for_svg_images'].nil?
  query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'flowLayoutParagraphFullWidth'] = opts[:'flow_layout_paragraph_full_width'] if !opts[:'flow_layout_paragraph_full_width'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_mobi_xml(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to MOBIXML format and returns resulting ZIP archive file in response content.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11393
def get_pdf_in_storage_to_mobi_xml(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to MOBIXML format and returns resulting ZIP archive file in response content.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11413
def get_pdf_in_storage_to_mobi_xml_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_mobi_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_mobi_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/mobixml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_mobi_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_pdf_a(name, type, opts = {}) click to toggle source

Converts PDF document (located on storage) to PdfA format and returns resulting file in response content

@param name The document name. @param type Type of PdfA format. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11467
def get_pdf_in_storage_to_pdf_a(name, type, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts = {}) click to toggle source

Converts PDF document (located on storage) to PdfA format and returns resulting file in response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11489
def get_pdf_in_storage_to_pdf_a_with_http_info(name, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pdf_a ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pdf_a"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.get_pdf_in_storage_to_pdf_a"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
    fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'type'] = type
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_pptx(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to PPTX format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11554
def get_pdf_in_storage_to_pptx(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_pptx_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_pptx_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to PPTX format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11577
def get_pdf_in_storage_to_pptx_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_pptx ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_pptx"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/pptx".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'separateImages'] = opts[:'separate_images'] if !opts[:'separate_images'].nil?
  query_params[:'slidesAsImages'] = opts[:'slides_as_images'] if !opts[:'slides_as_images'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_svg(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to SVG format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11634
def get_pdf_in_storage_to_svg(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_svg_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_svg_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to SVG format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :compress_output_to_zip_archive Specifies whether output will be created as one zip-archive. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11656
def get_pdf_in_storage_to_svg_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_svg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_svg"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/svg".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'compressOutputToZipArchive'] = opts[:'compress_output_to_zip_archive'] if !opts[:'compress_output_to_zip_archive'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_te_x(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to TeX format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11710
def get_pdf_in_storage_to_te_x(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_te_x_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_te_x_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_te_x_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to TeX format and returns resulting file in response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11730
def get_pdf_in_storage_to_te_x_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_te_x ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_te_x"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/tex".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_te_x\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_text(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to Text format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11782
def get_pdf_in_storage_to_text(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_text_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_text_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_text_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to Text format and returns resulting file in response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11802
def get_pdf_in_storage_to_text_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_text ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_text"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_tiff(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to TIFF format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11869
def get_pdf_in_storage_to_tiff(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_tiff_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_tiff_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to TIFF format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11904
def get_pdf_in_storage_to_tiff_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_tiff"
  end
  if @api_client.config.client_side_validation && opts[:'compression'] && !['LZW', 'CCITT4', 'CCITT3', 'RLE', 'None'].include?(opts[:'compression'])
    fail ArgumentError, 'invalid value for "compression", must be one of LZW, CCITT4, CCITT3, RLE, None'
  end
  if @api_client.config.client_side_validation && opts[:'color_depth'] && !['Default', 'Format8bpp', 'Format4bpp', 'Format1bpp'].include?(opts[:'color_depth'])
    fail ArgumentError, 'invalid value for "color_depth", must be one of Default, Format8bpp, Format4bpp, Format1bpp'
  end
  if @api_client.config.client_side_validation && opts[:'orientation'] && !['None', 'Landscape', 'Portrait'].include?(opts[:'orientation'])
    fail ArgumentError, 'invalid value for "orientation", must be one of None, Landscape, Portrait'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/tiff".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'brightness'] = opts[:'brightness'] if !opts[:'brightness'].nil?
  query_params[:'compression'] = opts[:'compression'] if !opts[:'compression'].nil?
  query_params[:'colorDepth'] = opts[:'color_depth'] if !opts[:'color_depth'].nil?
  query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
  query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
  query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
  query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
  query_params[:'orientation'] = opts[:'orientation'] if !opts[:'orientation'].nil?
  query_params[:'skipBlankPages'] = opts[:'skip_blank_pages'] if !opts[:'skip_blank_pages'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil?
  query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].nil?
  query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_xls(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLS format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 11985
def get_pdf_in_storage_to_xls(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_xls_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_xls_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLS format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12010
def get_pdf_in_storage_to_xls_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xls ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xls"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xls".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_xlsx(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLSX format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12072
def get_pdf_in_storage_to_xlsx(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_xlsx_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_xlsx_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_xlsx_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLSX format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12097
def get_pdf_in_storage_to_xlsx_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xlsx ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xlsx"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xlsx".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_xml(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XML format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12154
def get_pdf_in_storage_to_xml(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_xml_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_xml_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XML format and returns resulting file in response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12174
def get_pdf_in_storage_to_xml_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pdf_in_storage_to_xps(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XPS format and returns resulting file in response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12226
def get_pdf_in_storage_to_xps(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_pdf_in_storage_to_xps_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_pdf_in_storage_to_xps_with_http_info(name, opts = {}) click to toggle source

Converts PDF document (located on storage) to XPS format and returns resulting file in response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12246
def get_pdf_in_storage_to_xps_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_pdf_in_storage_to_xps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_pdf_in_storage_to_xps"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_pdf_in_storage_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_poly_line_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page polyline annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolyLineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12299
def get_poly_line_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_poly_line_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_poly_line_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_poly_line_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page polyline annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12320
def get_poly_line_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_poly_line_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_poly_line_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_poly_line_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polyline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolyLineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_poly_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_polygon_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page polygon annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolygonAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12377
def get_polygon_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_polygon_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_polygon_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_polygon_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page polygon annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12398
def get_polygon_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_polygon_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_polygon_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_polygon_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polygon/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolygonAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_polygon_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_popup_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page popup annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PopupAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12455
def get_popup_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_popup_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_popup_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_popup_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page popup annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12476
def get_popup_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_popup_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_popup_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_popup_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/popup/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PopupAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_popup_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_ps_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert PS file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.ps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12531
def get_ps_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_ps_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_ps_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert PS file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.ps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12550
def get_ps_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_ps_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_ps_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/ps"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_ps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_radio_button_field(name, field_name, opts = {}) click to toggle source

Read document RadioButton field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RadioButtonFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12603
def get_radio_button_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_radio_button_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_radio_button_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_radio_button_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document RadioButton field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12624
def get_radio_button_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_radio_button_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_radio_button_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_radio_button_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/radiobutton/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RadioButtonFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_radio_button_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_redaction_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page redaction annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RedactionAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12681
def get_redaction_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_redaction_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_redaction_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_redaction_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page redaction annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12702
def get_redaction_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_redaction_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_redaction_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_redaction_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/redaction/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RedactionAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_redaction_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_screen_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page screen annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ScreenAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12759
def get_screen_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_screen_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_screen_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_screen_annotation_data(name, annotation_id, opts = {}) click to toggle source

Read document page screen annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12837
def get_screen_annotation_data(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_screen_annotation_data_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_screen_annotation_data_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_screen_annotation_data_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page screen annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12858
def get_screen_annotation_data_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_screen_annotation_data ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_screen_annotation_data"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_screen_annotation_data"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/screen/{annotationId}/data".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_screen_annotation_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_screen_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page screen annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12780
def get_screen_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_screen_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_screen_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_screen_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/screen/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScreenAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_screen_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_signature_field(name, field_name, opts = {}) click to toggle source

Read document signature field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SignatureFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12915
def get_signature_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_signature_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_signature_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_signature_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document signature field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12936
def get_signature_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_signature_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_signature_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_signature_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/signature/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SignatureFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_signature_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sound_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page sound annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SoundAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 12993
def get_sound_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_sound_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_sound_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_sound_annotation_data(name, annotation_id, opts = {}) click to toggle source

Read document page sound annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13071
def get_sound_annotation_data(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_sound_annotation_data_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_sound_annotation_data_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_sound_annotation_data_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page sound annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13092
def get_sound_annotation_data_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_sound_annotation_data ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_sound_annotation_data"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_sound_annotation_data"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/sound/{annotationId}/data".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_sound_annotation_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sound_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page sound annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13014
def get_sound_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_sound_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_sound_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_sound_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/sound/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SoundAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_sound_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_square_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page square annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquareAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13149
def get_square_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_square_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_square_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_square_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page square annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13170
def get_square_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_square_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_square_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_square_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/square/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquareAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_square_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_squiggly_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page squiggly annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquigglyAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13227
def get_squiggly_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_squiggly_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_squiggly_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_squiggly_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page squiggly annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13248
def get_squiggly_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_squiggly_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_squiggly_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_squiggly_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/squiggly/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquigglyAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_squiggly_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stamp_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page stamp annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StampAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13305
def get_stamp_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_stamp_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_stamp_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_stamp_annotation_data(name, annotation_id, opts = {}) click to toggle source

Read document page stamp annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13383
def get_stamp_annotation_data(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_stamp_annotation_data_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_stamp_annotation_data_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_stamp_annotation_data_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page stamp annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13404
def get_stamp_annotation_data_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_stamp_annotation_data ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_stamp_annotation_data"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_stamp_annotation_data"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/stamp/{annotationId}/data".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_stamp_annotation_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stamp_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page stamp annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13326
def get_stamp_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_stamp_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_stamp_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_stamp_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/stamp/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_stamp_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_strike_out_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page StrikeOut annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StrikeOutAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13461
def get_strike_out_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_strike_out_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_strike_out_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_strike_out_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page StrikeOut annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13482
def get_strike_out_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_strike_out_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_strike_out_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_strike_out_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/strikeout/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StrikeOutAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_strike_out_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_svg_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert SVG file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.svg) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :adjust_page_size Adjust page size @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13545
def get_svg_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_svg_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_svg_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert SVG file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.svg) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :adjust_page_size Adjust page size @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13572
def get_svg_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_svg_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_svg_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/svg"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'adjustPageSize'] = opts[:'adjust_page_size'] if !opts[:'adjust_page_size'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_svg_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_table(name, table_id, opts = {}) click to toggle source

Read document page table by ID.

@param name The document name. @param table_id The table ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TableRecognizedResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13633
def get_table(name, table_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_table_with_http_info(name, table_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_table_with_http_info(name, table_id, opts)
    else
      raise
    end
  return data
end
get_table_with_http_info(name, table_id, opts = {}) click to toggle source

Read document page table by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13654
def get_table_with_http_info(name, table_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_table ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_table"
  end
  # verify the required parameter 'table_id' is set
  if @api_client.config.client_side_validation && table_id.nil?
    fail ArgumentError, "Missing the required parameter 'table_id' when calling PdfApi.get_table"
  end
  # resource path
  local_var_path = "/pdf/{name}/tables/{tableId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'tableId' + '}', table_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TableRecognizedResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_te_x_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert TeX file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.tex) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13709
def get_te_x_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_te_x_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_te_x_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_te_x_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert TeX file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.tex) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13728
def get_te_x_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_te_x_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_te_x_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/tex"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_text(name, llx, lly, urx, ury, opts = {}) click to toggle source

Read document text.

@param name The document name. @param llx X-coordinate of lower - left corner. @param lly Y - coordinate of lower-left corner. @param urx X - coordinate of upper-right corner. @param ury Y - coordinate of upper-right corner. @param [Hash] opts the optional parameters @option opts [Array<String>] :format List of formats for search. @option opts [String] :regex Formats are specified as a regular expression. @option opts [BOOLEAN] :split_rects Split result fragments (default is true). (default to true) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [TextRectsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13787
def get_text(name, llx, lly, urx, ury, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_text_with_http_info(name, llx, lly, urx, ury, opts)
    else
      raise
    end
  return data
end
get_text_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page text annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13890
def get_text_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_text_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_text_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page text annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13911
def get_text_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_text_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_text_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/text/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_text_box_field(name, field_name, opts = {}) click to toggle source

Read document text box field by name.

@param name The document name. @param field_name The field name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13968
def get_text_box_field(name, field_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_text_box_field_with_http_info(name, field_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_text_box_field_with_http_info(name, field_name, opts)
    else
      raise
    end
  return data
end
get_text_box_field_with_http_info(name, field_name, opts = {}) click to toggle source

Read document text box field by name.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13989
def get_text_box_field_with_http_info(name, field_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_text_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.get_text_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/textbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_text_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_text_with_http_info(name, llx, lly, urx, ury, opts = {}) click to toggle source

Read document text.

@param name The document name. @param llx X-coordinate of lower - left corner. @param lly Y - coordinate of lower-left corner. @param urx X - coordinate of upper-right corner. @param ury Y - coordinate of upper-right corner. @param [Hash] opts the optional parameters @option opts [Array<String>] :format List of formats for search. @option opts [String] :regex Formats are specified as a regular expression. @option opts [BOOLEAN] :split_rects Split result fragments (default is true). @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(TextRectsResponse, Fixnum, Hash)>] TextRectsResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 13814
def get_text_with_http_info(name, llx, lly, urx, ury, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_text ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_text"
  end
  # verify the required parameter 'llx' is set
  if @api_client.config.client_side_validation && llx.nil?
    fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.get_text"
  end
  # verify the required parameter 'lly' is set
  if @api_client.config.client_side_validation && lly.nil?
    fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.get_text"
  end
  # verify the required parameter 'urx' is set
  if @api_client.config.client_side_validation && urx.nil?
    fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.get_text"
  end
  # verify the required parameter 'ury' is set
  if @api_client.config.client_side_validation && ury.nil?
    fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.get_text"
  end
  # resource path
  local_var_path = "/pdf/{name}/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'LLX'] = llx
  query_params[:'LLY'] = lly
  query_params[:'URX'] = urx
  query_params[:'URY'] = ury
  query_params[:'format'] = @api_client.build_collection_param(opts[:'format'], :multi) if !opts[:'format'].nil?
  query_params[:'regex'] = opts[:'regex'] if !opts[:'regex'].nil?
  query_params[:'splitRects'] = opts[:'split_rects'] if !opts[:'split_rects'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextRectsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_underline_annotation(name, annotation_id, opts = {}) click to toggle source

Read document page underline annotation by ID.

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [UnderlineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14046
def get_underline_annotation(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_underline_annotation_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_underline_annotation_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
get_underline_annotation_with_http_info(name, annotation_id, opts = {}) click to toggle source

Read document page underline annotation by ID.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14067
def get_underline_annotation_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_underline_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_underline_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.get_underline_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/underline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UnderlineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_underline_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_verify_signature(name, sign_name, opts = {}) click to toggle source

Verify signature document.

@param name The document name. @param sign_name Sign name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SignatureVerifyResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14124
def get_verify_signature(name, sign_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_verify_signature_with_http_info(name, sign_name, opts)
    else
      raise
    end
  return data
end
get_verify_signature_with_http_info(name, sign_name, opts = {}) click to toggle source

Verify signature document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14145
def get_verify_signature_with_http_info(name, sign_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_verify_signature ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_verify_signature"
  end
  # verify the required parameter 'sign_name' is set
  if @api_client.config.client_side_validation && sign_name.nil?
    fail ArgumentError, "Missing the required parameter 'sign_name' when calling PdfApi.get_verify_signature"
  end
  # resource path
  local_var_path = "/pdf/{name}/verifySignature".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'signName'] = sign_name
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SignatureVerifyResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_verify_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_web_in_storage_to_pdf(url, opts = {}) click to toggle source

Convert web page to PDF format and return resulting file in response.

@param url Source url @param [Hash] opts the optional parameters @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14208
def get_web_in_storage_to_pdf(url, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_web_in_storage_to_pdf_with_http_info(url, opts)
    else
      raise
    end
  return data
end
get_web_in_storage_to_pdf_with_http_info(url, opts = {}) click to toggle source

Convert web page to PDF format and return resulting file in response.

@param url Source url @param [Hash] opts the optional parameters @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14234
def get_web_in_storage_to_pdf_with_http_info(url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_web_in_storage_to_pdf ..."
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling PdfApi.get_web_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/web"

  # query parameters
  query_params = {}
  query_params[:'url'] = url
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_web_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_words_per_page(name, opts = {}) click to toggle source

Get number of words per document page.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [WordCountResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14293
def get_words_per_page(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_words_per_page_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_words_per_page_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_words_per_page_with_http_info(name, opts = {}) click to toggle source

Get number of words per document page.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14313
def get_words_per_page_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_words_per_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_words_per_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/wordCount".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WordCountResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_words_per_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xfa_pdf_in_storage_to_acro_form(name, opts = {}) click to toggle source

Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and returns resulting file response content

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14365
def get_xfa_pdf_in_storage_to_acro_form(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts = {}) click to toggle source

Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and returns resulting file response content

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14385
def get_xfa_pdf_in_storage_to_acro_form_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xfa_pdf_in_storage_to_acro_form ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_xfa_pdf_in_storage_to_acro_form"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xfatoacroform".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xfa_pdf_in_storage_to_acro_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xml_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert XML file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14437
def get_xml_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xml_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_xml_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert XML file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14457
def get_xml_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xml_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xml_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/xml"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'xslFilePath'] = opts[:'xsl_file_path'] if !opts[:'xsl_file_path'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xml_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xmp_metadata_json(name, opts = {}) click to toggle source

Gets document XMP Metadata as JSON.

@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. @option opts [String] :pass_base64 The password (Base64). @return [XmpMetadata]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14511
def get_xmp_metadata_json(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xmp_metadata_json_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xmp_metadata_json_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_xmp_metadata_json_with_http_info(name, opts = {}) click to toggle source

Gets document XMP Metadata as JSON.

@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. @option opts [String] :pass_base64 The password (Base64). @return [Array<(XmpMetadata, Fixnum, Hash)>] XmpMetadata data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14532
def get_xmp_metadata_json_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xmp_metadata_json ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_xmp_metadata_json"
  end
  # resource path
  local_var_path = "/pdf/{name}/xmpmetadata/json".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?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XmpMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xmp_metadata_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xmp_metadata_xml(name, opts = {}) click to toggle source

Gets document XMP Metadata as XML file.

@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. @option opts [String] :pass_base64 The password (Base64). @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14586
def get_xmp_metadata_xml(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xmp_metadata_xml_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xmp_metadata_xml_with_http_info(name, opts)
    else
      raise
    end
  return data
end
get_xmp_metadata_xml_with_http_info(name, opts = {}) click to toggle source

Gets document XMP Metadata as XML file.

@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. @option opts [String] :pass_base64 The password (Base64). @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14607
def get_xmp_metadata_xml_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xmp_metadata_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.get_xmp_metadata_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/xmpmetadata/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xmp_metadata_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xps_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert XPS file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14659
def get_xps_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xps_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_xps_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert XPS file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14678
def get_xps_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xps_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xps_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/xps"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_xsl_fo_in_storage_to_pdf(src_path, opts = {}) click to toggle source

Convert XslFo file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xslfo) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14729
def get_xsl_fo_in_storage_to_pdf(src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts)
    else
      raise
    end
  return data
end
get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts = {}) click to toggle source

Convert XslFo file (located on storage) to PDF format and return resulting file in response.

@param src_path Full source filename (ex. /folder1/folder2/template.xslfo) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14748
def get_xsl_fo_in_storage_to_pdf_with_http_info(src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.get_xsl_fo_in_storage_to_pdf ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.get_xsl_fo_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/create/xslfo"

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#get_xsl_fo_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
move_file(src_path, dest_path, opts = {}) click to toggle source

Move file

@param src_path Source file path e.g. &#39;/src.ext&#39; @param dest_path Destination file path e.g. &#39;/dest.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to move @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14802
def move_file(src_path, dest_path, opts = {})
  @api_client.request_token_if_needed
  move_file_with_http_info(src_path, dest_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      move_file_with_http_info(src_path, dest_path, opts)
    else
      raise
    end
  return nil
end
move_file_with_http_info(src_path, dest_path, opts = {}) click to toggle source

Move file

@param src_path Source file path e.g. &#39;/src.ext&#39; @param dest_path Destination file path e.g. &#39;/dest.ext&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @option opts [String] :version_id File version ID to move @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14824
def move_file_with_http_info(src_path, dest_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.move_file ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.move_file"
  end
  # verify the required parameter 'dest_path' is set
  if @api_client.config.client_side_validation && dest_path.nil?
    fail ArgumentError, "Missing the required parameter 'dest_path' when calling PdfApi.move_file"
  end
  # resource path
  local_var_path = "/pdf/storage/file/move/{srcPath}".sub('{' + 'srcPath' + '}', src_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'destPath'] = dest_path
  query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
  query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?
  query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
move_folder(src_path, dest_path, opts = {}) click to toggle source

Move folder

@param src_path Folder path to move e.g. &#39;/folder&#39; @param dest_path Destination folder path to move to e.g &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [nil]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14882
def move_folder(src_path, dest_path, opts = {})
  @api_client.request_token_if_needed
  move_folder_with_http_info(src_path, dest_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      move_folder_with_http_info(src_path, dest_path, opts)
    else
      raise
    end
  return nil
end
move_folder_with_http_info(src_path, dest_path, opts = {}) click to toggle source

Move folder

@param src_path Folder path to move e.g. &#39;/folder&#39; @param dest_path Destination folder path to move to e.g &#39;/dst&#39; @param [Hash] opts the optional parameters @option opts [String] :src_storage_name Source storage name @option opts [String] :dest_storage_name Destination storage name @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14903
def move_folder_with_http_info(src_path, dest_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.move_folder ..."
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.move_folder"
  end
  # verify the required parameter 'dest_path' is set
  if @api_client.config.client_side_validation && dest_path.nil?
    fail ArgumentError, "Missing the required parameter 'dest_path' when calling PdfApi.move_folder"
  end
  # resource path
  local_var_path = "/pdf/storage/folder/move/{srcPath}".sub('{' + 'srcPath' + '}', src_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'destPath'] = dest_path
  query_params[:'srcStorageName'] = opts[:'src_storage_name'] if !opts[:'src_storage_name'].nil?
  query_params[:'destStorageName'] = opts[:'dest_storage_name'] if !opts[:'dest_storage_name'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#move_folder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
object_exists(path, opts = {}) click to toggle source

Check if file or folder exists

@param path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID @return [ObjectExist]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14959
def object_exists(path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = object_exists_with_http_info(path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = object_exists_with_http_info(path, opts)
    else
      raise
    end
  return data
end
object_exists_with_http_info(path, opts = {}) click to toggle source

Check if file or folder exists

@param path File or folder path e.g. &#39;/file.ext&#39; or &#39;/folder&#39; @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @option opts [String] :version_id File version ID @return [Array<(ObjectExist, Fixnum, Hash)>] ObjectExist data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 14979
def object_exists_with_http_info(path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.object_exists ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.object_exists"
  end
  # resource path
  local_var_path = "/pdf/storage/exist/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].nil?
  query_params[:'versionId'] = opts[:'version_id'] if !opts[:'version_id'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ObjectExist')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#object_exists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_add_document_attachment(name, attachment_info, opts = {}) click to toggle source

Adds a file attachment to the PDF document.

@param name The document name. @param attachment_info AttachmentInfoAttachmentInfo instance. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AttachmentsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15032
def post_add_document_attachment(name, attachment_info, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_add_document_attachment_with_http_info(name, attachment_info, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_add_document_attachment_with_http_info(name, attachment_info, opts)
    else
      raise
    end
  return data
end
post_add_document_attachment_with_http_info(name, attachment_info, opts = {}) click to toggle source

Adds a file attachment to the PDF document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15053
def post_add_document_attachment_with_http_info(name, attachment_info, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_add_document_attachment ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_add_document_attachment"
  end
  # verify the required parameter 'attachment_info' is set
  if @api_client.config.client_side_validation && attachment_info.nil?
    fail ArgumentError, "Missing the required parameter 'attachment_info' when calling PdfApi.post_add_document_attachment"
  end
  # resource path
  local_var_path = "/pdf/{name}/attachments".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(attachment_info)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AttachmentsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_add_document_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_append_document(name, append_file, opts = {}) click to toggle source

Append document to existing one.

@param name The original document name. @param append_file Append file server path. @param [Hash] opts the optional parameters @option opts [Integer] :start_page Appending start page. (default to 0) @option opts [Integer] :end_page Appending end page. (default to 0) @option opts [String] :storage The documents storage. @option opts [String] :folder The original document folder. @return [DocumentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15111
def post_append_document(name, append_file, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_append_document_with_http_info(name, append_file, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_append_document_with_http_info(name, append_file, opts)
    else
      raise
    end
  return data
end
post_append_document_with_http_info(name, append_file, opts = {}) click to toggle source

Append document to existing one.

@param name The original document name. @param append_file Append file server path. @param [Hash] opts the optional parameters @option opts [Integer] :start_page Appending start page. @option opts [Integer] :end_page Appending end page. @option opts [String] :storage The documents storage. @option opts [String] :folder The original document folder. @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15134
def post_append_document_with_http_info(name, append_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_append_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_append_document"
  end
  # verify the required parameter 'append_file' is set
  if @api_client.config.client_side_validation && append_file.nil?
    fail ArgumentError, "Missing the required parameter 'append_file' when calling PdfApi.post_append_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/appendDocument".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'appendFile'] = append_file
  query_params[:'startPage'] = opts[:'start_page'] if !opts[:'start_page'].nil?
  query_params[:'endPage'] = opts[:'end_page'] if !opts[:'end_page'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_append_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_bookmark(name, bookmark_path, bookmarks, opts = {}) click to toggle source

Add document bookmarks.

@param name The document name. @param bookmark_path The parent bookmark path. Specify an empty string when adding a bookmark to the root. @param bookmarks The array of bookmark. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [BookmarksResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15196
def post_bookmark(name, bookmark_path, bookmarks, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_bookmark_with_http_info(name, bookmark_path, bookmarks, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_bookmark_with_http_info(name, bookmark_path, bookmarks, opts)
    else
      raise
    end
  return data
end
post_bookmark_with_http_info(name, bookmark_path, bookmarks, opts = {}) click to toggle source

Add document bookmarks.

@param name The document name. @param bookmark_path The parent bookmark path. Specify an empty string when adding a bookmark to the root. @param bookmarks The array of bookmark. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(BookmarksResponse, Fixnum, Hash)>] BookmarksResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15219
def post_bookmark_with_http_info(name, bookmark_path, bookmarks, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_bookmark ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_bookmark"
  end
  # verify the required parameter 'bookmark_path' is set
  if @api_client.config.client_side_validation && bookmark_path.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark_path' when calling PdfApi.post_bookmark"
  end
  # verify the required parameter 'bookmarks' is set
  if @api_client.config.client_side_validation && bookmarks.nil?
    fail ArgumentError, "Missing the required parameter 'bookmarks' when calling PdfApi.post_bookmark"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/bookmark/{bookmarkPath}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkPath' + '}', bookmark_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(bookmarks)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BookmarksResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_bookmark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_change_password_document_in_storage(name, owner_password, new_user_password, new_owner_password, opts = {}) click to toggle source

Change document password in storage.

@param name Document name. @param owner_password Owner password (encrypted Base64). @param new_user_password New user password (encrypted Base64). @param new_owner_password New owner password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15282
def post_change_password_document_in_storage(name, owner_password, new_user_password, new_owner_password, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_change_password_document_in_storage_with_http_info(name, owner_password, new_user_password, new_owner_password, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_change_password_document_in_storage_with_http_info(name, owner_password, new_user_password, new_owner_password, opts)
    else
      raise
    end
  return data
end
post_change_password_document_in_storage_with_http_info(name, owner_password, new_user_password, new_owner_password, opts = {}) click to toggle source

Change document password in storage.

@param name Document name. @param owner_password Owner password (encrypted Base64). @param new_user_password New user password (encrypted Base64). @param new_owner_password New owner password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15305
def post_change_password_document_in_storage_with_http_info(name, owner_password, new_user_password, new_owner_password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_change_password_document_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_change_password_document_in_storage"
  end
  # verify the required parameter 'owner_password' is set
  if @api_client.config.client_side_validation && owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'owner_password' when calling PdfApi.post_change_password_document_in_storage"
  end
  # verify the required parameter 'new_user_password' is set
  if @api_client.config.client_side_validation && new_user_password.nil?
    fail ArgumentError, "Missing the required parameter 'new_user_password' when calling PdfApi.post_change_password_document_in_storage"
  end
  # verify the required parameter 'new_owner_password' is set
  if @api_client.config.client_side_validation && new_owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'new_owner_password' when calling PdfApi.post_change_password_document_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/changepassword".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'ownerPassword'] = owner_password
  query_params[:'newUserPassword'] = new_user_password
  query_params[:'newOwnerPassword'] = new_owner_password
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_change_password_document_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_check_box_fields(name, fields, opts = {}) click to toggle source

Add document checkbox fields.

@param name The document name. @param fields The array of field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15373
def post_check_box_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_check_box_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_check_box_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
post_check_box_fields_with_http_info(name, fields, opts = {}) click to toggle source

Add document checkbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15394
def post_check_box_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_check_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_check_box_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.post_check_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/checkbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_check_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_combo_box_fields(name, fields, opts = {}) click to toggle source

Add document combobox fields.

@param name The document name. @param fields The array of field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15450
def post_combo_box_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_combo_box_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_combo_box_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
post_combo_box_fields_with_http_info(name, fields, opts = {}) click to toggle source

Add document combobox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15471
def post_combo_box_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_combo_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_combo_box_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.post_combo_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/combobox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_combo_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_create_document(name, document_config, opts = {}) click to toggle source

Create empty document.

@param name The new document name. @param document_config The document config for new document. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The new document folder. @return [DocumentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15527
def post_create_document(name, document_config, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_create_document_with_http_info(name, document_config, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_create_document_with_http_info(name, document_config, opts)
    else
      raise
    end
  return data
end
post_create_document_with_http_info(name, document_config, opts = {}) click to toggle source

Create empty document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15548
def post_create_document_with_http_info(name, document_config, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_create_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_create_document"
  end
  # verify the required parameter 'document_config' is set
  if @api_client.config.client_side_validation && document_config.nil?
    fail ArgumentError, "Missing the required parameter 'document_config' when calling PdfApi.post_create_document"
  end
  # resource path
  local_var_path = "/pdf/{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(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(document_config)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_create_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_create_field(name, page, field, opts = {}) click to toggle source

Create field.

@param name The document name. @param page Document page number. @param field Field with the field data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15605
def post_create_field(name, page, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_create_field_with_http_info(name, page, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_create_field_with_http_info(name, page, field, opts)
    else
      raise
    end
  return data
end
post_create_field_with_http_info(name, page, field, opts = {}) click to toggle source

Create field.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15627
def post_create_field_with_http_info(name, page, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_create_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_create_field"
  end
  # verify the required parameter 'page' is set
  if @api_client.config.client_side_validation && page.nil?
    fail ArgumentError, "Missing the required parameter 'page' when calling PdfApi.post_create_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.post_create_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'page'] = page
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_create_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_decrypt_document_in_storage(name, password, opts = {}) click to toggle source

Decrypt document in storage.

@param name Document name. @param password The password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15688
def post_decrypt_document_in_storage(name, password, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_decrypt_document_in_storage_with_http_info(name, password, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_decrypt_document_in_storage_with_http_info(name, password, opts)
    else
      raise
    end
  return data
end
post_decrypt_document_in_storage_with_http_info(name, password, opts = {}) click to toggle source

Decrypt document in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15709
def post_decrypt_document_in_storage_with_http_info(name, password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_decrypt_document_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_decrypt_document_in_storage"
  end
  # verify the required parameter 'password' is set
  if @api_client.config.client_side_validation && password.nil?
    fail ArgumentError, "Missing the required parameter 'password' when calling PdfApi.post_decrypt_document_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/decrypt".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'password'] = password
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_decrypt_document_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_image_footer(name, image_footer, opts = {}) click to toggle source

Add document image footer.

@param name The document name. @param image_footer The image footer. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15769
def post_document_image_footer(name, image_footer, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_image_footer_with_http_info(name, image_footer, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_image_footer_with_http_info(name, image_footer, opts)
    else
      raise
    end
  return data
end
post_document_image_footer_with_http_info(name, image_footer, opts = {}) click to toggle source

Add document image footer.

@param name The document name. @param image_footer The image footer. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15792
def post_document_image_footer_with_http_info(name, image_footer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_image_footer ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_image_footer"
  end
  # verify the required parameter 'image_footer' is set
  if @api_client.config.client_side_validation && image_footer.nil?
    fail ArgumentError, "Missing the required parameter 'image_footer' when calling PdfApi.post_document_image_footer"
  end
  # resource path
  local_var_path = "/pdf/{name}/footer/image".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPageNumber'] = opts[:'start_page_number'] if !opts[:'start_page_number'].nil?
  query_params[:'endPageNumber'] = opts[:'end_page_number'] if !opts[:'end_page_number'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(image_footer)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_image_footer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_image_header(name, image_header, opts = {}) click to toggle source

Add document image header.

@param name The document name. @param image_header The image header. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15852
def post_document_image_header(name, image_header, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_image_header_with_http_info(name, image_header, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_image_header_with_http_info(name, image_header, opts)
    else
      raise
    end
  return data
end
post_document_image_header_with_http_info(name, image_header, opts = {}) click to toggle source

Add document image header.

@param name The document name. @param image_header The image header. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15875
def post_document_image_header_with_http_info(name, image_header, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_image_header ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_image_header"
  end
  # verify the required parameter 'image_header' is set
  if @api_client.config.client_side_validation && image_header.nil?
    fail ArgumentError, "Missing the required parameter 'image_header' when calling PdfApi.post_document_image_header"
  end
  # resource path
  local_var_path = "/pdf/{name}/header/image".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPageNumber'] = opts[:'start_page_number'] if !opts[:'start_page_number'].nil?
  query_params[:'endPageNumber'] = opts[:'end_page_number'] if !opts[:'end_page_number'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(image_header)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_image_header\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_image_stamps(name, stamps, opts = {}) click to toggle source

Add document pages image stamps.

@param name The document name. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15934
def post_document_image_stamps(name, stamps, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_image_stamps_with_http_info(name, stamps, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_image_stamps_with_http_info(name, stamps, opts)
    else
      raise
    end
  return data
end
post_document_image_stamps_with_http_info(name, stamps, opts = {}) click to toggle source

Add document pages image stamps.

@param name The document name. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 15956
def post_document_image_stamps_with_http_info(name, stamps, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_image_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_image_stamps"
  end
  # verify the required parameter 'stamps' is set
  if @api_client.config.client_side_validation && stamps.nil?
    fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_document_image_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps/image".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamps)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_image_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_page_number_stamps(name, stamp, opts = {}) click to toggle source

Add document page number stamps.

@param name The document name. @param stamp The stamp. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16016
def post_document_page_number_stamps(name, stamp, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_page_number_stamps_with_http_info(name, stamp, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_page_number_stamps_with_http_info(name, stamp, opts)
    else
      raise
    end
  return data
end
post_document_page_number_stamps_with_http_info(name, stamp, opts = {}) click to toggle source

Add document page number stamps.

@param name The document name. @param stamp The stamp. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16040
def post_document_page_number_stamps_with_http_info(name, stamp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_page_number_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_page_number_stamps"
  end
  # verify the required parameter 'stamp' is set
  if @api_client.config.client_side_validation && stamp.nil?
    fail ArgumentError, "Missing the required parameter 'stamp' when calling PdfApi.post_document_page_number_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps/pagenumber".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPageNumber'] = opts[:'start_page_number'] if !opts[:'start_page_number'].nil?
  query_params[:'endPageNumber'] = opts[:'end_page_number'] if !opts[:'end_page_number'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamp)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_page_number_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_text_footer(name, text_footer, opts = {}) click to toggle source

Add document text footer.

@param name The document name. @param text_footer The text footer. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16101
def post_document_text_footer(name, text_footer, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_text_footer_with_http_info(name, text_footer, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_text_footer_with_http_info(name, text_footer, opts)
    else
      raise
    end
  return data
end
post_document_text_footer_with_http_info(name, text_footer, opts = {}) click to toggle source

Add document text footer.

@param name The document name. @param text_footer The text footer. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16124
def post_document_text_footer_with_http_info(name, text_footer, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_footer ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_footer"
  end
  # verify the required parameter 'text_footer' is set
  if @api_client.config.client_side_validation && text_footer.nil?
    fail ArgumentError, "Missing the required parameter 'text_footer' when calling PdfApi.post_document_text_footer"
  end
  # resource path
  local_var_path = "/pdf/{name}/footer/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPageNumber'] = opts[:'start_page_number'] if !opts[:'start_page_number'].nil?
  query_params[:'endPageNumber'] = opts[:'end_page_number'] if !opts[:'end_page_number'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(text_footer)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_text_footer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_text_header(name, text_header, opts = {}) click to toggle source

Add document text header.

@param name The document name. @param text_header The text header. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16184
def post_document_text_header(name, text_header, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_text_header_with_http_info(name, text_header, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_text_header_with_http_info(name, text_header, opts)
    else
      raise
    end
  return data
end
post_document_text_header_with_http_info(name, text_header, opts = {}) click to toggle source

Add document text header.

@param name The document name. @param text_header The text header. @param [Hash] opts the optional parameters @option opts [Integer] :start_page_number The start page number. @option opts [Integer] :end_page_number The end page number. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16207
def post_document_text_header_with_http_info(name, text_header, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_header ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_header"
  end
  # verify the required parameter 'text_header' is set
  if @api_client.config.client_side_validation && text_header.nil?
    fail ArgumentError, "Missing the required parameter 'text_header' when calling PdfApi.post_document_text_header"
  end
  # resource path
  local_var_path = "/pdf/{name}/header/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPageNumber'] = opts[:'start_page_number'] if !opts[:'start_page_number'].nil?
  query_params[:'endPageNumber'] = opts[:'end_page_number'] if !opts[:'end_page_number'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(text_header)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_text_header\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_text_replace(name, text_replace, opts = {}) click to toggle source

Document’s replace text method.

@param name @param text_replace @param [Hash] opts the optional parameters @option opts [String] :storage @option opts [String] :folder @return [TextReplaceResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16265
def post_document_text_replace(name, text_replace, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_text_replace_with_http_info(name, text_replace, opts)
    else
      raise
    end
  return data
end
post_document_text_replace_with_http_info(name, text_replace, opts = {}) click to toggle source

Document&#39;s replace text method.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16286
def post_document_text_replace_with_http_info(name, text_replace, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_replace ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_replace"
  end
  # verify the required parameter 'text_replace' is set
  if @api_client.config.client_side_validation && text_replace.nil?
    fail ArgumentError, "Missing the required parameter 'text_replace' when calling PdfApi.post_document_text_replace"
  end
  # resource path
  local_var_path = "/pdf/{name}/text/replace".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(text_replace)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextReplaceResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_text_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_document_text_stamps(name, stamps, opts = {}) click to toggle source

Add document pages text stamps.

@param name The document name. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16343
def post_document_text_stamps(name, stamps, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_document_text_stamps_with_http_info(name, stamps, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_document_text_stamps_with_http_info(name, stamps, opts)
    else
      raise
    end
  return data
end
post_document_text_stamps_with_http_info(name, stamps, opts = {}) click to toggle source

Add document pages text stamps.

@param name The document name. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16365
def post_document_text_stamps_with_http_info(name, stamps, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_document_text_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_text_stamps"
  end
  # verify the required parameter 'stamps' is set
  if @api_client.config.client_side_validation && stamps.nil?
    fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_document_text_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/stamps/text".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamps)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_document_text_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_encrypt_document_in_storage(name, user_password, owner_password, crypto_algorithm, opts = {}) click to toggle source

Encrypt document in storage.

@param name Document name. @param user_password User password (encrypted Base64). @param owner_password Owner password (encrypted Base64). @param crypto_algorithm Cryptographic algorithm, see CryptoAlgorithm for details. @param [Hash] opts the optional parameters @option opts [Array<PermissionsFlags>] :permissions_flags Array of document permissions, see PermissionsFlags for details. @option opts [BOOLEAN] :use_pdf20 Support for revision 6 (Extension 8). @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16426
def post_encrypt_document_in_storage(name, user_password, owner_password, crypto_algorithm, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_encrypt_document_in_storage_with_http_info(name, user_password, owner_password, crypto_algorithm, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_encrypt_document_in_storage_with_http_info(name, user_password, owner_password, crypto_algorithm, opts)
    else
      raise
    end
  return data
end
post_encrypt_document_in_storage_with_http_info(name, user_password, owner_password, crypto_algorithm, opts = {}) click to toggle source

Encrypt document in storage.

@param name Document name. @param user_password User password (encrypted Base64). @param owner_password Owner password (encrypted Base64). @param crypto_algorithm Cryptographic algorithm, see CryptoAlgorithm for details. @param [Hash] opts the optional parameters @option opts [Array<PermissionsFlags>] :permissions_flags Array of document permissions, see PermissionsFlags for details. @option opts [BOOLEAN] :use_pdf20 Support for revision 6 (Extension 8). @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16451
def post_encrypt_document_in_storage_with_http_info(name, user_password, owner_password, crypto_algorithm, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_encrypt_document_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_encrypt_document_in_storage"
  end
  # verify the required parameter 'user_password' is set
  if @api_client.config.client_side_validation && user_password.nil?
    fail ArgumentError, "Missing the required parameter 'user_password' when calling PdfApi.post_encrypt_document_in_storage"
  end
  # verify the required parameter 'owner_password' is set
  if @api_client.config.client_side_validation && owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'owner_password' when calling PdfApi.post_encrypt_document_in_storage"
  end
  # verify the required parameter 'crypto_algorithm' is set
  if @api_client.config.client_side_validation && crypto_algorithm.nil?
    fail ArgumentError, "Missing the required parameter 'crypto_algorithm' when calling PdfApi.post_encrypt_document_in_storage"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['RC4x40', 'RC4x128', 'AESx128', 'AESx256'].include?(crypto_algorithm)
    fail ArgumentError, "invalid value for 'crypto_algorithm', must be one of RC4x40, RC4x128, AESx128, AESx256"
  end
  # resource path
  local_var_path = "/pdf/{name}/encrypt".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'userPassword'] = user_password
  query_params[:'ownerPassword'] = owner_password
  query_params[:'cryptoAlgorithm'] = crypto_algorithm
  query_params[:'permissionsFlags'] = @api_client.build_collection_param(opts[:'permissions_flags'], :multi) if !opts[:'permissions_flags'].nil?
  query_params[:'usePdf20'] = opts[:'use_pdf20'] if !opts[:'use_pdf20'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_encrypt_document_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_flatten_document(name, opts = {}) click to toggle source

Flatten the document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :update_appearances If set, all field appearances will be regenerated before flattening. This option may help if field is incorrectly flattened. This option may decrease performance.. @option opts [BOOLEAN] :call_events If set, formatting and other JavaScript events will be called. @option opts [BOOLEAN] :hide_buttons If set, buttons will be removed from flattened document. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16527
def post_flatten_document(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_flatten_document_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_flatten_document_with_http_info(name, opts)
    else
      raise
    end
  return data
end
post_flatten_document_with_http_info(name, opts = {}) click to toggle source

Flatten the document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :update_appearances If set, all field appearances will be regenerated before flattening. This option may help if field is incorrectly flattened. This option may decrease performance.. @option opts [BOOLEAN] :call_events If set, formatting and other JavaScript events will be called. @option opts [BOOLEAN] :hide_buttons If set, buttons will be removed from flattened document. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16550
def post_flatten_document_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_flatten_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_flatten_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/flatten".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAppearances'] = opts[:'update_appearances'] if !opts[:'update_appearances'].nil?
  query_params[:'callEvents'] = opts[:'call_events'] if !opts[:'call_events'].nil?
  query_params[:'hideButtons'] = opts[:'hide_buttons'] if !opts[:'hide_buttons'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_flatten_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_html_to_pdf(opts = {}) click to toggle source

Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.

@param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16610
def post_html_to_pdf(opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_html_to_pdf_with_http_info(opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_html_to_pdf_with_http_info(opts)
    else
      raise
    end
  return data
end
post_html_to_pdf_with_http_info(opts = {}) click to toggle source

Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.

@param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16635
def post_html_to_pdf_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_html_to_pdf ..."
  end
  # resource path
  local_var_path = "/pdf/create/html"

  # query parameters
  query_params = {}
  query_params[:'htmlFileName'] = opts[:'html_file_name'] if !opts[:'html_file_name'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?

  # 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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_html_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_import_fields_from_fdf(name, opts = {}) click to toggle source

Update fields from FDF file in request.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :fdf_data Fdf file. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16690
def post_import_fields_from_fdf(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_import_fields_from_fdf_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_import_fields_from_fdf_with_http_info(name, opts)
    else
      raise
    end
  return data
end
post_import_fields_from_fdf_with_http_info(name, opts = {}) click to toggle source

Update fields from FDF file in request.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16711
def post_import_fields_from_fdf_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_import_fields_from_fdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_import_fields_from_fdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/fdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'fdf_data'] if !opts[:'fdf_data'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_import_fields_from_fdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_import_fields_from_xfdf(name, opts = {}) click to toggle source

Update fields from XFDF file in request.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :xfdf_data Xfdf file. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16766
def post_import_fields_from_xfdf(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_import_fields_from_xfdf_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_import_fields_from_xfdf_with_http_info(name, opts)
    else
      raise
    end
  return data
end
post_import_fields_from_xfdf_with_http_info(name, opts = {}) click to toggle source

Update fields from XFDF file in request.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16787
def post_import_fields_from_xfdf_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_import_fields_from_xfdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_import_fields_from_xfdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xfdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'xfdf_data'] if !opts[:'xfdf_data'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_import_fields_from_xfdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_import_fields_from_xml(name, opts = {}) click to toggle source

Update fields from XML file in request.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :xml_data Xml file. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16842
def post_import_fields_from_xml(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_import_fields_from_xml_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_import_fields_from_xml_with_http_info(name, opts)
    else
      raise
    end
  return data
end
post_import_fields_from_xml_with_http_info(name, opts = {}) click to toggle source

Update fields from XML file in request.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16863
def post_import_fields_from_xml_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_import_fields_from_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_import_fields_from_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'xml_data'] if !opts[:'xml_data'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_import_fields_from_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_insert_image(name, page_number, llx, lly, urx, ury, opts = {}) click to toggle source

Insert image to document page.

@param name The document name. @param page_number The page number. @param llx Coordinate lower left X. @param lly Coordinate lower left Y. @param urx Coordinate upper right X. @param ury Coordinate upper right Y. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16924
def post_insert_image(name, page_number, llx, lly, urx, ury, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts)
    else
      raise
    end
  return data
end
post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts = {}) click to toggle source

Insert image to document page.

@param name The document name. @param page_number The page number. @param llx Coordinate lower left X. @param lly Coordinate lower left Y. @param urx Coordinate upper right X. @param ury Coordinate upper right Y. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 16951
def post_insert_image_with_http_info(name, page_number, llx, lly, urx, ury, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_insert_image ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_insert_image"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_insert_image"
  end
  # verify the required parameter 'llx' is set
  if @api_client.config.client_side_validation && llx.nil?
    fail ArgumentError, "Missing the required parameter 'llx' when calling PdfApi.post_insert_image"
  end
  # verify the required parameter 'lly' is set
  if @api_client.config.client_side_validation && lly.nil?
    fail ArgumentError, "Missing the required parameter 'lly' when calling PdfApi.post_insert_image"
  end
  # verify the required parameter 'urx' is set
  if @api_client.config.client_side_validation && urx.nil?
    fail ArgumentError, "Missing the required parameter 'urx' when calling PdfApi.post_insert_image"
  end
  # verify the required parameter 'ury' is set
  if @api_client.config.client_side_validation && ury.nil?
    fail ArgumentError, "Missing the required parameter 'ury' when calling PdfApi.post_insert_image"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'llx'] = llx
  query_params[:'lly'] = lly
  query_params[:'urx'] = urx
  query_params[:'ury'] = ury
  query_params[:'imageFilePath'] = opts[:'image_file_path'] if !opts[:'image_file_path'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

  # 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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'image'] if !opts[:'image'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_insert_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_list_box_fields(name, fields, opts = {}) click to toggle source

Add document listbox fields.

@param name The document name. @param fields The array of field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17031
def post_list_box_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_list_box_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_list_box_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
post_list_box_fields_with_http_info(name, fields, opts = {}) click to toggle source

Add document listbox fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17052
def post_list_box_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_list_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_list_box_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.post_list_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/listbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_list_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_move_page(name, page_number, new_index, opts = {}) click to toggle source

Move page to new position.

@param name The document name. @param page_number The page number. @param new_index The new page position/index. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17109
def post_move_page(name, page_number, new_index, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_move_page_with_http_info(name, page_number, new_index, opts)
    else
      raise
    end
  return data
end
post_move_page_with_http_info(name, page_number, new_index, opts = {}) click to toggle source

Move page to new position.

@param name The document name. @param page_number The page number. @param new_index The new page position/index. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17131
def post_move_page_with_http_info(name, page_number, new_index, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_move_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_move_page"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_move_page"
  end
  # verify the required parameter 'new_index' is set
  if @api_client.config.client_side_validation && new_index.nil?
    fail ArgumentError, "Missing the required parameter 'new_index' when calling PdfApi.post_move_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/movePage".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'newIndex'] = new_index
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_move_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_optimize_document(name, options, opts = {}) click to toggle source

Optimize document.

@param name The document name. @param options The optimization options. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17193
def post_optimize_document(name, options, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_optimize_document_with_http_info(name, options, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_optimize_document_with_http_info(name, options, opts)
    else
      raise
    end
  return data
end
post_optimize_document_with_http_info(name, options, opts = {}) click to toggle source

Optimize document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17214
def post_optimize_document_with_http_info(name, options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_optimize_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_optimize_document"
  end
  # verify the required parameter 'options' is set
  if @api_client.config.client_side_validation && options.nil?
    fail ArgumentError, "Missing the required parameter 'options' when calling PdfApi.post_optimize_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/optimize".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(options)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_optimize_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_organize_document(name, pages, out_path, opts = {}) click to toggle source

Merge selected pages of a document.

@param name The original document name. @param pages 1-based page numbers of the source document that make up the resulting document. @param out_path Full filename of the resulting document. @param [Hash] opts the optional parameters @option opts [String] :storage The documents storage. @option opts [String] :folder The source document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17271
def post_organize_document(name, pages, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_organize_document_with_http_info(name, pages, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_organize_document_with_http_info(name, pages, out_path, opts)
    else
      raise
    end
  return data
end
post_organize_document_with_http_info(name, pages, out_path, opts = {}) click to toggle source

Merge selected pages of a document.

@param name The original document name. @param pages 1-based page numbers of the source document that make up the resulting document. @param out_path Full filename of the resulting document. @param [Hash] opts the optional parameters @option opts [String] :storage The documents storage. @option opts [String] :folder The source document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17293
def post_organize_document_with_http_info(name, pages, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_organize_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_organize_document"
  end
  # verify the required parameter 'pages' is set
  if @api_client.config.client_side_validation && pages.nil?
    fail ArgumentError, "Missing the required parameter 'pages' when calling PdfApi.post_organize_document"
  end
  if @api_client.config.client_side_validation && pages.to_s.length < 1
    fail ArgumentError, 'invalid value for "pages" when calling PdfApi.post_organize_document, the character length must be great than or equal to 1.'
  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 PdfApi.post_organize_document"
  end
  if @api_client.config.client_side_validation && out_path.to_s.length < 1
    fail ArgumentError, 'invalid value for "out_path" when calling PdfApi.post_organize_document, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = "/pdf/{name}/organize".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'pages'] = pages
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_organize_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_organize_documents(organize_documents, out_path, opts = {}) click to toggle source

Merge selected pages of different documents.

@param organize_documents Array of OrganizeDocumentData to make up the resulting document. @param out_path Full filename of the resulting document. @param [Hash] opts the optional parameters @option opts [String] :storage The documents storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17363
def post_organize_documents(organize_documents, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_organize_documents_with_http_info(organize_documents, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_organize_documents_with_http_info(organize_documents, out_path, opts)
    else
      raise
    end
  return data
end
post_organize_documents_with_http_info(organize_documents, out_path, opts = {}) click to toggle source

Merge selected pages of different documents.

@param organize_documents Array of OrganizeDocumentData to make up the resulting document. @param out_path Full filename of the resulting document. @param [Hash] opts the optional parameters @option opts [String] :storage The documents storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17383
def post_organize_documents_with_http_info(organize_documents, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_organize_documents ..."
  end
  # verify the required parameter 'organize_documents' is set
  if @api_client.config.client_side_validation && organize_documents.nil?
    fail ArgumentError, "Missing the required parameter 'organize_documents' when calling PdfApi.post_organize_documents"
  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 PdfApi.post_organize_documents"
  end
  if @api_client.config.client_side_validation && out_path.to_s.length < 1
    fail ArgumentError, 'invalid value for "out_path" when calling PdfApi.post_organize_documents, the character length must be great than or equal to 1.'
  end

  # resource path
  local_var_path = "/pdf/organize"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(organize_documents)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_organize_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_caret_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page caret annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17444
def post_page_caret_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_caret_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_caret_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_caret_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page caret annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17466
def post_page_caret_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_caret_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_caret_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_caret_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_caret_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/caret".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_caret_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_certify(name, page_number, sign, doc_mdp_access_permission_type, opts = {}) click to toggle source

Certify document page.

@param name The document name. @param page_number The page number. @param sign Signature object containing signature data. @param doc_mdp_access_permission_type The access permissions granted for this document. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17528
def post_page_certify(name, page_number, sign, doc_mdp_access_permission_type, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, opts)
    else
      raise
    end
  return data
end
post_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, opts = {}) click to toggle source

Certify document page.

@param name The document name. @param page_number The page number. @param sign Signature object containing signature data. @param doc_mdp_access_permission_type The access permissions granted for this document. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17551
def post_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_certify ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_certify"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_certify"
  end
  # verify the required parameter 'sign' is set
  if @api_client.config.client_side_validation && sign.nil?
    fail ArgumentError, "Missing the required parameter 'sign' when calling PdfApi.post_page_certify"
  end
  # verify the required parameter 'doc_mdp_access_permission_type' is set
  if @api_client.config.client_side_validation && doc_mdp_access_permission_type.nil?
    fail ArgumentError, "Missing the required parameter 'doc_mdp_access_permission_type' when calling PdfApi.post_page_certify"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['NoChanges', 'FillingInForms', 'AnnotationModification'].include?(doc_mdp_access_permission_type)
    fail ArgumentError, "invalid value for 'doc_mdp_access_permission_type', must be one of NoChanges, FillingInForms, AnnotationModification"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/certify".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'docMdpAccessPermissionType'] = doc_mdp_access_permission_type
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(sign)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_certify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_circle_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page circle annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17621
def post_page_circle_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_circle_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_circle_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_circle_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page circle annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17643
def post_page_circle_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_circle_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_circle_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_circle_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_circle_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/circle".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_circle_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_file_attachment_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page FileAttachment annotations.

@param name The document name. @param page_number The page number. @param annotations Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17704
def post_page_file_attachment_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_file_attachment_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_file_attachment_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_file_attachment_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page FileAttachment annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17726
def post_page_file_attachment_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_file_attachment_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_file_attachment_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_file_attachment_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_file_attachment_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/fileattachment".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_file_attachment_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_free_text_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page free text annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17787
def post_page_free_text_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page free text annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17809
def post_page_free_text_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_free_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_free_text_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_free_text_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_free_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/freetext".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_free_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_highlight_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page highlight annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17870
def post_page_highlight_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_highlight_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_highlight_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_highlight_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page highlight annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17892
def post_page_highlight_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_highlight_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_highlight_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_highlight_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_highlight_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/highlight".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_highlight_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_image_stamps(name, page_number, stamps, opts = {}) click to toggle source

Add document page image stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17954
def post_page_image_stamps(name, page_number, stamps, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_image_stamps_with_http_info(name, page_number, stamps, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_image_stamps_with_http_info(name, page_number, stamps, opts)
    else
      raise
    end
  return data
end
post_page_image_stamps_with_http_info(name, page_number, stamps, opts = {}) click to toggle source

Add document page image stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 17977
def post_page_image_stamps_with_http_info(name, page_number, stamps, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_image_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_image_stamps"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_image_stamps"
  end
  # verify the required parameter 'stamps' is set
  if @api_client.config.client_side_validation && stamps.nil?
    fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_page_image_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamps/image".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamps)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_image_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_ink_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page ink annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18039
def post_page_ink_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_ink_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_ink_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_ink_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page ink annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18061
def post_page_ink_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_ink_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_ink_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_ink_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_ink_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/ink".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_ink_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_line_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page line annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18122
def post_page_line_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_line_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_line_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_line_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page line annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18144
def post_page_line_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_line_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_line_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/line".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_link_annotations(name, page_number, links, opts = {}) click to toggle source

Add document page link annotations.

@param name The document name. @param page_number The page number. @param links Array of link annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18205
def post_page_link_annotations(name, page_number, links, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_link_annotations_with_http_info(name, page_number, links, opts)
    else
      raise
    end
  return data
end
post_page_link_annotations_with_http_info(name, page_number, links, opts = {}) click to toggle source

Add document page link annotations.

@param name The document name. @param page_number The page number. @param links Array of link annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18227
def post_page_link_annotations_with_http_info(name, page_number, links, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_link_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_link_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_link_annotations"
  end
  # verify the required parameter 'links' is set
  if @api_client.config.client_side_validation && links.nil?
    fail ArgumentError, "Missing the required parameter 'links' when calling PdfApi.post_page_link_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/links".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(links)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_link_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_movie_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page movie annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18288
def post_page_movie_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_movie_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_movie_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_movie_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page movie annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18310
def post_page_movie_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_movie_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_movie_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_movie_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_movie_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/movie".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_movie_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_pdf_page_stamps(name, page_number, stamps, opts = {}) click to toggle source

Add document pdf page stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18372
def post_page_pdf_page_stamps(name, page_number, stamps, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_pdf_page_stamps_with_http_info(name, page_number, stamps, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_pdf_page_stamps_with_http_info(name, page_number, stamps, opts)
    else
      raise
    end
  return data
end
post_page_pdf_page_stamps_with_http_info(name, page_number, stamps, opts = {}) click to toggle source

Add document pdf page stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18395
def post_page_pdf_page_stamps_with_http_info(name, page_number, stamps, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_pdf_page_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_pdf_page_stamps"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_pdf_page_stamps"
  end
  # verify the required parameter 'stamps' is set
  if @api_client.config.client_side_validation && stamps.nil?
    fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_page_pdf_page_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamps/pdfpage".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamps)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_pdf_page_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_poly_line_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page polyline annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18457
def post_page_poly_line_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page polyline annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18479
def post_page_poly_line_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_poly_line_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_poly_line_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_poly_line_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_poly_line_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polyline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_poly_line_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_polygon_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page polygon annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18540
def post_page_polygon_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page polygon annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18562
def post_page_polygon_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_polygon_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_polygon_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_polygon_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_polygon_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/polygon".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_polygon_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_redaction_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page redaction annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [BOOLEAN] :apply Apply redaction immediately after adding. (default to false) @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18624
def post_page_redaction_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_redaction_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_redaction_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_redaction_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page redaction annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [BOOLEAN] :apply Apply redaction immediately after adding. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18647
def post_page_redaction_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_redaction_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_redaction_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_redaction_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_redaction_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/redaction".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'apply'] = opts[:'apply'] if !opts[:'apply'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_redaction_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_screen_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page screen annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18709
def post_page_screen_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_screen_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_screen_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_screen_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page screen annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18731
def post_page_screen_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_screen_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_screen_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_screen_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_screen_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/screen".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_screen_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_sound_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page sound annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18792
def post_page_sound_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_sound_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_sound_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_sound_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page sound annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18814
def post_page_sound_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_sound_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_sound_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_sound_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_sound_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/sound".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_sound_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_square_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page square annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18875
def post_page_square_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_square_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_square_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_square_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page square annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18897
def post_page_square_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_square_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_square_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_square_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_square_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/square".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_square_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_squiggly_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page squiggly annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18958
def post_page_squiggly_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_squiggly_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_squiggly_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_squiggly_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page squiggly annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 18980
def post_page_squiggly_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_squiggly_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_squiggly_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_squiggly_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_squiggly_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/squiggly".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_squiggly_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_stamp_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page stamp annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19041
def post_page_stamp_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_stamp_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_stamp_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_stamp_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page stamp annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19063
def post_page_stamp_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_stamp_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_stamp_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_stamp_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_stamp_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/stamp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_stamp_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_strike_out_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page StrikeOut annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19124
def post_page_strike_out_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_strike_out_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_strike_out_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_strike_out_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page StrikeOut annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19146
def post_page_strike_out_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_strike_out_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_strike_out_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_strike_out_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_strike_out_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/strikeout".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_strike_out_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_tables(name, page_number, tables, opts = {}) click to toggle source

Add document page tables.

@param name The document name. @param page_number The page number. @param tables The array of table. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19207
def post_page_tables(name, page_number, tables, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_tables_with_http_info(name, page_number, tables, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_tables_with_http_info(name, page_number, tables, opts)
    else
      raise
    end
  return data
end
post_page_tables_with_http_info(name, page_number, tables, opts = {}) click to toggle source

Add document page tables.

@param name The document name. @param page_number The page number. @param tables The array of table. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19229
def post_page_tables_with_http_info(name, page_number, tables, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_tables ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_tables"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_tables"
  end
  # verify the required parameter 'tables' is set
  if @api_client.config.client_side_validation && tables.nil?
    fail ArgumentError, "Missing the required parameter 'tables' when calling PdfApi.post_page_tables"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/tables".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(tables)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_tables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_text_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page text annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19290
def post_page_text_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_text_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_text_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_text_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page text annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19312
def post_page_text_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_text_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_text_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_text_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_text_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_text_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_text_replace(name, page_number, text_replace_list_request, opts = {}) click to toggle source

Page’s replace text method.

@param name @param page_number @param text_replace_list_request @param [Hash] opts the optional parameters @option opts [String] :storage @option opts [String] :folder @return [TextReplaceResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19373
def post_page_text_replace(name, page_number, text_replace_list_request, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_text_replace_with_http_info(name, page_number, text_replace_list_request, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_text_replace_with_http_info(name, page_number, text_replace_list_request, opts)
    else
      raise
    end
  return data
end
post_page_text_replace_with_http_info(name, page_number, text_replace_list_request, opts = {}) click to toggle source

Page&#39;s replace text method.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19395
def post_page_text_replace_with_http_info(name, page_number, text_replace_list_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_text_replace ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_text_replace"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_text_replace"
  end
  # verify the required parameter 'text_replace_list_request' is set
  if @api_client.config.client_side_validation && text_replace_list_request.nil?
    fail ArgumentError, "Missing the required parameter 'text_replace_list_request' when calling PdfApi.post_page_text_replace"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/text/replace".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(text_replace_list_request)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextReplaceResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_text_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_text_stamps(name, page_number, stamps, opts = {}) click to toggle source

Add document page text stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19457
def post_page_text_stamps(name, page_number, stamps, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_text_stamps_with_http_info(name, page_number, stamps, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_text_stamps_with_http_info(name, page_number, stamps, opts)
    else
      raise
    end
  return data
end
post_page_text_stamps_with_http_info(name, page_number, stamps, opts = {}) click to toggle source

Add document page text stamps.

@param name The document name. @param page_number The page number. @param stamps The array of stamp. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19480
def post_page_text_stamps_with_http_info(name, page_number, stamps, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_text_stamps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_text_stamps"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_text_stamps"
  end
  # verify the required parameter 'stamps' is set
  if @api_client.config.client_side_validation && stamps.nil?
    fail ArgumentError, "Missing the required parameter 'stamps' when calling PdfApi.post_page_text_stamps"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamps/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamps)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_text_stamps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_page_underline_annotations(name, page_number, annotations, opts = {}) click to toggle source

Add document page underline annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19542
def post_page_underline_annotations(name, page_number, annotations, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_page_underline_annotations_with_http_info(name, page_number, annotations, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_page_underline_annotations_with_http_info(name, page_number, annotations, opts)
    else
      raise
    end
  return data
end
post_page_underline_annotations_with_http_info(name, page_number, annotations, opts = {}) click to toggle source

Add document page underline annotations.

@param name The document name. @param page_number The page number. @param annotations The array of annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19564
def post_page_underline_annotations_with_http_info(name, page_number, annotations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_page_underline_annotations ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_page_underline_annotations"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_page_underline_annotations"
  end
  # verify the required parameter 'annotations' is set
  if @api_client.config.client_side_validation && annotations.nil?
    fail ArgumentError, "Missing the required parameter 'annotations' when calling PdfApi.post_page_underline_annotations"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/annotations/underline".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotations)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_page_underline_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_pdf_to_xlsx(opts = {}) click to toggle source

Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.

@param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [File]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19625
def post_pdf_to_xlsx(opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_pdf_to_xlsx_with_http_info(opts)
    else
      raise
    end
  return data
end
post_pdf_to_xlsx_with_http_info(opts = {}) click to toggle source

Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.

@param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19647
def post_pdf_to_xlsx_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_pdf_to_xlsx ..."
  end
  # resource path
  local_var_path = "/pdf/convert/xlsx"

  # query parameters
  query_params = {}
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_pdf_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_popup_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Add document popup annotations.

@param name The document name. @param annotation_id The parent annotation ID. @param annotation The annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19701
def post_popup_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_popup_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_popup_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
post_popup_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Add document popup annotations.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19723
def post_popup_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_popup_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_popup_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.post_popup_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.post_popup_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/{annotationId}/popup".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_popup_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_radio_button_fields(name, fields, opts = {}) click to toggle source

Add document RadioButton fields.

@param name The document name. @param fields The array of field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19783
def post_radio_button_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_radio_button_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_radio_button_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
post_radio_button_fields_with_http_info(name, fields, opts = {}) click to toggle source

Add document RadioButton fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19804
def post_radio_button_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_radio_button_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_radio_button_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.post_radio_button_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/radiobutton".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_radio_button_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_sign_document(name, sign, opts = {}) click to toggle source

Sign document.

@param name The document name. @param sign Signature object containing signature data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19860
def post_sign_document(name, sign, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_sign_document_with_http_info(name, sign, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_sign_document_with_http_info(name, sign, opts)
    else
      raise
    end
  return data
end
post_sign_document_with_http_info(name, sign, opts = {}) click to toggle source

Sign document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19881
def post_sign_document_with_http_info(name, sign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_sign_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_sign_document"
  end
  # verify the required parameter 'sign' is set
  if @api_client.config.client_side_validation && sign.nil?
    fail ArgumentError, "Missing the required parameter 'sign' when calling PdfApi.post_sign_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/sign".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(sign)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_sign_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_sign_page(name, page_number, sign, opts = {}) click to toggle source

Sign page.

@param name The document name. @param page_number The page number. @param sign Signature object containing signature data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19938
def post_sign_page(name, page_number, sign, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_sign_page_with_http_info(name, page_number, sign, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_sign_page_with_http_info(name, page_number, sign, opts)
    else
      raise
    end
  return data
end
post_sign_page_with_http_info(name, page_number, sign, opts = {}) click to toggle source

Sign page.

@param name The document name. @param page_number The page number. @param sign Signature object containing signature data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 19960
def post_sign_page_with_http_info(name, page_number, sign, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_sign_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_sign_page"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.post_sign_page"
  end
  # verify the required parameter 'sign' is set
  if @api_client.config.client_side_validation && sign.nil?
    fail ArgumentError, "Missing the required parameter 'sign' when calling PdfApi.post_sign_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/sign".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(sign)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_sign_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_signature_field(name, field, opts = {}) click to toggle source

Add document signature field.

@param name The document name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20020
def post_signature_field(name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_signature_field_with_http_info(name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_signature_field_with_http_info(name, field, opts)
    else
      raise
    end
  return data
end
post_signature_field_with_http_info(name, field, opts = {}) click to toggle source

Add document signature field.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20041
def post_signature_field_with_http_info(name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_signature_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_signature_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.post_signature_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/signature".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_signature_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_split_document(name, opts = {}) click to toggle source

Split document to parts.

@param name Document name. @param [Hash] opts the optional parameters @option opts [String] :format Resulting documents format. @option opts [Integer] :from Start page if defined. @option opts [Integer] :to End page if defined. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [SplitResultResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20100
def post_split_document(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_split_document_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_split_document_with_http_info(name, opts)
    else
      raise
    end
  return data
end
post_split_document_with_http_info(name, opts = {}) click to toggle source

Split document to parts.

@param name Document name. @param [Hash] opts the optional parameters @option opts [String] :format Resulting documents format. @option opts [Integer] :from Start page if defined. @option opts [Integer] :to End page if defined. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [Array<(SplitResultResponse, Fixnum, Hash)>] SplitResultResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20124
def post_split_document_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_split_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_split_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/split".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SplitResultResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_split_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_split_range_pdf_document(name, options, opts = {}) click to toggle source

Split document into ranges.

@param name The document name. @param options The splitting options. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password Base64 encoded password. @return [SplitResultResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20182
def post_split_range_pdf_document(name, options, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_split_range_pdf_document_with_http_info(name, options, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_split_range_pdf_document_with_http_info(name, options, opts)
    else
      raise
    end
  return data
end
post_split_range_pdf_document_with_http_info(name, options, opts = {}) click to toggle source

Split document into ranges.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20204
def post_split_range_pdf_document_with_http_info(name, options, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_split_range_pdf_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_split_range_pdf_document"
  end
  # verify the required parameter 'options' is set
  if @api_client.config.client_side_validation && options.nil?
    fail ArgumentError, "Missing the required parameter 'options' when calling PdfApi.post_split_range_pdf_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/splitrangepdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(options)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SplitResultResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_split_range_pdf_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_text_box_fields(name, fields, opts = {}) click to toggle source

Add document text box fields.

@param name The document name. @param fields The array of field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20261
def post_text_box_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_text_box_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_text_box_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
post_text_box_fields_with_http_info(name, fields, opts = {}) click to toggle source

Add document text box fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20282
def post_text_box_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_text_box_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_text_box_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.post_text_box_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/textbox".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_text_box_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_xmp_metadata(name, metadata, opts = {}) click to toggle source

Add or remove XMP Metadata properties.

@param name The document name. @param metadata XmpMetadata instance. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :pass_base64 The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20339
def post_xmp_metadata(name, metadata, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = post_xmp_metadata_with_http_info(name, metadata, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = post_xmp_metadata_with_http_info(name, metadata, opts)
    else
      raise
    end
  return data
end
post_xmp_metadata_with_http_info(name, metadata, opts = {}) click to toggle source

Add or remove XMP Metadata properties.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20361
def post_xmp_metadata_with_http_info(name, metadata, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.post_xmp_metadata ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_xmp_metadata"
  end
  # verify the required parameter 'metadata' is set
  if @api_client.config.client_side_validation && metadata.nil?
    fail ArgumentError, "Missing the required parameter 'metadata' when calling PdfApi.post_xmp_metadata"
  end
  # resource path
  local_var_path = "/pdf/{name}/xmpmetadata".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?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(metadata)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#post_xmp_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_add_new_page(name, opts = {}) click to toggle source

Add new page to end of the document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [DocumentPagesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20417
def put_add_new_page(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_add_new_page_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_add_new_page_with_http_info(name, opts)
    else
      raise
    end
  return data
end
put_add_new_page_with_http_info(name, opts = {}) click to toggle source

Add new page to end of the document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20437
def put_add_new_page_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_add_new_page ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_add_new_page"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_add_new_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_add_text(name, page_number, paragraph, opts = {}) click to toggle source

Add text to PDF document page.

@param name The document name. @param page_number Number of page (starting from 1). @param paragraph Paragraph data. @param [Hash] opts the optional parameters @option opts [String] :folder Document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20491
def put_add_text(name, page_number, paragraph, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_add_text_with_http_info(name, page_number, paragraph, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_add_text_with_http_info(name, page_number, paragraph, opts)
    else
      raise
    end
  return data
end
put_add_text_with_http_info(name, page_number, paragraph, opts = {}) click to toggle source

Add text to PDF document page.

@param name The document name. @param page_number Number of page (starting from 1). @param paragraph Paragraph data. @param [Hash] opts the optional parameters @option opts [String] :folder Document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20513
def put_add_text_with_http_info(name, page_number, paragraph, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_add_text ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_add_text"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_add_text"
  end
  # verify the required parameter 'paragraph' is set
  if @api_client.config.client_side_validation && paragraph.nil?
    fail ArgumentError, "Missing the required parameter 'paragraph' when calling PdfApi.put_add_text"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/text".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(paragraph)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_add_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_annotations_flatten(name, opts = {}) click to toggle source

Flattens the annotations of the specified types

@param name The document name. @param [Hash] opts the optional parameters @option opts [Integer] :start_page The start page number. @option opts [Integer] :end_page The end page number. @option opts [Array<AnnotationType>] :annotation_types Array of annotation types. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20575
def put_annotations_flatten(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_annotations_flatten_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_annotations_flatten_with_http_info(name, opts)
    else
      raise
    end
  return data
end
put_annotations_flatten_with_http_info(name, opts = {}) click to toggle source

Flattens the annotations of the specified types

@param name The document name. @param [Hash] opts the optional parameters @option opts [Integer] :start_page The start page number. @option opts [Integer] :end_page The end page number. @option opts [Array<AnnotationType>] :annotation_types Array of annotation types. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20598
def put_annotations_flatten_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_annotations_flatten ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_annotations_flatten"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/flatten".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'startPage'] = opts[:'start_page'] if !opts[:'start_page'].nil?
  query_params[:'endPage'] = opts[:'end_page'] if !opts[:'end_page'].nil?
  query_params[:'annotationTypes'] = @api_client.build_collection_param(opts[:'annotation_types'], :multi) if !opts[:'annotation_types'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_annotations_flatten\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_bookmark(name, bookmark_path, bookmark, opts = {}) click to toggle source

Update document bookmark.

@param name The document name. @param bookmark_path The bookmark path. @param bookmark The bookmark. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [BookmarkResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20656
def put_bookmark(name, bookmark_path, bookmark, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_bookmark_with_http_info(name, bookmark_path, bookmark, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_bookmark_with_http_info(name, bookmark_path, bookmark, opts)
    else
      raise
    end
  return data
end
put_bookmark_with_http_info(name, bookmark_path, bookmark, opts = {}) click to toggle source

Update document bookmark.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20679
def put_bookmark_with_http_info(name, bookmark_path, bookmark, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_bookmark ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_bookmark"
  end
  # verify the required parameter 'bookmark_path' is set
  if @api_client.config.client_side_validation && bookmark_path.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark_path' when calling PdfApi.put_bookmark"
  end
  # verify the required parameter 'bookmark' is set
  if @api_client.config.client_side_validation && bookmark.nil?
    fail ArgumentError, "Missing the required parameter 'bookmark' when calling PdfApi.put_bookmark"
  end
  # resource path
  local_var_path = "/pdf/{name}/bookmarks/bookmark/{bookmarkPath}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'bookmarkPath' + '}', bookmark_path.to_s)

  # query parameters
  query_params = {}
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(bookmark)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BookmarkResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_bookmark\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_caret_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document caret annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CaretAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20741
def put_caret_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_caret_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_caret_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_caret_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document caret annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20763
def put_caret_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_caret_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_caret_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_caret_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_caret_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/caret/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CaretAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_caret_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_change_password_document(out_path, owner_password, new_user_password, new_owner_password, opts = {}) click to toggle source

Change document password from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param owner_password Owner password (encrypted Base64). @param new_user_password New user password (encrypted Base64). @param new_owner_password New owner password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be changed password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20825
def put_change_password_document(out_path, owner_password, new_user_password, new_owner_password, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_change_password_document_with_http_info(out_path, owner_password, new_user_password, new_owner_password, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_change_password_document_with_http_info(out_path, owner_password, new_user_password, new_owner_password, opts)
    else
      raise
    end
  return data
end
put_change_password_document_with_http_info(out_path, owner_password, new_user_password, new_owner_password, opts = {}) click to toggle source

Change document password from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param owner_password Owner password (encrypted Base64). @param new_user_password New user password (encrypted Base64). @param new_owner_password New owner password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be changed password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20848
def put_change_password_document_with_http_info(out_path, owner_password, new_user_password, new_owner_password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_change_password_document ..."
  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 PdfApi.put_change_password_document"
  end
  # verify the required parameter 'owner_password' is set
  if @api_client.config.client_side_validation && owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'owner_password' when calling PdfApi.put_change_password_document"
  end
  # verify the required parameter 'new_user_password' is set
  if @api_client.config.client_side_validation && new_user_password.nil?
    fail ArgumentError, "Missing the required parameter 'new_user_password' when calling PdfApi.put_change_password_document"
  end
  # verify the required parameter 'new_owner_password' is set
  if @api_client.config.client_side_validation && new_owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'new_owner_password' when calling PdfApi.put_change_password_document"
  end
  # resource path
  local_var_path = "/pdf/changepassword"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'ownerPassword'] = owner_password
  query_params[:'newUserPassword'] = new_user_password
  query_params[:'newOwnerPassword'] = new_owner_password
  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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_change_password_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_check_box_field(name, field_name, field, opts = {}) click to toggle source

Replace document checkbox field

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CheckBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20919
def put_check_box_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_check_box_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_check_box_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_check_box_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document checkbox field

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 20941
def put_check_box_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_check_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_check_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_check_box_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_check_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/checkbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CheckBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_check_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_circle_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document circle annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [CircleAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21002
def put_circle_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_circle_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_circle_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_circle_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document circle annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21024
def put_circle_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_circle_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_circle_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_circle_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_circle_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/circle/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CircleAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_circle_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_combo_box_field(name, field_name, field, opts = {}) click to toggle source

Replace document combobox field

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ComboBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21085
def put_combo_box_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_combo_box_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_combo_box_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_combo_box_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document combobox field

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21107
def put_combo_box_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_combo_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_combo_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_combo_box_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_combo_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/combobox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ComboBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_combo_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_create_document(name, opts = {}) click to toggle source

Create empty document.

@param name The new document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The new document folder. @return [DocumentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21166
def put_create_document(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_create_document_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_create_document_with_http_info(name, opts)
    else
      raise
    end
  return data
end
put_create_document_with_http_info(name, opts = {}) click to toggle source

Create empty document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21186
def put_create_document_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_create_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_create_document"
  end
  # resource path
  local_var_path = "/pdf/{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(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_create_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_create_pdf_from_layer(name, page_number, out_path, layer_id, opts = {}) click to toggle source

Create a separate PDF from a PDF Layer and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param layer_id Layer Id. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :pass_base64 The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21242
def put_create_pdf_from_layer(name, page_number, out_path, layer_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_create_pdf_from_layer_with_http_info(name, page_number, out_path, layer_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_create_pdf_from_layer_with_http_info(name, page_number, out_path, layer_id, opts)
    else
      raise
    end
  return data
end
put_create_pdf_from_layer_with_http_info(name, page_number, out_path, layer_id, opts = {}) click to toggle source

Create a separate PDF from a PDF Layer and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param layer_id Layer Id. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :pass_base64 The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21266
def put_create_pdf_from_layer_with_http_info(name, page_number, out_path, layer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_create_pdf_from_layer ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_create_pdf_from_layer"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_create_pdf_from_layer"
  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 PdfApi.put_create_pdf_from_layer"
  end
  # verify the required parameter 'layer_id' is set
  if @api_client.config.client_side_validation && layer_id.nil?
    fail ArgumentError, "Missing the required parameter 'layer_id' when calling PdfApi.put_create_pdf_from_layer"
  end
  # resource path
  local_var_path = "/pdf/{name}/layers".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'pageNumber'] = page_number
  query_params[:'outPath'] = out_path
  query_params[:'layerId'] = layer_id
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'passBase64'] = opts[:'pass_base64'] if !opts[:'pass_base64'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_create_pdf_from_layer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_decrypt_document(out_path, password, opts = {}) click to toggle source

Decrypt document from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param password The password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be decrypted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21335
def put_decrypt_document(out_path, password, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_decrypt_document_with_http_info(out_path, password, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_decrypt_document_with_http_info(out_path, password, opts)
    else
      raise
    end
  return data
end
put_decrypt_document_with_http_info(out_path, password, opts = {}) click to toggle source

Decrypt document from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param password The password (encrypted Base64). @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be decrypted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21356
def put_decrypt_document_with_http_info(out_path, password, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_decrypt_document ..."
  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 PdfApi.put_decrypt_document"
  end
  # verify the required parameter 'password' is set
  if @api_client.config.client_side_validation && password.nil?
    fail ArgumentError, "Missing the required parameter 'password' when calling PdfApi.put_decrypt_document"
  end
  # resource path
  local_var_path = "/pdf/decrypt"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'password'] = password
  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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_decrypt_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_document_display_properties(name, display_properties, opts = {}) click to toggle source

Update document display properties.

@param name The document name. @param display_properties The display properties. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [DisplayPropertiesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21416
def put_document_display_properties(name, display_properties, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_document_display_properties_with_http_info(name, display_properties, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_document_display_properties_with_http_info(name, display_properties, opts)
    else
      raise
    end
  return data
end
put_document_display_properties_with_http_info(name, display_properties, opts = {}) click to toggle source

Update document display properties.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21437
def put_document_display_properties_with_http_info(name, display_properties, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_document_display_properties ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_document_display_properties"
  end
  # verify the required parameter 'display_properties' is set
  if @api_client.config.client_side_validation && display_properties.nil?
    fail ArgumentError, "Missing the required parameter 'display_properties' when calling PdfApi.put_document_display_properties"
  end
  # resource path
  local_var_path = "/pdf/{name}/displayproperties".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(display_properties)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DisplayPropertiesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_document_display_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_encrypt_document(out_path, user_password, owner_password, crypto_algorithm, opts = {}) click to toggle source

Encrypt document from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param user_password User password (encrypted Base64). @param owner_password Owner password (encrypted Base64). @param crypto_algorithm Cryptographic algorithm, see CryptoAlgorithm for details. @param [Hash] opts the optional parameters @option opts [Array<PermissionsFlags>] :permissions_flags Array of document permissions, see PermissionsFlags for details. @option opts [BOOLEAN] :use_pdf20 Support for revision 6 (Extension 8). @option opts [String] :storage The document storage. @option opts [File] :file A file to be encrypted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21497
def put_encrypt_document(out_path, user_password, owner_password, crypto_algorithm, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_encrypt_document_with_http_info(out_path, user_password, owner_password, crypto_algorithm, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_encrypt_document_with_http_info(out_path, user_password, owner_password, crypto_algorithm, opts)
    else
      raise
    end
  return data
end
put_encrypt_document_with_http_info(out_path, user_password, owner_password, crypto_algorithm, opts = {}) click to toggle source

Encrypt document from content.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param user_password User password (encrypted Base64). @param owner_password Owner password (encrypted Base64). @param crypto_algorithm Cryptographic algorithm, see CryptoAlgorithm for details. @param [Hash] opts the optional parameters @option opts [Array<PermissionsFlags>] :permissions_flags Array of document permissions, see PermissionsFlags for details. @option opts [BOOLEAN] :use_pdf20 Support for revision 6 (Extension 8). @option opts [String] :storage The document storage. @option opts [File] :file A file to be encrypted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21522
def put_encrypt_document_with_http_info(out_path, user_password, owner_password, crypto_algorithm, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_encrypt_document ..."
  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 PdfApi.put_encrypt_document"
  end
  # verify the required parameter 'user_password' is set
  if @api_client.config.client_side_validation && user_password.nil?
    fail ArgumentError, "Missing the required parameter 'user_password' when calling PdfApi.put_encrypt_document"
  end
  # verify the required parameter 'owner_password' is set
  if @api_client.config.client_side_validation && owner_password.nil?
    fail ArgumentError, "Missing the required parameter 'owner_password' when calling PdfApi.put_encrypt_document"
  end
  # verify the required parameter 'crypto_algorithm' is set
  if @api_client.config.client_side_validation && crypto_algorithm.nil?
    fail ArgumentError, "Missing the required parameter 'crypto_algorithm' when calling PdfApi.put_encrypt_document"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['RC4x40', 'RC4x128', 'AESx128', 'AESx256'].include?(crypto_algorithm)
    fail ArgumentError, "invalid value for 'crypto_algorithm', must be one of RC4x40, RC4x128, AESx128, AESx256"
  end
  # resource path
  local_var_path = "/pdf/encrypt"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'userPassword'] = user_password
  query_params[:'ownerPassword'] = owner_password
  query_params[:'cryptoAlgorithm'] = crypto_algorithm
  query_params[:'permissionsFlags'] = @api_client.build_collection_param(opts[:'permissions_flags'], :multi) if !opts[:'permissions_flags'].nil?
  query_params[:'usePdf20'] = opts[:'use_pdf20'] if !opts[:'use_pdf20'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_encrypt_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_epub_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert EPUB file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.epub) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :dst_folder The destination document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21598
def put_epub_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_epub_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_epub_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_epub_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert EPUB file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.epub) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :dst_folder The destination document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21619
def put_epub_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_epub_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_epub_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_epub_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/epub".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_epub_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_export_fields_from_pdf_to_fdf_in_storage(name, fdf_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to FDF file in storage.

@param name The document name. @param fdf_output_file_path The output Fdf file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21677
def put_export_fields_from_pdf_to_fdf_in_storage(name, fdf_output_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, fdf_output_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, fdf_output_file_path, opts)
    else
      raise
    end
  return data
end
put_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, fdf_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to FDF file in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21698
def put_export_fields_from_pdf_to_fdf_in_storage_with_http_info(name, fdf_output_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_export_fields_from_pdf_to_fdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_export_fields_from_pdf_to_fdf_in_storage"
  end
  # verify the required parameter 'fdf_output_file_path' is set
  if @api_client.config.client_side_validation && fdf_output_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'fdf_output_file_path' when calling PdfApi.put_export_fields_from_pdf_to_fdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/fdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'fdfOutputFilePath'] = fdf_output_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_export_fields_from_pdf_to_fdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_export_fields_from_pdf_to_xfdf_in_storage(name, xfdf_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to XFDF file in storage.

@param name The document name. @param xfdf_output_file_path The output xfdf file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21756
def put_export_fields_from_pdf_to_xfdf_in_storage(name, xfdf_output_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, xfdf_output_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, xfdf_output_file_path, opts)
    else
      raise
    end
  return data
end
put_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, xfdf_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to XFDF file in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21777
def put_export_fields_from_pdf_to_xfdf_in_storage_with_http_info(name, xfdf_output_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_export_fields_from_pdf_to_xfdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_export_fields_from_pdf_to_xfdf_in_storage"
  end
  # verify the required parameter 'xfdf_output_file_path' is set
  if @api_client.config.client_side_validation && xfdf_output_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xfdf_output_file_path' when calling PdfApi.put_export_fields_from_pdf_to_xfdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/xfdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xfdfOutputFilePath'] = xfdf_output_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_export_fields_from_pdf_to_xfdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_export_fields_from_pdf_to_xml_in_storage(name, xml_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to XML file in storage.

@param name The document name. @param xml_output_file_path The output xml file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21835
def put_export_fields_from_pdf_to_xml_in_storage(name, xml_output_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, xml_output_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, xml_output_file_path, opts)
    else
      raise
    end
  return data
end
put_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, xml_output_file_path, opts = {}) click to toggle source

Export fields from from PDF in storage to XML file in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21856
def put_export_fields_from_pdf_to_xml_in_storage_with_http_info(name, xml_output_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_export_fields_from_pdf_to_xml_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_export_fields_from_pdf_to_xml_in_storage"
  end
  # verify the required parameter 'xml_output_file_path' is set
  if @api_client.config.client_side_validation && xml_output_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xml_output_file_path' when calling PdfApi.put_export_fields_from_pdf_to_xml_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/export/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xmlOutputFilePath'] = xml_output_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_export_fields_from_pdf_to_xml_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_fields_flatten(name, opts = {}) click to toggle source

Flatten form fields in document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21913
def put_fields_flatten(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_fields_flatten_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_fields_flatten_with_http_info(name, opts)
    else
      raise
    end
  return data
end
put_fields_flatten_with_http_info(name, opts = {}) click to toggle source

Flatten form fields in document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21933
def put_fields_flatten_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_fields_flatten ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_fields_flatten"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/flatten".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_fields_flatten\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_file_attachment_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document FileAttachment annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FileAttachmentAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 21987
def put_file_attachment_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_file_attachment_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_file_attachment_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_file_attachment_annotation_data_extract(name, annotation_id, opts = {}) click to toggle source

Extract document FileAttachment annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param [Hash] opts the optional parameters @option opts [String] :out_folder The output folder. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22070
def put_file_attachment_annotation_data_extract(name, annotation_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_file_attachment_annotation_data_extract_with_http_info(name, annotation_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_file_attachment_annotation_data_extract_with_http_info(name, annotation_id, opts)
    else
      raise
    end
  return data
end
put_file_attachment_annotation_data_extract_with_http_info(name, annotation_id, opts = {}) click to toggle source

Extract document FileAttachment annotation content to storage

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22092
def put_file_attachment_annotation_data_extract_with_http_info(name, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_file_attachment_annotation_data_extract ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_file_attachment_annotation_data_extract"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_file_attachment_annotation_data_extract"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/fileattachment/{annotationId}/data/extract".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'outFolder'] = opts[:'out_folder'] if !opts[:'out_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_file_attachment_annotation_data_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_file_attachment_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document FileAttachment annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22009
def put_file_attachment_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_file_attachment_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_file_attachment_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_file_attachment_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_file_attachment_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/fileattachment/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileAttachmentAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_file_attachment_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_free_text_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document free text annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FreeTextAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22151
def put_free_text_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_free_text_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_free_text_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_free_text_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document free text annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22173
def put_free_text_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_free_text_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_free_text_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_free_text_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_free_text_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/freetext/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FreeTextAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_free_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_highlight_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document highlight annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [HighlightAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22234
def put_highlight_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_highlight_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_highlight_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_highlight_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document highlight annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22256
def put_highlight_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_highlight_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_highlight_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_highlight_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_highlight_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/highlight/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'HighlightAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_highlight_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_html_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert HTML file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.zip) @param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22324
def put_html_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_html_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_html_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_html_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert HTML file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.zip) @param [Hash] opts the optional parameters @option opts [String] :html_file_name Name of HTML file in ZIP. @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22353
def put_html_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_html_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_html_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_html_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/html".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'htmlFileName'] = opts[:'html_file_name'] if !opts[:'html_file_name'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_html_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_image_extract_as_gif(name, image_id, opts = {}) click to toggle source

Extract document image in GIF format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22422
def put_image_extract_as_gif(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_image_extract_as_gif_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_image_extract_as_gif_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
put_image_extract_as_gif_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in GIF format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22446
def put_image_extract_as_gif_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_image_extract_as_gif ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_image_extract_as_gif"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.put_image_extract_as_gif"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_image_extract_as_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_image_extract_as_jpeg(name, image_id, opts = {}) click to toggle source

Extract document image in JPEG format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22509
def put_image_extract_as_jpeg(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_image_extract_as_jpeg_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_image_extract_as_jpeg_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
put_image_extract_as_jpeg_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in JPEG format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22533
def put_image_extract_as_jpeg_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_image_extract_as_jpeg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_image_extract_as_jpeg"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.put_image_extract_as_jpeg"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_image_extract_as_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_image_extract_as_png(name, image_id, opts = {}) click to toggle source

Extract document image in PNG format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22596
def put_image_extract_as_png(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_image_extract_as_png_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_image_extract_as_png_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
put_image_extract_as_png_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in PNG format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22620
def put_image_extract_as_png_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_image_extract_as_png ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_image_extract_as_png"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.put_image_extract_as_png"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_image_extract_as_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_image_extract_as_tiff(name, image_id, opts = {}) click to toggle source

Extract document image in TIFF format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22683
def put_image_extract_as_tiff(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_image_extract_as_tiff_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_image_extract_as_tiff_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
put_image_extract_as_tiff_with_http_info(name, image_id, opts = {}) click to toggle source

Extract document image in TIFF format to folder

@param name The document name. @param image_id Image ID. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22707
def put_image_extract_as_tiff_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_image_extract_as_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_image_extract_as_tiff"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.put_image_extract_as_tiff"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_image_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_image_in_storage_to_pdf(name, image_templates, opts = {}) click to toggle source

Convert image file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param image_templates ImageTemplatesRequestImage templates @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22767
def put_image_in_storage_to_pdf(name, image_templates, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_image_in_storage_to_pdf_with_http_info(name, image_templates, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_image_in_storage_to_pdf_with_http_info(name, image_templates, opts)
    else
      raise
    end
  return data
end
put_image_in_storage_to_pdf_with_http_info(name, image_templates, opts = {}) click to toggle source

Convert image file (located on storage) to PDF format and upload resulting file to storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22788
def put_image_in_storage_to_pdf_with_http_info(name, image_templates, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_image_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_image_in_storage_to_pdf"
  end
  # verify the required parameter 'image_templates' is set
  if @api_client.config.client_side_validation && image_templates.nil?
    fail ArgumentError, "Missing the required parameter 'image_templates' when calling PdfApi.put_image_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/images".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(image_templates)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_image_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_images_extract_as_gif(name, page_number, opts = {}) click to toggle source

Extract document images in GIF format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22847
def put_images_extract_as_gif(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_images_extract_as_gif_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_images_extract_as_gif_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
put_images_extract_as_gif_with_http_info(name, page_number, opts = {}) click to toggle source

Extract document images in GIF format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22871
def put_images_extract_as_gif_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_images_extract_as_gif ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_images_extract_as_gif"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_images_extract_as_gif"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_images_extract_as_jpeg(name, page_number, opts = {}) click to toggle source

Extract document images in JPEG format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22934
def put_images_extract_as_jpeg(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_images_extract_as_jpeg_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_images_extract_as_jpeg_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
put_images_extract_as_jpeg_with_http_info(name, page_number, opts = {}) click to toggle source

Extract document images in JPEG format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 22958
def put_images_extract_as_jpeg_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_images_extract_as_jpeg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_images_extract_as_jpeg"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_images_extract_as_jpeg"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_images_extract_as_png(name, page_number, opts = {}) click to toggle source

Extract document images in PNG format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23021
def put_images_extract_as_png(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_images_extract_as_png_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_images_extract_as_png_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
put_images_extract_as_png_with_http_info(name, page_number, opts = {}) click to toggle source

Extract document images in PNG format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23045
def put_images_extract_as_png_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_images_extract_as_png ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_images_extract_as_png"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_images_extract_as_png"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_images_extract_as_tiff(name, page_number, opts = {}) click to toggle source

Extract document images in TIFF format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23108
def put_images_extract_as_tiff(name, page_number, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_images_extract_as_tiff_with_http_info(name, page_number, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_images_extract_as_tiff_with_http_info(name, page_number, opts)
    else
      raise
    end
  return data
end
put_images_extract_as_tiff_with_http_info(name, page_number, opts = {}) click to toggle source

Extract document images in TIFF format to folder.

@param name The document name. @param page_number The page number. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :dest_folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23132
def put_images_extract_as_tiff_with_http_info(name, page_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_images_extract_as_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_images_extract_as_tiff"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_images_extract_as_tiff"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/images/extract/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'destFolder'] = opts[:'dest_folder'] if !opts[:'dest_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_images_extract_as_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_import_fields_from_fdf_in_storage(name, fdf_file_path, opts = {}) click to toggle source

Update fields from FDF file in storage.

@param name The document name. @param fdf_file_path The Fdf file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23192
def put_import_fields_from_fdf_in_storage(name, fdf_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts)
    else
      raise
    end
  return data
end
put_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts = {}) click to toggle source

Update fields from FDF file in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23213
def put_import_fields_from_fdf_in_storage_with_http_info(name, fdf_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_import_fields_from_fdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_import_fields_from_fdf_in_storage"
  end
  # verify the required parameter 'fdf_file_path' is set
  if @api_client.config.client_side_validation && fdf_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'fdf_file_path' when calling PdfApi.put_import_fields_from_fdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/fdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'fdfFilePath'] = fdf_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_import_fields_from_fdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_import_fields_from_xfdf_in_storage(name, xfdf_file_path, opts = {}) click to toggle source

Update fields from XFDF file in storage.

@param name The document name. @param xfdf_file_path The XFDF file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23271
def put_import_fields_from_xfdf_in_storage(name, xfdf_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts)
    else
      raise
    end
  return data
end
put_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts = {}) click to toggle source

Update fields from XFDF file in storage.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23292
def put_import_fields_from_xfdf_in_storage_with_http_info(name, xfdf_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_import_fields_from_xfdf_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_import_fields_from_xfdf_in_storage"
  end
  # verify the required parameter 'xfdf_file_path' is set
  if @api_client.config.client_side_validation && xfdf_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xfdf_file_path' when calling PdfApi.put_import_fields_from_xfdf_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xfdf".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xfdfFilePath'] = xfdf_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_import_fields_from_xfdf_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_import_fields_from_xml_in_storage(name, xml_file_path, opts = {}) click to toggle source

Update fields from XML file in storage.

@param name The document name. @param xml_file_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23350
def put_import_fields_from_xml_in_storage(name, xml_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts)
    else
      raise
    end
  return data
end
put_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts = {}) click to toggle source

Update fields from XML file in storage.

@param name The document name. @param xml_file_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23371
def put_import_fields_from_xml_in_storage_with_http_info(name, xml_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_import_fields_from_xml_in_storage ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_import_fields_from_xml_in_storage"
  end
  # verify the required parameter 'xml_file_path' is set
  if @api_client.config.client_side_validation && xml_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'xml_file_path' when calling PdfApi.put_import_fields_from_xml_in_storage"
  end
  # resource path
  local_var_path = "/pdf/{name}/import/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'xmlFilePath'] = xml_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_import_fields_from_xml_in_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_ink_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document ink annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [InkAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23430
def put_ink_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_ink_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_ink_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_ink_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document ink annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23452
def put_ink_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_ink_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_ink_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_ink_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_ink_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/ink/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'InkAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_ink_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_line_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document line annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [LineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23513
def put_line_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_line_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_line_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_line_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document line annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23535
def put_line_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_line_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_line_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_line_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_line_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/line/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_list_box_field(name, field_name, field, opts = {}) click to toggle source

Replace document listbox field

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ListBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23679
def put_list_box_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_list_box_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_list_box_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_list_box_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document listbox field

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23701
def put_list_box_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_list_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_list_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_list_box_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_list_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/listbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_list_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_markdown_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert MD file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.md) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :dst_folder The destination document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23761
def put_markdown_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_markdown_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_markdown_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_markdown_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert MD file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.md) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :dst_folder The destination document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23782
def put_markdown_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_markdown_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_markdown_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_markdown_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/markdown".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_markdown_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_merge_documents(name, merge_documents, opts = {}) click to toggle source

Merge a list of documents.

@param name Resulting document name. @param merge_documents MergeDocuments with a list of documents. @param [Hash] opts the optional parameters @option opts [String] :storage Resulting document storage. @option opts [String] :folder Resulting document folder. @return [DocumentResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23840
def put_merge_documents(name, merge_documents, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_merge_documents_with_http_info(name, merge_documents, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_merge_documents_with_http_info(name, merge_documents, opts)
    else
      raise
    end
  return data
end
put_merge_documents_with_http_info(name, merge_documents, opts = {}) click to toggle source

Merge a list of documents.

@param name Resulting document name. @param merge_documents MergeDocuments with a list of documents. @param [Hash] opts the optional parameters @option opts [String] :storage Resulting document storage. @option opts [String] :folder Resulting document folder. @return [Array<(DocumentResponse, Fixnum, Hash)>] DocumentResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23861
def put_merge_documents_with_http_info(name, merge_documents, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_merge_documents ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_merge_documents"
  end
  # verify the required parameter 'merge_documents' is set
  if @api_client.config.client_side_validation && merge_documents.nil?
    fail ArgumentError, "Missing the required parameter 'merge_documents' when calling PdfApi.put_merge_documents"
  end
  # resource path
  local_var_path = "/pdf/{name}/merge".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(merge_documents)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_merge_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_mht_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert MHT file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.mht) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23917
def put_mht_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_mht_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_mht_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_mht_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert MHT file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.mht) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23938
def put_mht_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_mht_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_mht_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_mht_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/mht".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_mht_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_movie_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document movie annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [MovieAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 23997
def put_movie_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_movie_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_movie_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_movie_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document movie annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24019
def put_movie_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_movie_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_movie_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_movie_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_movie_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/movie/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MovieAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_movie_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_add_stamp(name, page_number, stamp, opts = {}) click to toggle source

Add page stamp.

@param name The document name. @param page_number The page number. @param stamp Stamp with data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24080
def put_page_add_stamp(name, page_number, stamp, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_add_stamp_with_http_info(name, page_number, stamp, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_add_stamp_with_http_info(name, page_number, stamp, opts)
    else
      raise
    end
  return data
end
put_page_add_stamp_with_http_info(name, page_number, stamp, opts = {}) click to toggle source

Add page stamp.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24102
def put_page_add_stamp_with_http_info(name, page_number, stamp, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_add_stamp ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_add_stamp"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_add_stamp"
  end
  # verify the required parameter 'stamp' is set
  if @api_client.config.client_side_validation && stamp.nil?
    fail ArgumentError, "Missing the required parameter 'stamp' when calling PdfApi.put_page_add_stamp"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/stamp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(stamp)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_add_stamp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_bmp(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to bmp image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24166
def put_page_convert_to_bmp(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_bmp_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_bmp_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_bmp_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to bmp image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24191
def put_page_convert_to_bmp_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_bmp ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_bmp"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_bmp"
  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 PdfApi.put_page_convert_to_bmp"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/bmp".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_bmp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_emf(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to emf image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24260
def put_page_convert_to_emf(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_emf_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_emf_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_emf_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to emf image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24285
def put_page_convert_to_emf_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_emf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_emf"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_emf"
  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 PdfApi.put_page_convert_to_emf"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/emf".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_emf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_gif(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to gif image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24354
def put_page_convert_to_gif(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_gif_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_gif_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_gif_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to gif image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24379
def put_page_convert_to_gif_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_gif ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_gif"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_gif"
  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 PdfApi.put_page_convert_to_gif"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/gif".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_jpeg(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to Jpeg image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24448
def put_page_convert_to_jpeg(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_jpeg_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_jpeg_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_jpeg_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to Jpeg image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24473
def put_page_convert_to_jpeg_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_jpeg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_jpeg"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_jpeg"
  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 PdfApi.put_page_convert_to_jpeg"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/jpeg".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_jpeg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_png(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to png image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24542
def put_page_convert_to_png(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_png_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_png_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_png_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to png image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24567
def put_page_convert_to_png_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_png ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_png"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_png"
  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 PdfApi.put_page_convert_to_png"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/png".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_page_convert_to_tiff(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to Tiff image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. (default to 0) @option opts [Integer] :height The converted image height. (default to 0) @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24636
def put_page_convert_to_tiff(name, page_number, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_page_convert_to_tiff_with_http_info(name, page_number, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_page_convert_to_tiff_with_http_info(name, page_number, out_path, opts)
    else
      raise
    end
  return data
end
put_page_convert_to_tiff_with_http_info(name, page_number, out_path, opts = {}) click to toggle source

Convert document page to Tiff image and upload resulting file to storage.

@param name The document name. @param page_number The page number. @param out_path The out path of result image. @param [Hash] opts the optional parameters @option opts [Integer] :width The converted image width. @option opts [Integer] :height The converted image height. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24661
def put_page_convert_to_tiff_with_http_info(name, page_number, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_page_convert_to_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_page_convert_to_tiff"
  end
  # verify the required parameter 'page_number' is set
  if @api_client.config.client_side_validation && page_number.nil?
    fail ArgumentError, "Missing the required parameter 'page_number' when calling PdfApi.put_page_convert_to_tiff"
  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 PdfApi.put_page_convert_to_tiff"
  end
  # resource path
  local_var_path = "/pdf/{name}/pages/{pageNumber}/convert/tiff".sub('{' + 'name' + '}', name.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_page_convert_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pcl_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert PCL file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.pcl) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24726
def put_pcl_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pcl_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pcl_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_pcl_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert PCL file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.pcl) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24747
def put_pcl_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pcl_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pcl_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_pcl_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/pcl".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pcl_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_a_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.pdf) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [BOOLEAN] :dont_optimize If set, document resources will not be optimized. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24806
def put_pdf_a_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.pdf) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [BOOLEAN] :dont_optimize If set, document resources will not be optimized. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24828
def put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_a_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_a_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_pdf_a_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/pdfa".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'dontOptimize'] = opts[:'dont_optimize'] if !opts[:'dont_optimize'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_a_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_doc(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to DOC format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24895
def put_pdf_in_request_to_doc(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_doc_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_doc_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_doc_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to DOC format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24924
def put_pdf_in_request_to_doc_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_doc ..."
  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 PdfApi.put_pdf_in_request_to_doc"
  end
  if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
    fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
  end
  if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
    fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
  end
  # resource path
  local_var_path = "/pdf/convert/doc"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'addReturnToLineEnd'] = opts[:'add_return_to_line_end'] if !opts[:'add_return_to_line_end'].nil?
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
  query_params[:'imageResolutionX'] = opts[:'image_resolution_x'] if !opts[:'image_resolution_x'].nil?
  query_params[:'imageResolutionY'] = opts[:'image_resolution_y'] if !opts[:'image_resolution_y'].nil?
  query_params[:'maxDistanceBetweenTextLines'] = opts[:'max_distance_between_text_lines'] if !opts[:'max_distance_between_text_lines'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
  query_params[:'recognizeBullets'] = opts[:'recognize_bullets'] if !opts[:'recognize_bullets'].nil?
  query_params[:'relativeHorizontalProximity'] = opts[:'relative_horizontal_proximity'] if !opts[:'relative_horizontal_proximity'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_epub(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.epub) @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 24994
def put_pdf_in_request_to_epub(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_epub_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_epub_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_epub_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.epub) @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25015
def put_pdf_in_request_to_epub_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_epub ..."
  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 PdfApi.put_pdf_in_request_to_epub"
  end
  if @api_client.config.client_side_validation && opts[:'content_recognition_mode'] && !['Flow', 'PdfFlow', 'Fixed'].include?(opts[:'content_recognition_mode'])
    fail ArgumentError, 'invalid value for "content_recognition_mode", must be one of Flow, PdfFlow, Fixed'
  end
  # resource path
  local_var_path = "/pdf/convert/epub"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'contentRecognitionMode'] = opts[:'content_recognition_mode'] if !opts[:'content_recognition_mode'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_epub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_html(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to Html format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.html) @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is "Zip&quot; or missed (default). In case of the "Folder&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. (default to Zip) @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25103
def put_pdf_in_request_to_html(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_html_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_html_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_html_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to Html format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.html) @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is "Zip&quot; or missed (default). In case of the "Folder&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25153
def put_pdf_in_request_to_html_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_html ..."
  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 PdfApi.put_pdf_in_request_to_html"
  end
  if @api_client.config.client_side_validation && opts[:'document_type'] && !['Xhtml', 'Html5'].include?(opts[:'document_type'])
    fail ArgumentError, 'invalid value for "document_type", must be one of Xhtml, Html5'
  end
  if @api_client.config.client_side_validation && opts[:'antialiasing_processing'] && !['NoAdditionalProcessing', 'TryCorrectResultHtml'].include?(opts[:'antialiasing_processing'])
    fail ArgumentError, 'invalid value for "antialiasing_processing", must be one of NoAdditionalProcessing, TryCorrectResultHtml'
  end
  if @api_client.config.client_side_validation && opts[:'font_encoding_strategy'] && !['Default', 'DecreaseToUnicodePriorityLevel'].include?(opts[:'font_encoding_strategy'])
    fail ArgumentError, 'invalid value for "font_encoding_strategy", must be one of Default, DecreaseToUnicodePriorityLevel'
  end
  if @api_client.config.client_side_validation && opts[:'font_saving_mode'] && !['AlwaysSaveAsWOFF', 'AlwaysSaveAsTTF', 'AlwaysSaveAsEOT', 'SaveInAllFormats'].include?(opts[:'font_saving_mode'])
    fail ArgumentError, 'invalid value for "font_saving_mode", must be one of AlwaysSaveAsWOFF, AlwaysSaveAsTTF, AlwaysSaveAsEOT, SaveInAllFormats'
  end
  if @api_client.config.client_side_validation && opts[:'html_markup_generation_mode'] && !['WriteAllHtml', 'WriteOnlyBodyContent'].include?(opts[:'html_markup_generation_mode'])
    fail ArgumentError, 'invalid value for "html_markup_generation_mode", must be one of WriteAllHtml, WriteOnlyBodyContent'
  end
  if @api_client.config.client_side_validation && opts[:'letters_positioning_method'] && !['UseEmUnitsAndCompensationOfRoundingErrorsInCss', 'UsePixelUnitsInCssLetterSpacingForIE'].include?(opts[:'letters_positioning_method'])
    fail ArgumentError, 'invalid value for "letters_positioning_method", must be one of UseEmUnitsAndCompensationOfRoundingErrorsInCss, UsePixelUnitsInCssLetterSpacingForIE'
  end
  if @api_client.config.client_side_validation && opts[:'parts_embedding_mode'] && !['EmbedAllIntoHtml', 'EmbedCssOnly', 'NoEmbedding'].include?(opts[:'parts_embedding_mode'])
    fail ArgumentError, 'invalid value for "parts_embedding_mode", must be one of EmbedAllIntoHtml, EmbedCssOnly, NoEmbedding'
  end
  if @api_client.config.client_side_validation && opts[:'raster_images_saving_mode'] && !['AsPngImagesEmbeddedIntoSvg', 'AsExternalPngFilesReferencedViaSvg', 'AsEmbeddedPartsOfPngPageBackground'].include?(opts[:'raster_images_saving_mode'])
    fail ArgumentError, 'invalid value for "raster_images_saving_mode", must be one of AsPngImagesEmbeddedIntoSvg, AsExternalPngFilesReferencedViaSvg, AsEmbeddedPartsOfPngPageBackground'
  end
  if @api_client.config.client_side_validation && opts[:'output_format'] && !['Zip', 'Folder'].include?(opts[:'output_format'])
    fail ArgumentError, 'invalid value for "output_format", must be one of Zip, Folder'
  end
  # resource path
  local_var_path = "/pdf/convert/html"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'additionalMarginWidthInPoints'] = opts[:'additional_margin_width_in_points'] if !opts[:'additional_margin_width_in_points'].nil?
  query_params[:'compressSvgGraphicsIfAny'] = opts[:'compress_svg_graphics_if_any'] if !opts[:'compress_svg_graphics_if_any'].nil?
  query_params[:'convertMarkedContentToLayers'] = opts[:'convert_marked_content_to_layers'] if !opts[:'convert_marked_content_to_layers'].nil?
  query_params[:'defaultFontName'] = opts[:'default_font_name'] if !opts[:'default_font_name'].nil?
  query_params[:'documentType'] = opts[:'document_type'] if !opts[:'document_type'].nil?
  query_params[:'fixedLayout'] = opts[:'fixed_layout'] if !opts[:'fixed_layout'].nil?
  query_params[:'imageResolution'] = opts[:'image_resolution'] if !opts[:'image_resolution'].nil?
  query_params[:'minimalLineWidth'] = opts[:'minimal_line_width'] if !opts[:'minimal_line_width'].nil?
  query_params[:'preventGlyphsGrouping'] = opts[:'prevent_glyphs_grouping'] if !opts[:'prevent_glyphs_grouping'].nil?
  query_params[:'splitCssIntoPages'] = opts[:'split_css_into_pages'] if !opts[:'split_css_into_pages'].nil?
  query_params[:'splitIntoPages'] = opts[:'split_into_pages'] if !opts[:'split_into_pages'].nil?
  query_params[:'useZOrder'] = opts[:'use_z_order'] if !opts[:'use_z_order'].nil?
  query_params[:'antialiasingProcessing'] = opts[:'antialiasing_processing'] if !opts[:'antialiasing_processing'].nil?
  query_params[:'cssClassNamesPrefix'] = opts[:'css_class_names_prefix'] if !opts[:'css_class_names_prefix'].nil?
  query_params[:'explicitListOfSavedPages'] = @api_client.build_collection_param(opts[:'explicit_list_of_saved_pages'], :multi) if !opts[:'explicit_list_of_saved_pages'].nil?
  query_params[:'fontEncodingStrategy'] = opts[:'font_encoding_strategy'] if !opts[:'font_encoding_strategy'].nil?
  query_params[:'fontSavingMode'] = opts[:'font_saving_mode'] if !opts[:'font_saving_mode'].nil?
  query_params[:'htmlMarkupGenerationMode'] = opts[:'html_markup_generation_mode'] if !opts[:'html_markup_generation_mode'].nil?
  query_params[:'lettersPositioningMethod'] = opts[:'letters_positioning_method'] if !opts[:'letters_positioning_method'].nil?
  query_params[:'pagesFlowTypeDependsOnViewersScreenSize'] = opts[:'pages_flow_type_depends_on_viewers_screen_size'] if !opts[:'pages_flow_type_depends_on_viewers_screen_size'].nil?
  query_params[:'partsEmbeddingMode'] = opts[:'parts_embedding_mode'] if !opts[:'parts_embedding_mode'].nil?
  query_params[:'rasterImagesSavingMode'] = opts[:'raster_images_saving_mode'] if !opts[:'raster_images_saving_mode'].nil?
  query_params[:'removeEmptyAreasOnTopAndBottom'] = opts[:'remove_empty_areas_on_top_and_bottom'] if !opts[:'remove_empty_areas_on_top_and_bottom'].nil?
  query_params[:'saveShadowedTextsAsTransparentTexts'] = opts[:'save_shadowed_texts_as_transparent_texts'] if !opts[:'save_shadowed_texts_as_transparent_texts'].nil?
  query_params[:'saveTransparentTexts'] = opts[:'save_transparent_texts'] if !opts[:'save_transparent_texts'].nil?
  query_params[:'specialFolderForAllImages'] = opts[:'special_folder_for_all_images'] if !opts[:'special_folder_for_all_images'].nil?
  query_params[:'specialFolderForSvgImages'] = opts[:'special_folder_for_svg_images'] if !opts[:'special_folder_for_svg_images'].nil?
  query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'flowLayoutParagraphFullWidth'] = opts[:'flow_layout_paragraph_full_width'] if !opts[:'flow_layout_paragraph_full_width'].nil?
  query_params[:'outputFormat'] = opts[:'output_format'] if !opts[:'output_format'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_mobi_xml(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to MOBIXML format and uploads resulting ZIP archive file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.mobixml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25264
def put_pdf_in_request_to_mobi_xml(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_mobi_xml_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_mobi_xml_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_mobi_xml_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to MOBIXML format and uploads resulting ZIP archive file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.mobixml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25284
def put_pdf_in_request_to_mobi_xml_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_mobi_xml ..."
  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 PdfApi.put_pdf_in_request_to_mobi_xml"
  end
  # resource path
  local_var_path = "/pdf/convert/mobixml"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_mobi_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_pdf_a(out_path, type, opts = {}) click to toggle source

Converts PDF document (in request content) to PdfA format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param type Type of PdfA format. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25340
def put_pdf_in_request_to_pdf_a(out_path, type, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_pdf_a_with_http_info(out_path, type, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_pdf_a_with_http_info(out_path, type, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_pdf_a_with_http_info(out_path, type, opts = {}) click to toggle source

Converts PDF document (in request content) to PdfA format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param type Type of PdfA format. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25362
def put_pdf_in_request_to_pdf_a_with_http_info(out_path, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_pdf_a ..."
  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 PdfApi.put_pdf_in_request_to_pdf_a"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.put_pdf_in_request_to_pdf_a"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
    fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
  end
  # resource path
  local_var_path = "/pdf/convert/pdfa"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'type'] = type
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_pptx(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pptx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25429
def put_pdf_in_request_to_pptx(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_pptx_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_pptx_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_pptx_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pptx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25452
def put_pdf_in_request_to_pptx_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_pptx ..."
  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 PdfApi.put_pdf_in_request_to_pptx"
  end
  # resource path
  local_var_path = "/pdf/convert/pptx"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'separateImages'] = opts[:'separate_images'] if !opts[:'separate_images'].nil?
  query_params[:'slidesAsImages'] = opts[:'slides_as_images'] if !opts[:'slides_as_images'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_svg(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to SVG format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.svg) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25510
def put_pdf_in_request_to_svg(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_svg_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_svg_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_svg_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to SVG format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.svg) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25531
def put_pdf_in_request_to_svg_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_svg ..."
  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 PdfApi.put_pdf_in_request_to_svg"
  end
  # resource path
  local_var_path = "/pdf/convert/svg"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_te_x(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to TeX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.tex) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25586
def put_pdf_in_request_to_te_x(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_te_x_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_te_x_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_te_x_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to TeX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.tex) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25606
def put_pdf_in_request_to_te_x_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_te_x ..."
  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 PdfApi.put_pdf_in_request_to_te_x"
  end
  # resource path
  local_var_path = "/pdf/convert/tex"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_te_x\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_tiff(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to TIFF format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.tiff) @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25675
def put_pdf_in_request_to_tiff(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_tiff_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_tiff_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_tiff_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to TIFF format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.tiff) @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25710
def put_pdf_in_request_to_tiff_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_tiff ..."
  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 PdfApi.put_pdf_in_request_to_tiff"
  end
  if @api_client.config.client_side_validation && opts[:'compression'] && !['LZW', 'CCITT4', 'CCITT3', 'RLE', 'None'].include?(opts[:'compression'])
    fail ArgumentError, 'invalid value for "compression", must be one of LZW, CCITT4, CCITT3, RLE, None'
  end
  if @api_client.config.client_side_validation && opts[:'color_depth'] && !['Default', 'Format8bpp', 'Format4bpp', 'Format1bpp'].include?(opts[:'color_depth'])
    fail ArgumentError, 'invalid value for "color_depth", must be one of Default, Format8bpp, Format4bpp, Format1bpp'
  end
  if @api_client.config.client_side_validation && opts[:'orientation'] && !['None', 'Landscape', 'Portrait'].include?(opts[:'orientation'])
    fail ArgumentError, 'invalid value for "orientation", must be one of None, Landscape, Portrait'
  end
  # resource path
  local_var_path = "/pdf/convert/tiff"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'brightness'] = opts[:'brightness'] if !opts[:'brightness'].nil?
  query_params[:'compression'] = opts[:'compression'] if !opts[:'compression'].nil?
  query_params[:'colorDepth'] = opts[:'color_depth'] if !opts[:'color_depth'].nil?
  query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
  query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
  query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
  query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
  query_params[:'orientation'] = opts[:'orientation'] if !opts[:'orientation'].nil?
  query_params[:'skipBlankPages'] = opts[:'skip_blank_pages'] if !opts[:'skip_blank_pages'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil?
  query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].nil?
  query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_xls(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XLS format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xls) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25793
def put_pdf_in_request_to_xls(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_xls_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_xls_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_xls_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XLS format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xls) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25818
def put_pdf_in_request_to_xls_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_xls ..."
  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 PdfApi.put_pdf_in_request_to_xls"
  end
  # resource path
  local_var_path = "/pdf/convert/xls"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_xlsx(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xlsx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25882
def put_pdf_in_request_to_xlsx(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_xlsx_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_xlsx_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_xlsx_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xlsx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25907
def put_pdf_in_request_to_xlsx_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_xlsx ..."
  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 PdfApi.put_pdf_in_request_to_xlsx"
  end
  # resource path
  local_var_path = "/pdf/convert/xlsx"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_xml(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XML format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25966
def put_pdf_in_request_to_xml(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_xml_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_xml_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_xml_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XML format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xml) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 25986
def put_pdf_in_request_to_xml_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_request_to_xml ..."
  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 PdfApi.put_pdf_in_request_to_xml"
  end
  # resource path
  local_var_path = "/pdf/convert/xml"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_request_to_xps(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XPS format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26040
def put_pdf_in_request_to_xps(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_request_to_xps_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_request_to_xps_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_request_to_xps_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document (in request content) to XPS format and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26060
def put_pdf_in_request_to_xps_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_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 PdfApi.put_pdf_in_request_to_xps"
  end
  # resource path
  local_var_path = "/pdf/convert/xps"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_request_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_doc(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26124
def put_pdf_in_storage_to_doc(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_doc_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_doc_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_doc_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to DOC format and uploads resulting file to storage.

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.doc) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :add_return_to_line_end Add return to line end. @option opts [String] :format Allows to specify .doc or .docx file format. @option opts [Integer] :image_resolution_x Image resolution X. @option opts [Integer] :image_resolution_y Image resolution Y. @option opts [Float] :max_distance_between_text_lines Max distance between text lines. @option opts [String] :mode Allows to control how a PDF document is converted into a word processing document. @option opts [BOOLEAN] :recognize_bullets Recognize bullets. @option opts [Float] :relative_horizontal_proximity Relative horizontal proximity. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26154
def put_pdf_in_storage_to_doc_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_doc ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_doc"
  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 PdfApi.put_pdf_in_storage_to_doc"
  end
  if @api_client.config.client_side_validation && opts[:'format'] && !['Doc', 'DocX'].include?(opts[:'format'])
    fail ArgumentError, 'invalid value for "format", must be one of Doc, DocX'
  end
  if @api_client.config.client_side_validation && opts[:'mode'] && !['Textbox', 'Flow'].include?(opts[:'mode'])
    fail ArgumentError, 'invalid value for "mode", must be one of Textbox, Flow'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/doc".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'addReturnToLineEnd'] = opts[:'add_return_to_line_end'] if !opts[:'add_return_to_line_end'].nil?
  query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
  query_params[:'imageResolutionX'] = opts[:'image_resolution_x'] if !opts[:'image_resolution_x'].nil?
  query_params[:'imageResolutionY'] = opts[:'image_resolution_y'] if !opts[:'image_resolution_y'].nil?
  query_params[:'maxDistanceBetweenTextLines'] = opts[:'max_distance_between_text_lines'] if !opts[:'max_distance_between_text_lines'].nil?
  query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
  query_params[:'recognizeBullets'] = opts[:'recognize_bullets'] if !opts[:'recognize_bullets'].nil?
  query_params[:'relativeHorizontalProximity'] = opts[:'relative_horizontal_proximity'] if !opts[:'relative_horizontal_proximity'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_epub(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.epub) @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26228
def put_pdf_in_storage_to_epub(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_epub_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_epub_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_epub_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to EPUB format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.epub) @param [Hash] opts the optional parameters @option opts [String] :content_recognition_mode Property tunes conversion for this or that desirable method of recognition of content. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26250
def put_pdf_in_storage_to_epub_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_epub ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_epub"
  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 PdfApi.put_pdf_in_storage_to_epub"
  end
  if @api_client.config.client_side_validation && opts[:'content_recognition_mode'] && !['Flow', 'PdfFlow', 'Fixed'].include?(opts[:'content_recognition_mode'])
    fail ArgumentError, 'invalid value for "content_recognition_mode", must be one of Flow, PdfFlow, Fixed'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/epub".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'contentRecognitionMode'] = opts[:'content_recognition_mode'] if !opts[:'content_recognition_mode'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_epub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_html(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to Html format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.html) @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is "Zip&quot; or missed (default). In case of the "Folder&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. (default to Zip) @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26342
def put_pdf_in_storage_to_html(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_html_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_html_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_html_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to Html format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.html) @param [Hash] opts the optional parameters @option opts [Integer] :additional_margin_width_in_points Defines width of margin that will be forcibly left around that output HTML-areas. @option opts [BOOLEAN] :compress_svg_graphics_if_any The flag that indicates whether found SVG graphics(if any) will be compressed(zipped) into SVGZ format during saving. @option opts [BOOLEAN] :convert_marked_content_to_layers If attribute ConvertMarkedContentToLayers set to true then an all elements inside a PDF marked content (layer) will be put into an HTML div with "data-pdflayer&quot; attribute specifying a layer name. This layer name will be extracted from optional properties of PDF marked content. If this attribute is false (by default) then no any layers will be created from PDF marked content. @option opts [String] :default_font_name Specifies the name of an installed font which is used to substitute any document font that is not embedded and not installed in the system. If null then default substitution font is used. @option opts [String] :document_type Result document type. @option opts [BOOLEAN] :fixed_layout The value indicating whether that HTML is created as fixed layout. @option opts [Integer] :image_resolution Resolution for image rendering. @option opts [Integer] :minimal_line_width This attribute sets minimal width of graphic path line. If thickness of line is less than 1px Adobe Acrobat rounds it to this value. So this attribute can be used to emulate this behavior for HTML browsers. @option opts [BOOLEAN] :prevent_glyphs_grouping This attribute switch on the mode when text glyphs will not be grouped into words and strings This mode allows to keep maximum precision during positioning of glyphs on the page and it can be used for conversion documents with music notes or glyphs that should be placed separately each other. This parameter will be applied to document only when the value of FixedLayout attribute is true. @option opts [BOOLEAN] :split_css_into_pages When multipage-mode selected(i.e &#39;SplitIntoPages&#39; is &#39;true&#39;), then this attribute defines whether should be created separate CSS-file for each result HTML page. @option opts [BOOLEAN] :split_into_pages The flag that indicates whether each page of source document will be converted into it&#39;s own target HTML document, i.e whether result HTML will be splitted into several HTML-pages. @option opts [BOOLEAN] :use_z_order If attribute UseZORder set to true, graphics and text are added to resultant HTML document accordingly Z-order in original PDF document. If this attribute is false all graphics is put as single layer which may cause some unnecessary effects for overlapped objects. @option opts [String] :antialiasing_processing The parameter defines required antialiasing measures during conversion of compound background images from PDF to HTML. @option opts [String] :css_class_names_prefix When PDFtoHTML converter generates result CSSs, CSS class names (something like ".stl_01 {}&quot; … ".stl_NN {}) are generated and used in result CSS. This property allows forcibly set class name prefix. @option opts [Array<Integer>] :explicit_list_of_saved_pages With this property You can explicitely define what pages of document should be converted. Pages in this list must have 1-based numbers. I.e. valid numbers of pages must be taken from range (1…) Order of appearing of pages in this list does not affect their order in result HTML page(s) - in result pages allways will go in order in which they are present in source PDF. @option opts [String] :font_encoding_strategy Defines encoding special rule to tune PDF decoding for current document. @option opts [String] :font_saving_mode Defines font saving mode that will be used during saving of PDF to desirable format. @option opts [String] :html_markup_generation_mode Sometimes specific reqirments to generation of HTML markup are present. This parameter defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments. @option opts [String] :letters_positioning_method The mode of positioning of letters in words in result HTML. @option opts [BOOLEAN] :pages_flow_type_depends_on_viewers_screen_size If attribute &#39;SplitOnPages&#x3D;false&#39;, than whole HTML representing all input PDF pages will be put into one big result HTML file. This flag defines whether result HTML will be generated in such way that flow of areas that represent PDF pages in result HTML will depend on screen resolution of viewer. @option opts [String] :parts_embedding_mode It defines whether referenced files (HTML, Fonts,Images, CSSes) will be embedded into main HTML file or will be generated as apart binary entities. @option opts [String] :raster_images_saving_mode Converted PDF can contain raster images This parameter defines how they should be handled during conversion of PDF to HTML. @option opts [BOOLEAN] :remove_empty_areas_on_top_and_bottom Defines whether in created HTML will be removed top and bottom empty area without any content (if any). @option opts [BOOLEAN] :save_shadowed_texts_as_transparent_texts Pdf can contain texts that are shadowed by another elements (f.e. by images) but can be selected to clipboard in Acrobat Reader (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML to mimic behaviour of Acrobat Reader (othervise such texts are usually saved as hidden, not available for copying to clipboard). @option opts [BOOLEAN] :save_transparent_texts Pdf can contain transparent texts that can be selected to clipboard (usually it happen when document contains images and OCRed texts extracted from it). This settings tells to converter whether we need save such texts as transparent selectable texts in result HTML. @option opts [String] :special_folder_for_all_images The path to directory to which must be saved any images if they are encountered during saving of document as HTML. If parameter is empty or null then image files(if any) wil be saved together with other files linked to HTML It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [String] :special_folder_for_svg_images The path to directory to which must be saved only SVG-images if they are encountered during saving of document as HTML. If parameter is empty or null then SVG files(if any) wil be saved together with other image-files (near to output file) or in special folder for images (if it specified in SpecialImagesFolderIfAny option). It does not affect anything if CustomImageSavingStrategy property was successfully used to process relevant image file. @option opts [BOOLEAN] :try_save_text_underlining_and_strikeouting_in_css PDF itself does not contain underlining markers for texts. It emulated with line situated under text. This option allows converter try guess that this or that line is a text&#39;s underlining and put this info into CSS instead of drawing of underlining graphically. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [BOOLEAN] :flow_layout_paragraph_full_width This attribute specifies full width paragraph text for Flow mode, FixedLayout &#x3D; false. @option opts [String] :output_format This parameter determines the type of result. The zip archive will be uploaded into the storage if the parameter is "Zip&quot; or missed (default). In case of the "Folder&quot;, all resulting files and directories will be uploaded to the folder of the resulting HTML file. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26393
def put_pdf_in_storage_to_html_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_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 PdfApi.put_pdf_in_storage_to_html"
  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 PdfApi.put_pdf_in_storage_to_html"
  end
  if @api_client.config.client_side_validation && opts[:'document_type'] && !['Xhtml', 'Html5'].include?(opts[:'document_type'])
    fail ArgumentError, 'invalid value for "document_type", must be one of Xhtml, Html5'
  end
  if @api_client.config.client_side_validation && opts[:'antialiasing_processing'] && !['NoAdditionalProcessing', 'TryCorrectResultHtml'].include?(opts[:'antialiasing_processing'])
    fail ArgumentError, 'invalid value for "antialiasing_processing", must be one of NoAdditionalProcessing, TryCorrectResultHtml'
  end
  if @api_client.config.client_side_validation && opts[:'font_encoding_strategy'] && !['Default', 'DecreaseToUnicodePriorityLevel'].include?(opts[:'font_encoding_strategy'])
    fail ArgumentError, 'invalid value for "font_encoding_strategy", must be one of Default, DecreaseToUnicodePriorityLevel'
  end
  if @api_client.config.client_side_validation && opts[:'font_saving_mode'] && !['AlwaysSaveAsWOFF', 'AlwaysSaveAsTTF', 'AlwaysSaveAsEOT', 'SaveInAllFormats'].include?(opts[:'font_saving_mode'])
    fail ArgumentError, 'invalid value for "font_saving_mode", must be one of AlwaysSaveAsWOFF, AlwaysSaveAsTTF, AlwaysSaveAsEOT, SaveInAllFormats'
  end
  if @api_client.config.client_side_validation && opts[:'html_markup_generation_mode'] && !['WriteAllHtml', 'WriteOnlyBodyContent'].include?(opts[:'html_markup_generation_mode'])
    fail ArgumentError, 'invalid value for "html_markup_generation_mode", must be one of WriteAllHtml, WriteOnlyBodyContent'
  end
  if @api_client.config.client_side_validation && opts[:'letters_positioning_method'] && !['UseEmUnitsAndCompensationOfRoundingErrorsInCss', 'UsePixelUnitsInCssLetterSpacingForIE'].include?(opts[:'letters_positioning_method'])
    fail ArgumentError, 'invalid value for "letters_positioning_method", must be one of UseEmUnitsAndCompensationOfRoundingErrorsInCss, UsePixelUnitsInCssLetterSpacingForIE'
  end
  if @api_client.config.client_side_validation && opts[:'parts_embedding_mode'] && !['EmbedAllIntoHtml', 'EmbedCssOnly', 'NoEmbedding'].include?(opts[:'parts_embedding_mode'])
    fail ArgumentError, 'invalid value for "parts_embedding_mode", must be one of EmbedAllIntoHtml, EmbedCssOnly, NoEmbedding'
  end
  if @api_client.config.client_side_validation && opts[:'raster_images_saving_mode'] && !['AsPngImagesEmbeddedIntoSvg', 'AsExternalPngFilesReferencedViaSvg', 'AsEmbeddedPartsOfPngPageBackground'].include?(opts[:'raster_images_saving_mode'])
    fail ArgumentError, 'invalid value for "raster_images_saving_mode", must be one of AsPngImagesEmbeddedIntoSvg, AsExternalPngFilesReferencedViaSvg, AsEmbeddedPartsOfPngPageBackground'
  end
  if @api_client.config.client_side_validation && opts[:'output_format'] && !['Zip', 'Folder'].include?(opts[:'output_format'])
    fail ArgumentError, 'invalid value for "output_format", must be one of Zip, Folder'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/html".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'additionalMarginWidthInPoints'] = opts[:'additional_margin_width_in_points'] if !opts[:'additional_margin_width_in_points'].nil?
  query_params[:'compressSvgGraphicsIfAny'] = opts[:'compress_svg_graphics_if_any'] if !opts[:'compress_svg_graphics_if_any'].nil?
  query_params[:'convertMarkedContentToLayers'] = opts[:'convert_marked_content_to_layers'] if !opts[:'convert_marked_content_to_layers'].nil?
  query_params[:'defaultFontName'] = opts[:'default_font_name'] if !opts[:'default_font_name'].nil?
  query_params[:'documentType'] = opts[:'document_type'] if !opts[:'document_type'].nil?
  query_params[:'fixedLayout'] = opts[:'fixed_layout'] if !opts[:'fixed_layout'].nil?
  query_params[:'imageResolution'] = opts[:'image_resolution'] if !opts[:'image_resolution'].nil?
  query_params[:'minimalLineWidth'] = opts[:'minimal_line_width'] if !opts[:'minimal_line_width'].nil?
  query_params[:'preventGlyphsGrouping'] = opts[:'prevent_glyphs_grouping'] if !opts[:'prevent_glyphs_grouping'].nil?
  query_params[:'splitCssIntoPages'] = opts[:'split_css_into_pages'] if !opts[:'split_css_into_pages'].nil?
  query_params[:'splitIntoPages'] = opts[:'split_into_pages'] if !opts[:'split_into_pages'].nil?
  query_params[:'useZOrder'] = opts[:'use_z_order'] if !opts[:'use_z_order'].nil?
  query_params[:'antialiasingProcessing'] = opts[:'antialiasing_processing'] if !opts[:'antialiasing_processing'].nil?
  query_params[:'cssClassNamesPrefix'] = opts[:'css_class_names_prefix'] if !opts[:'css_class_names_prefix'].nil?
  query_params[:'explicitListOfSavedPages'] = @api_client.build_collection_param(opts[:'explicit_list_of_saved_pages'], :multi) if !opts[:'explicit_list_of_saved_pages'].nil?
  query_params[:'fontEncodingStrategy'] = opts[:'font_encoding_strategy'] if !opts[:'font_encoding_strategy'].nil?
  query_params[:'fontSavingMode'] = opts[:'font_saving_mode'] if !opts[:'font_saving_mode'].nil?
  query_params[:'htmlMarkupGenerationMode'] = opts[:'html_markup_generation_mode'] if !opts[:'html_markup_generation_mode'].nil?
  query_params[:'lettersPositioningMethod'] = opts[:'letters_positioning_method'] if !opts[:'letters_positioning_method'].nil?
  query_params[:'pagesFlowTypeDependsOnViewersScreenSize'] = opts[:'pages_flow_type_depends_on_viewers_screen_size'] if !opts[:'pages_flow_type_depends_on_viewers_screen_size'].nil?
  query_params[:'partsEmbeddingMode'] = opts[:'parts_embedding_mode'] if !opts[:'parts_embedding_mode'].nil?
  query_params[:'rasterImagesSavingMode'] = opts[:'raster_images_saving_mode'] if !opts[:'raster_images_saving_mode'].nil?
  query_params[:'removeEmptyAreasOnTopAndBottom'] = opts[:'remove_empty_areas_on_top_and_bottom'] if !opts[:'remove_empty_areas_on_top_and_bottom'].nil?
  query_params[:'saveShadowedTextsAsTransparentTexts'] = opts[:'save_shadowed_texts_as_transparent_texts'] if !opts[:'save_shadowed_texts_as_transparent_texts'].nil?
  query_params[:'saveTransparentTexts'] = opts[:'save_transparent_texts'] if !opts[:'save_transparent_texts'].nil?
  query_params[:'specialFolderForAllImages'] = opts[:'special_folder_for_all_images'] if !opts[:'special_folder_for_all_images'].nil?
  query_params[:'specialFolderForSvgImages'] = opts[:'special_folder_for_svg_images'] if !opts[:'special_folder_for_svg_images'].nil?
  query_params[:'trySaveTextUnderliningAndStrikeoutingInCss'] = opts[:'try_save_text_underlining_and_strikeouting_in_css'] if !opts[:'try_save_text_underlining_and_strikeouting_in_css'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'flowLayoutParagraphFullWidth'] = opts[:'flow_layout_paragraph_full_width'] if !opts[:'flow_layout_paragraph_full_width'].nil?
  query_params[:'outputFormat'] = opts[:'output_format'] if !opts[:'output_format'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_mobi_xml(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to MOBIXML format and uploads resulting ZIP archive file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.mobixml) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26508
def put_pdf_in_storage_to_mobi_xml(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_mobi_xml_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_mobi_xml_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_mobi_xml_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to MOBIXML format and uploads resulting ZIP archive file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.mobixml) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26529
def put_pdf_in_storage_to_mobi_xml_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_mobi_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_mobi_xml"
  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 PdfApi.put_pdf_in_storage_to_mobi_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/mobixml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_mobi_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_pdf_a(name, out_path, type, opts = {}) click to toggle source

Converts PDF document (located on storage) to PdfA format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param type Type of PdfA format. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26589
def put_pdf_in_storage_to_pdf_a(name, out_path, type, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_pdf_a_with_http_info(name, out_path, type, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_pdf_a_with_http_info(name, out_path, type, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_pdf_a_with_http_info(name, out_path, type, opts = {}) click to toggle source

Converts PDF document (located on storage) to PdfA format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param type Type of PdfA format. @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26612
def put_pdf_in_storage_to_pdf_a_with_http_info(name, out_path, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_pdf_a ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_pdf_a"
  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 PdfApi.put_pdf_in_storage_to_pdf_a"
  end
  # verify the required parameter 'type' is set
  if @api_client.config.client_side_validation && type.nil?
    fail ArgumentError, "Missing the required parameter 'type' when calling PdfApi.put_pdf_in_storage_to_pdf_a"
  end
  # verify enum value
  if @api_client.config.client_side_validation && !['PDFA1A', 'PDFA1B', 'PDFA3A'].include?(type)
    fail ArgumentError, "invalid value for 'type', must be one of PDFA1A, PDFA1B, PDFA3A"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/pdfa".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'type'] = type
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_pptx(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pptx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26683
def put_pdf_in_storage_to_pptx(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_pptx_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_pptx_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_pptx_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pptx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :separate_images Separate images. @option opts [BOOLEAN] :slides_as_images Slides as images. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password Base64 encoded password. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26707
def put_pdf_in_storage_to_pptx_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_pptx ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_pptx"
  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 PdfApi.put_pdf_in_storage_to_pptx"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/pptx".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'separateImages'] = opts[:'separate_images'] if !opts[:'separate_images'].nil?
  query_params[:'slidesAsImages'] = opts[:'slides_as_images'] if !opts[:'slides_as_images'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_svg(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to SVG format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.svg) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26769
def put_pdf_in_storage_to_svg(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_svg_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_svg_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_svg_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to SVG format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.svg) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26791
def put_pdf_in_storage_to_svg_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_svg ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_svg"
  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 PdfApi.put_pdf_in_storage_to_svg"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/svg".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_svg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_te_x(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to TeX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.tex) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26850
def put_pdf_in_storage_to_te_x(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_te_x_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_te_x_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_te_x_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to TeX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.tex) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26871
def put_pdf_in_storage_to_te_x_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_te_x ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_te_x"
  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 PdfApi.put_pdf_in_storage_to_te_x"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/tex".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_te_x\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_tiff(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to TIFF format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.tiff) @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26944
def put_pdf_in_storage_to_tiff(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_tiff_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_tiff_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_tiff_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to TIFF format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.tiff) @param [Hash] opts the optional parameters @option opts [Float] :brightness Image brightness. @option opts [String] :compression Tiff compression. Possible values are: LZW, CCITT4, CCITT3, RLE, None. @option opts [String] :color_depth Image color depth. Possible valuse are: Default, Format8bpp, Format4bpp, Format1bpp. @option opts [Integer] :left_margin Left image margin. @option opts [Integer] :right_margin Right image margin. @option opts [Integer] :top_margin Top image margin. @option opts [Integer] :bottom_margin Bottom image margin. @option opts [String] :orientation Image orientation. Possible values are: None, Landscape, Portait. @option opts [BOOLEAN] :skip_blank_pages Skip blank pages flag. @option opts [Integer] :width Image width. @option opts [Integer] :height Image height. @option opts [Integer] :x_resolution Horizontal resolution. @option opts [Integer] :y_resolution Vertical resolution. @option opts [Integer] :page_index Start page to export. @option opts [Integer] :page_count Number of pages to export. @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 26980
def put_pdf_in_storage_to_tiff_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_tiff ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_tiff"
  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 PdfApi.put_pdf_in_storage_to_tiff"
  end
  if @api_client.config.client_side_validation && opts[:'compression'] && !['LZW', 'CCITT4', 'CCITT3', 'RLE', 'None'].include?(opts[:'compression'])
    fail ArgumentError, 'invalid value for "compression", must be one of LZW, CCITT4, CCITT3, RLE, None'
  end
  if @api_client.config.client_side_validation && opts[:'color_depth'] && !['Default', 'Format8bpp', 'Format4bpp', 'Format1bpp'].include?(opts[:'color_depth'])
    fail ArgumentError, 'invalid value for "color_depth", must be one of Default, Format8bpp, Format4bpp, Format1bpp'
  end
  if @api_client.config.client_side_validation && opts[:'orientation'] && !['None', 'Landscape', 'Portrait'].include?(opts[:'orientation'])
    fail ArgumentError, 'invalid value for "orientation", must be one of None, Landscape, Portrait'
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/tiff".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'brightness'] = opts[:'brightness'] if !opts[:'brightness'].nil?
  query_params[:'compression'] = opts[:'compression'] if !opts[:'compression'].nil?
  query_params[:'colorDepth'] = opts[:'color_depth'] if !opts[:'color_depth'].nil?
  query_params[:'leftMargin'] = opts[:'left_margin'] if !opts[:'left_margin'].nil?
  query_params[:'rightMargin'] = opts[:'right_margin'] if !opts[:'right_margin'].nil?
  query_params[:'topMargin'] = opts[:'top_margin'] if !opts[:'top_margin'].nil?
  query_params[:'bottomMargin'] = opts[:'bottom_margin'] if !opts[:'bottom_margin'].nil?
  query_params[:'orientation'] = opts[:'orientation'] if !opts[:'orientation'].nil?
  query_params[:'skipBlankPages'] = opts[:'skip_blank_pages'] if !opts[:'skip_blank_pages'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'xResolution'] = opts[:'x_resolution'] if !opts[:'x_resolution'].nil?
  query_params[:'yResolution'] = opts[:'y_resolution'] if !opts[:'y_resolution'].nil?
  query_params[:'pageIndex'] = opts[:'page_index'] if !opts[:'page_index'].nil?
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_tiff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_xls(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLS format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xls) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27067
def put_pdf_in_storage_to_xls(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_xls_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_xls_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_xls_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLS format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xls) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27093
def put_pdf_in_storage_to_xls_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_xls ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_xls"
  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 PdfApi.put_pdf_in_storage_to_xls"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xls".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_xlsx(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xlsx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27161
def put_pdf_in_storage_to_xlsx(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_xlsx_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_xlsx_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_xlsx_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xlsx) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :insert_blank_column_at_first Insert blank column at first @option opts [BOOLEAN] :minimize_the_number_of_worksheets Minimize the number of worksheets @option opts [Float] :scale_factor Scale factor (Obsolete) @option opts [BOOLEAN] :uniform_worksheets Uniform worksheets @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @option opts [String] :password The password (Base64). @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27187
def put_pdf_in_storage_to_xlsx_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_xlsx ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_xlsx"
  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 PdfApi.put_pdf_in_storage_to_xlsx"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xlsx".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'insertBlankColumnAtFirst'] = opts[:'insert_blank_column_at_first'] if !opts[:'insert_blank_column_at_first'].nil?
  query_params[:'minimizeTheNumberOfWorksheets'] = opts[:'minimize_the_number_of_worksheets'] if !opts[:'minimize_the_number_of_worksheets'].nil?
  query_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?
  query_params[:'uniformWorksheets'] = opts[:'uniform_worksheets'] if !opts[:'uniform_worksheets'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_xml(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XML format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xml) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27250
def put_pdf_in_storage_to_xml(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_xml_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_xml_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_xml_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XML format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xml) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27271
def put_pdf_in_storage_to_xml_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_xml ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_to_xml"
  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 PdfApi.put_pdf_in_storage_to_xml"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_pdf_in_storage_to_xps(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XPS format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27329
def put_pdf_in_storage_to_xps(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_pdf_in_storage_to_xps_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_pdf_in_storage_to_xps_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_pdf_in_storage_to_xps_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document (located on storage) to XPS format and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.xps) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27350
def put_pdf_in_storage_to_xps_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_pdf_in_storage_to_xps ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_pdf_in_storage_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 PdfApi.put_pdf_in_storage_to_xps"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_pdf_in_storage_to_xps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_poly_line_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document polyline annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolyLineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27409
def put_poly_line_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document polyline annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27431
def put_poly_line_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_poly_line_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_poly_line_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_poly_line_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_poly_line_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polyline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolyLineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_poly_line_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_polygon_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document polygon annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PolygonAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27492
def put_polygon_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document polygon annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27514
def put_polygon_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_polygon_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_polygon_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_polygon_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_polygon_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/polygon/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PolygonAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_polygon_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_popup_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document popup annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [PopupAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27575
def put_popup_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_popup_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_popup_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_popup_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document popup annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27597
def put_popup_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_popup_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_popup_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_popup_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_popup_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/popup/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PopupAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_popup_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_privileges(name, privileges, opts = {}) click to toggle source

Update privilege document.

@param name The document name. @param privileges Document privileges. DocumentPrivilege @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27657
def put_privileges(name, privileges, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_privileges_with_http_info(name, privileges, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_privileges_with_http_info(name, privileges, opts)
    else
      raise
    end
  return data
end
put_privileges_with_http_info(name, privileges, opts = {}) click to toggle source

Update privilege document.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27678
def put_privileges_with_http_info(name, privileges, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_privileges ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_privileges"
  end
  # verify the required parameter 'privileges' is set
  if @api_client.config.client_side_validation && privileges.nil?
    fail ArgumentError, "Missing the required parameter 'privileges' when calling PdfApi.put_privileges"
  end
  # resource path
  local_var_path = "/pdf/{name}/privileges".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(privileges)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_privileges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_ps_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert PS file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.ps) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27734
def put_ps_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_ps_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_ps_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_ps_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert PS file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.ps) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27755
def put_ps_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_ps_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_ps_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_ps_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/ps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_ps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_radio_button_field(name, field_name, field, opts = {}) click to toggle source

Replace document RadioButton field

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [RadioButtonFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27814
def put_radio_button_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_radio_button_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_radio_button_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_radio_button_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document RadioButton field

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27836
def put_radio_button_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_radio_button_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_radio_button_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_radio_button_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_radio_button_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/radiobutton/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RadioButtonFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_radio_button_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_redaction_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document redaction annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [BOOLEAN] :apply Apply redaction immediately after adding. (default to false) @return [RedactionAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27898
def put_redaction_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_redaction_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_redaction_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_redaction_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document redaction annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [BOOLEAN] :apply Apply redaction immediately after adding. @return [Array<(RedactionAnnotationResponse, Fixnum, Hash)>] RedactionAnnotationResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27921
def put_redaction_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_redaction_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_redaction_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_redaction_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_redaction_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/redaction/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'apply'] = opts[:'apply'] if !opts[:'apply'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RedactionAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_redaction_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_replace_image(name, image_id, opts = {}) click to toggle source

Replace document image.

@param name The document name. @param image_id The image ID. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [ImageResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 27984
def put_replace_image(name, image_id, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_replace_image_with_http_info(name, image_id, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_replace_image_with_http_info(name, image_id, opts)
    else
      raise
    end
  return data
end
put_replace_image_with_http_info(name, image_id, opts = {}) click to toggle source

Replace document image.

@param name The document name. @param image_id The image ID. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [Array<(ImageResponse, Fixnum, Hash)>] ImageResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28007
def put_replace_image_with_http_info(name, image_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_replace_image ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_replace_image"
  end
  # verify the required parameter 'image_id' is set
  if @api_client.config.client_side_validation && image_id.nil?
    fail ArgumentError, "Missing the required parameter 'image_id' when calling PdfApi.put_replace_image"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/{imageId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'imageId' + '}', image_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'imageFilePath'] = opts[:'image_file_path'] if !opts[:'image_file_path'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'image'] if !opts[:'image'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ImageResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_replace_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_replace_multiple_image(name, image_ids, opts = {}) click to toggle source

Replace document multiple image.

@param name The document name. @param image_ids The image IDs. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [ImagesResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28069
def put_replace_multiple_image(name, image_ids, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_replace_multiple_image_with_http_info(name, image_ids, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_replace_multiple_image_with_http_info(name, image_ids, opts)
    else
      raise
    end
  return data
end
put_replace_multiple_image_with_http_info(name, image_ids, opts = {}) click to toggle source

Replace document multiple image.

@param name The document name. @param image_ids The image IDs. @param [Hash] opts the optional parameters @option opts [String] :image_file_path Path to image file if specified. Request content is used otherwise. @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [File] :image Image file. @return [Array<(ImagesResponse, Fixnum, Hash)>] ImagesResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28092
def put_replace_multiple_image_with_http_info(name, image_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_replace_multiple_image ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_replace_multiple_image"
  end
  # verify the required parameter 'image_ids' is set
  if @api_client.config.client_side_validation && image_ids.nil?
    fail ArgumentError, "Missing the required parameter 'image_ids' when calling PdfApi.put_replace_multiple_image"
  end
  # resource path
  local_var_path = "/pdf/{name}/images/replace".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'imageIds'] = @api_client.build_collection_param(image_ids, :multi)
  query_params[:'imageFilePath'] = opts[:'image_file_path'] if !opts[:'image_file_path'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'image'] if !opts[:'image'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ImagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_replace_multiple_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_screen_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document screen annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [ScreenAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28154
def put_screen_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_screen_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_screen_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_screen_annotation_data_extract(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document screen annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28237
def put_screen_annotation_data_extract(name, annotation_id, out_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_screen_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_screen_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
    else
      raise
    end
  return data
end
put_screen_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document screen annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28259
def put_screen_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_screen_annotation_data_extract ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_screen_annotation_data_extract"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_screen_annotation_data_extract"
  end
  # verify the required parameter 'out_file_path' is set
  if @api_client.config.client_side_validation && out_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_file_path' when calling PdfApi.put_screen_annotation_data_extract"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/screen/{annotationId}/data/extract".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'outFilePath'] = out_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_screen_annotation_data_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_screen_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document screen annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28176
def put_screen_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_screen_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_screen_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_screen_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_screen_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/screen/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ScreenAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_screen_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_searchable_document(name, opts = {}) click to toggle source

Create searchable PDF document. Generate OCR layer for images in input PDF document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :lang language for OCR engine. Possible values: eng, ara, bel, ben, bul, ces, dan, deu, ell, fin, fra, heb, hin, ind, isl, ita, jpn, kor, nld, nor, pol, por, ron, rus, spa, swe, tha, tur, ukr, vie, chi_sim, chi_tra or thier combination e.g. eng,rus @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28321
def put_searchable_document(name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_searchable_document_with_http_info(name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_searchable_document_with_http_info(name, opts)
    else
      raise
    end
  return data
end
put_searchable_document_with_http_info(name, opts = {}) click to toggle source

Create searchable PDF document. Generate OCR layer for images in input PDF document.

@param name The document name. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :lang language for OCR engine. Possible values: eng, ara, bel, ben, bul, ces, dan, deu, ell, fin, fra, heb, hin, ind, isl, ita, jpn, kor, nld, nor, pol, por, ron, rus, spa, swe, tha, tur, ukr, vie, chi_sim, chi_tra or thier combination e.g. eng,rus @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28342
def put_searchable_document_with_http_info(name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_searchable_document ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_searchable_document"
  end
  # resource path
  local_var_path = "/pdf/{name}/ocr".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'lang'] = opts[:'lang'] if !opts[:'lang'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_searchable_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_set_property(name, property_name, value, opts = {}) click to toggle source

Add/update document property.

@param name The document name. @param property_name Property name. @param value Property value. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @option opts [String] :password The password (Base64). @return [DocumentPropertyResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28398
def put_set_property(name, property_name, value, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_set_property_with_http_info(name, property_name, value, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_set_property_with_http_info(name, property_name, value, opts)
    else
      raise
    end
  return data
end
put_set_property_with_http_info(name, property_name, value, opts = {}) click to toggle source

Add/update document property.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28421
def put_set_property_with_http_info(name, property_name, value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_set_property ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_set_property"
  end
  # verify the required parameter 'property_name' is set
  if @api_client.config.client_side_validation && property_name.nil?
    fail ArgumentError, "Missing the required parameter 'property_name' when calling PdfApi.put_set_property"
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling PdfApi.put_set_property"
  end
  # resource path
  local_var_path = "/pdf/{name}/documentproperties/{propertyName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'propertyName' + '}', property_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'value'] = value
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentPropertyResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_set_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_signature_field(name, field_name, field, opts = {}) click to toggle source

Replace document signature field.

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SignatureFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28485
def put_signature_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_signature_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_signature_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_signature_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document signature field.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28507
def put_signature_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_signature_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_signature_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_signature_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_signature_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/signature/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SignatureFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_signature_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_sound_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document sound annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SoundAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28568
def put_sound_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_sound_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_sound_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_sound_annotation_data_extract(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document sound annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28651
def put_sound_annotation_data_extract(name, annotation_id, out_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_sound_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_sound_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
    else
      raise
    end
  return data
end
put_sound_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document sound annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28673
def put_sound_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_sound_annotation_data_extract ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_sound_annotation_data_extract"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_sound_annotation_data_extract"
  end
  # verify the required parameter 'out_file_path' is set
  if @api_client.config.client_side_validation && out_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_file_path' when calling PdfApi.put_sound_annotation_data_extract"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/sound/{annotationId}/data/extract".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'outFilePath'] = out_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_sound_annotation_data_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_sound_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document sound annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28590
def put_sound_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_sound_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_sound_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_sound_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_sound_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/sound/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SoundAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_sound_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_square_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document square annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquareAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28736
def put_square_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_square_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_square_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_square_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document square annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28758
def put_square_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_square_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_square_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_square_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_square_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/square/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquareAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_square_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_squiggly_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document squiggly annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [SquigglyAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28819
def put_squiggly_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_squiggly_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_squiggly_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_squiggly_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document squiggly annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28841
def put_squiggly_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_squiggly_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_squiggly_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_squiggly_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_squiggly_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/squiggly/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SquigglyAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_squiggly_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_stamp_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document stamp annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StampAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28902
def put_stamp_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_stamp_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_stamp_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_stamp_annotation_data_extract(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document stamp annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28985
def put_stamp_annotation_data_extract(name, annotation_id, out_file_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_stamp_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_stamp_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts)
    else
      raise
    end
  return data
end
put_stamp_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {}) click to toggle source

Extract document stamp annotation content to storage

@param name The document name. @param annotation_id The annotation ID. @param out_file_path The output file path. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29007
def put_stamp_annotation_data_extract_with_http_info(name, annotation_id, out_file_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_stamp_annotation_data_extract ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_stamp_annotation_data_extract"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_stamp_annotation_data_extract"
  end
  # verify the required parameter 'out_file_path' is set
  if @api_client.config.client_side_validation && out_file_path.nil?
    fail ArgumentError, "Missing the required parameter 'out_file_path' when calling PdfApi.put_stamp_annotation_data_extract"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/stamp/{annotationId}/data/extract".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'outFilePath'] = out_file_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_stamp_annotation_data_extract\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_stamp_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document stamp annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 28924
def put_stamp_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_stamp_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_stamp_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_stamp_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_stamp_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/stamp/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StampAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_stamp_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_strike_out_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document StrikeOut annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [StrikeOutAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29070
def put_strike_out_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_strike_out_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_strike_out_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_strike_out_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document StrikeOut annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29092
def put_strike_out_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_strike_out_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_strike_out_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_strike_out_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_strike_out_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/strikeout/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StrikeOutAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_strike_out_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_svg_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert SVG file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.svg) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :adjust_page_size Adjust page size @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29160
def put_svg_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_svg_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_svg_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_svg_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert SVG file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.svg) @param [Hash] opts the optional parameters @option opts [BOOLEAN] :adjust_page_size Adjust page size @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29189
def put_svg_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_svg_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_svg_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_svg_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/svg".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'adjustPageSize'] = opts[:'adjust_page_size'] if !opts[:'adjust_page_size'].nil?
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_svg_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_table(name, table_id, table, opts = {}) click to toggle source

Replace document page table.

@param name The document name. @param table_id The table ID. @param table The table. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29256
def put_table(name, table_id, table, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_table_with_http_info(name, table_id, table, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_table_with_http_info(name, table_id, table, opts)
    else
      raise
    end
  return data
end
put_table_with_http_info(name, table_id, table, opts = {}) click to toggle source

Replace document page table.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29278
def put_table_with_http_info(name, table_id, table, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_table ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_table"
  end
  # verify the required parameter 'table_id' is set
  if @api_client.config.client_side_validation && table_id.nil?
    fail ArgumentError, "Missing the required parameter 'table_id' when calling PdfApi.put_table"
  end
  # verify the required parameter 'table' is set
  if @api_client.config.client_side_validation && table.nil?
    fail ArgumentError, "Missing the required parameter 'table' when calling PdfApi.put_table"
  end
  # resource path
  local_var_path = "/pdf/{name}/tables/{tableId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'tableId' + '}', table_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(table)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_table\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_te_x_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert TeX file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.tex) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29338
def put_te_x_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert TeX file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.tex) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29359
def put_te_x_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_te_x_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_te_x_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_te_x_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/tex".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_te_x_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_text_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document text annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29418
def put_text_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_text_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_text_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_text_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document text annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29440
def put_text_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_text_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_text_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_text_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_text_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/text/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_text_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_text_box_field(name, field_name, field, opts = {}) click to toggle source

Replace document text box field

@param name The document name. @param field_name The field name. @param field The field. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [TextBoxFieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29501
def put_text_box_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_text_box_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_text_box_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_text_box_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Replace document text box field

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29523
def put_text_box_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_text_box_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_text_box_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_text_box_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_text_box_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/textbox/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextBoxFieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_text_box_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_underline_annotation(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document underline annotation

@param name The document name. @param annotation_id The annotation ID. @param annotation Annotation. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [UnderlineAnnotationResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29584
def put_underline_annotation(name, annotation_id, annotation, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_underline_annotation_with_http_info(name, annotation_id, annotation, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_underline_annotation_with_http_info(name, annotation_id, annotation, opts)
    else
      raise
    end
  return data
end
put_underline_annotation_with_http_info(name, annotation_id, annotation, opts = {}) click to toggle source

Replace document underline annotation

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29606
def put_underline_annotation_with_http_info(name, annotation_id, annotation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_underline_annotation ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_underline_annotation"
  end
  # verify the required parameter 'annotation_id' is set
  if @api_client.config.client_side_validation && annotation_id.nil?
    fail ArgumentError, "Missing the required parameter 'annotation_id' when calling PdfApi.put_underline_annotation"
  end
  # verify the required parameter 'annotation' is set
  if @api_client.config.client_side_validation && annotation.nil?
    fail ArgumentError, "Missing the required parameter 'annotation' when calling PdfApi.put_underline_annotation"
  end
  # resource path
  local_var_path = "/pdf/{name}/annotations/underline/{annotationId}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'annotationId' + '}', annotation_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(annotation)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UnderlineAnnotationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_underline_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_update_field(name, field_name, field, opts = {}) click to toggle source

Update field.

@param name The document name. @param field_name The name of a field to be updated. @param field Field with the field data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FieldResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29667
def put_update_field(name, field_name, field, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_update_field_with_http_info(name, field_name, field, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_update_field_with_http_info(name, field_name, field, opts)
    else
      raise
    end
  return data
end
put_update_field_with_http_info(name, field_name, field, opts = {}) click to toggle source

Update field.

@param name The document name. @param field_name The name of a field to be updated. @param field Field with the field data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [Array<(FieldResponse, Fixnum, Hash)>] FieldResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29689
def put_update_field_with_http_info(name, field_name, field, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_update_field ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_update_field"
  end
  # verify the required parameter 'field_name' is set
  if @api_client.config.client_side_validation && field_name.nil?
    fail ArgumentError, "Missing the required parameter 'field_name' when calling PdfApi.put_update_field"
  end
  # verify the required parameter 'field' is set
  if @api_client.config.client_side_validation && field.nil?
    fail ArgumentError, "Missing the required parameter 'field' when calling PdfApi.put_update_field"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields/{fieldName}".sub('{' + 'name' + '}', name.to_s).sub('{' + 'fieldName' + '}', field_name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(field)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FieldResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_update_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_update_fields(name, fields, opts = {}) click to toggle source

Update fields.

@param name The document name. @param fields Fields with the fields data. @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [String] :folder The document folder. @return [FieldsResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29749
def put_update_fields(name, fields, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_update_fields_with_http_info(name, fields, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_update_fields_with_http_info(name, fields, opts)
    else
      raise
    end
  return data
end
put_update_fields_with_http_info(name, fields, opts = {}) click to toggle source

Update fields.

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

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29770
def put_update_fields_with_http_info(name, fields, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_update_fields ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_update_fields"
  end
  # verify the required parameter 'fields' is set
  if @api_client.config.client_side_validation && fields.nil?
    fail ArgumentError, "Missing the required parameter 'fields' when calling PdfApi.put_update_fields"
  end
  # resource path
  local_var_path = "/pdf/{name}/fields".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  post_body = @api_client.object_to_http_body(fields)
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FieldsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_update_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_web_in_storage_to_pdf(name, url, opts = {}) click to toggle source

Convert web page to PDF format and upload resulting file to storage.

@param name The document name. @param url Source url @param [Hash] opts the optional parameters @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29833
def put_web_in_storage_to_pdf(name, url, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_web_in_storage_to_pdf_with_http_info(name, url, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_web_in_storage_to_pdf_with_http_info(name, url, opts)
    else
      raise
    end
  return data
end
put_web_in_storage_to_pdf_with_http_info(name, url, opts = {}) click to toggle source

Convert web page to PDF format and upload resulting file to storage.

@param name The document name. @param url Source url @param [Hash] opts the optional parameters @option opts [Float] :height Page height @option opts [Float] :width Page width @option opts [BOOLEAN] :is_landscape Is page landscaped @option opts [Float] :margin_left Page margin left @option opts [Float] :margin_bottom Page margin bottom @option opts [Float] :margin_right Page margin right @option opts [Float] :margin_top Page margin top @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29861
def put_web_in_storage_to_pdf_with_http_info(name, url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_web_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_web_in_storage_to_pdf"
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling PdfApi.put_web_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/web".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'url'] = url
  query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
  query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
  query_params[:'isLandscape'] = opts[:'is_landscape'] if !opts[:'is_landscape'].nil?
  query_params[:'marginLeft'] = opts[:'margin_left'] if !opts[:'margin_left'].nil?
  query_params[:'marginBottom'] = opts[:'margin_bottom'] if !opts[:'margin_bottom'].nil?
  query_params[:'marginRight'] = opts[:'margin_right'] if !opts[:'margin_right'].nil?
  query_params[:'marginTop'] = opts[:'margin_top'] if !opts[:'margin_top'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_web_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_xfa_pdf_in_request_to_acro_form(out_path, opts = {}) click to toggle source

Converts PDF document which contains XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29925
def put_xfa_pdf_in_request_to_acro_form(out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_xfa_pdf_in_request_to_acro_form_with_http_info(out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_xfa_pdf_in_request_to_acro_form_with_http_info(out_path, opts)
    else
      raise
    end
  return data
end
put_xfa_pdf_in_request_to_acro_form_with_http_info(out_path, opts = {}) click to toggle source

Converts PDF document which contains XFA form (in request content) to PDF with AcroForm and uploads resulting file to storage.

@param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [String] :storage The document storage. @option opts [File] :file A file to be converted. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 29945
def put_xfa_pdf_in_request_to_acro_form_with_http_info(out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_xfa_pdf_in_request_to_acro_form ..."
  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 PdfApi.put_xfa_pdf_in_request_to_acro_form"
  end
  # resource path
  local_var_path = "/pdf/convert/xfatoacroform"

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  post_body =  opts[:'file'] if !opts[:'file'].nil?
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_xfa_pdf_in_request_to_acro_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_xfa_pdf_in_storage_to_acro_form(name, out_path, opts = {}) click to toggle source

Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30000
def put_xfa_pdf_in_storage_to_acro_form(name, out_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_xfa_pdf_in_storage_to_acro_form_with_http_info(name, out_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_xfa_pdf_in_storage_to_acro_form_with_http_info(name, out_path, opts)
    else
      raise
    end
  return data
end
put_xfa_pdf_in_storage_to_acro_form_with_http_info(name, out_path, opts = {}) click to toggle source

Converts PDF document which contains XFA form (located on storage) to PDF with AcroForm and uploads resulting file to storage

@param name The document name. @param out_path Full resulting filename (ex. /folder1/folder2/result.pdf) @param [Hash] opts the optional parameters @option opts [String] :folder The document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30021
def put_xfa_pdf_in_storage_to_acro_form_with_http_info(name, out_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_xfa_pdf_in_storage_to_acro_form ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_xfa_pdf_in_storage_to_acro_form"
  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 PdfApi.put_xfa_pdf_in_storage_to_acro_form"
  end
  # resource path
  local_var_path = "/pdf/{name}/convert/xfatoacroform".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'outPath'] = out_path
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_xfa_pdf_in_storage_to_acro_form\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_xml_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert XML file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30080
def put_xml_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_xml_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_xml_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_xml_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert XML file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xml) @param [Hash] opts the optional parameters @option opts [String] :xsl_file_path Full XSL source filename (ex. /folder1/folder2/template.xsl) @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30102
def put_xml_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_xml_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_xml_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_xml_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/xml".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'xslFilePath'] = opts[:'xsl_file_path'] if !opts[:'xsl_file_path'].nil?
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_xml_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_xps_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert XPS file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xps) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30161
def put_xps_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_xps_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_xps_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_xps_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert XPS file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xps) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30182
def put_xps_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_xps_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_xps_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_xps_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/xps".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_xps_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_xsl_fo_in_storage_to_pdf(name, src_path, opts = {}) click to toggle source

Convert XslFo file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xpsfo) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [AsposeResponse]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30240
def put_xsl_fo_in_storage_to_pdf(name, src_path, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = put_xsl_fo_in_storage_to_pdf_with_http_info(name, src_path, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = put_xsl_fo_in_storage_to_pdf_with_http_info(name, src_path, opts)
    else
      raise
    end
  return data
end
put_xsl_fo_in_storage_to_pdf_with_http_info(name, src_path, opts = {}) click to toggle source

Convert XslFo file (located on storage) to PDF format and upload resulting file to storage.

@param name The document name. @param src_path Full source filename (ex. /folder1/folder2/template.xpsfo) @param [Hash] opts the optional parameters @option opts [String] :dst_folder The destination document folder. @option opts [String] :storage The document storage. @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30261
def put_xsl_fo_in_storage_to_pdf_with_http_info(name, src_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.put_xsl_fo_in_storage_to_pdf ..."
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.put_xsl_fo_in_storage_to_pdf"
  end
  # verify the required parameter 'src_path' is set
  if @api_client.config.client_side_validation && src_path.nil?
    fail ArgumentError, "Missing the required parameter 'src_path' when calling PdfApi.put_xsl_fo_in_storage_to_pdf"
  end
  # resource path
  local_var_path = "/pdf/{name}/create/xslfo".sub('{' + 'name' + '}', name.to_s)

  # query parameters
  query_params = {}
  query_params[:'srcPath'] = src_path
  query_params[:'dstFolder'] = opts[:'dst_folder'] if !opts[:'dst_folder'].nil?
  query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AsposeResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#put_xsl_fo_in_storage_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
storage_exists(storage_name, opts = {}) click to toggle source

Check if storage exists

@param storage_name Storage name @param [Hash] opts the optional parameters @return [StorageExist]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30316
def storage_exists(storage_name, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = storage_exists_with_http_info(storage_name, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = storage_exists_with_http_info(storage_name, opts)
    else
      raise
    end
  return data
end
storage_exists_with_http_info(storage_name, opts = {}) click to toggle source

Check if storage exists

@param storage_name Storage name @param [Hash] opts the optional parameters @return [Array<(StorageExist, Fixnum, Hash)>] StorageExist data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30334
def storage_exists_with_http_info(storage_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.storage_exists ..."
  end
  # verify the required parameter 'storage_name' is set
  if @api_client.config.client_side_validation && storage_name.nil?
    fail ArgumentError, "Missing the required parameter 'storage_name' when calling PdfApi.storage_exists"
  end
  # resource path
  local_var_path = "/pdf/storage/{storageName}/exist".sub('{' + 'storageName' + '}', storage_name.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StorageExist')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#storage_exists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
upload_file(path, file, opts = {}) click to toggle source

Upload file

@param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.

@param file File to upload @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [FilesUploadResult]

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30384
def upload_file(path, file, opts = {})
  @api_client.request_token_if_needed
  data, _status_code, _headers = upload_file_with_http_info(path, file, opts)
  rescue ApiError => error
    if error.code == 401
      @api_client.request_token_if_needed
      data, _status_code, _headers = upload_file_with_http_info(path, file, opts)
    else
      raise
    end
  return data
end
upload_file_with_http_info(path, file, opts = {}) click to toggle source

Upload file

@param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.

@param file File to upload @param [Hash] opts the optional parameters @option opts [String] :storage_name Storage name @return [Array<(FilesUploadResult, Fixnum, Hash)>] FilesUploadResult data, response status code and response headers

# File lib/aspose_pdf_cloud/api/pdf_api.rb, line 30404
def upload_file_with_http_info(path, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PdfApi.upload_file ..."
  end
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    fail ArgumentError, "Missing the required parameter 'path' when calling PdfApi.upload_file"
  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 PdfApi.upload_file"
  end
  # resource path
  local_var_path = "/pdf/storage/file/{path}".sub('{' + 'path' + '}', path.to_s)

  # query parameters
  query_params = {}
  query_params[:'storageName'] = opts[:'storage_name'] if !opts[:'storage_name'].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(['multipart/form-data'])

  # form parameters
  form_params = {}
  # Fix header in file
  post_body = nil
  # Fix header in file
  post_body = file
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])

  # http body (model)
  # Fix header in file
  # post_body = nil
  auth_names = ['JWT']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FilesUploadResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PdfApi#upload_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end