This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for Python.
For more information, please visit
This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for Python.
For more information, please visit
The Gist contains code snippets related to MS Word (DOC) file conversion to PDF format using Aspose.Words Cloud SDK for Python. |
# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud | |
# input doc file path | |
fileName = '/Users/nayyershahbaz/Downloads/GetStyles.doc' | |
# filename on Cloud storage | |
remoteFileName = 'GetStyles.doc' | |
try: | |
word_api_client: ApiClient = asposewordscloud.api_client.ApiClient("a41d01ef-dfd5-4e02-ad29-bd85fe41e3e4","d87269aade6a46cdc295b711e26809af") | |
words_api = WordsApi(word_api_client) | |
# Upload original document to Cloud Storage | |
words_api.upload_file(asposewordscloud.models.requests.UploadFileRequest(open(fileName, 'rb'), "", None)) | |
# create ConvertDocument object | |
request = asposewordscloud.models.requests.ConvertDocumentRequest(remoteFileName, format, 'Resultant.pdf', None,None, None) | |
# perform document conversion | |
result = words_api.convert_document(request) | |
# print the result | |
print("Result {}".format(result)) | |
except ApiException as e: | |
print("Exception while calling SlidesApi: {0}".format(e.message)) |