How to Finish Editing an Online Document in Python
1 min readJan 15, 2021
Once you’ve finished editing a document online, you will need to download and save the finished product. The following process is the endgame to our Begin Editing function and should be performed after all editing operations have been completed.
First, run this command to install the SDK:
pip install cloudmersive-convert-api-client
To call the function, input the editing URL generated by the Begin Editing function into the following code:
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'# create an instance of the API class
api_instance = cloudmersive_convert_api_client.EditDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration))
req_config = cloudmersive_convert_api_client.FinishEditingRequest() # FinishEditingRequest | Cloudmersive Document URL to complete editing ontry:
# Finish editing document, and download result from document editing
api_response = api_instance.edit_document_finish_editing(req_config)
pprint(api_response)
except ApiException as e:
print("Exception when calling EditDocumentApi->edit_document_finish_editing: %s\n" % e)
Now your document is all set and ready to go! Head to the Cloudmersive website to retrieve your free API key and gain access to 800 calls/month across our vast array of APIs.