Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.52 KB

File metadata and controls

68 lines (48 loc) · 2.52 KB

Swagger\Client\ViewerToolsApi

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

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

viewerToolsCreateSimple

\Swagger\Client\Model\ViewerResponse viewerToolsCreateSimple($input_file, $width, $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

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');

$apiInstance = new Swagger\Client\Api\ViewerToolsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.
$width = 56; // int | Optional; width of the output viewer in pixels
$height = 56; // int | Optional; height of the output viewer in pixels

try {
    $result = $apiInstance->viewerToolsCreateSimple($input_file, $width, $height);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ViewerToolsApi->viewerToolsCreateSimple: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
input_file \SplFileObject 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

\Swagger\Client\Model\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]