Finish Editing and Download a Document in PHP

Cloudmersive
1 min readFeb 3, 2021

--

Need to tie up the online editing process and download your result? In this brief tutorial, we’ll discuss how to utilize our Finish Editing API to do just that. This API is the companion to our Begin Editing API and should be used as the grand finale to your document modifications.

To start the process for our finishing tool, we will first need to install the SDK:

composer require cloudmersive/cloudmersive_document_convert_api_client

Next, we can call the function with the following code:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
$apiInstance = new Swagger\Client\Api\EditDocumentApi(


new GuzzleHttp\Client(),
$config
);
$req_config = new \Swagger\Client\Model\FinishEditingRequest(); // \Swagger\Client\Model\FinishEditingRequest | Cloudmersive Document URL to complete editing on
try {
$result = $apiInstance->editDocumentFinishEditing($req_config);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EditDocumentApi->editDocumentFinishEditing: ', $e->getMessage(), PHP_EOL;
}
?>

Once the function is complete, you can download the updated result! To retrieve your free API key, head to the Cloudmersive website to register for an account and gain access to 800 monthly calls across our multitude of APIs.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet