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 |
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.
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)
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] |
- 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]