Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 2.48 KB

ViewerToolsApi.md

File metadata and controls

67 lines (47 loc) · 2.48 KB

cloudmersive_convert_api_client.ViewerToolsApi

All URIs are relative to https://api.cloudmersive.com

Method HTTP request Description
viewer_tools_create_simple POST /convert/viewer/create/web/simple Create a web-based viewer

viewer_tools_create_simple

ViewerResponse viewer_tools_create_simple(input_file, width=width, height=height)

Create a web-based viewer

Creates an HTML embed code for a simple web-based viewer of a document; supports Office document types and PDF.

Example

from __future__ import print_function
import time
import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Apikey
configuration = cloudmersive_convert_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Apikey'] = 'Bearer'

# create an instance of the API class
api_instance = cloudmersive_convert_api_client.ViewerToolsApi(cloudmersive_convert_api_client.ApiClient(configuration))
input_file = '/path/to/file.txt' # file | Input file to perform the operation on.
width = 56 # int | Optional; width of the output viewer in pixels (optional)
height = 56 # int | Optional; height of the output viewer in pixels (optional)

try:
    # Create a web-based viewer
    api_response = api_instance.viewer_tools_create_simple(input_file, width=width, height=height)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ViewerToolsApi->viewer_tools_create_simple: %s\n" % e)

Parameters

Name Type Description Notes
input_file file Input file to perform the operation on.
width int Optional; width of the output viewer in pixels [optional]
height int Optional; height of the output viewer in pixels [optional]

Return type

ViewerResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]