DEV Community

Discussion on: Convert PDF to Editable DOCX with Python

Collapse
 
medhagupta098 profile image
Medha • Edited

Hello @tilalahmad ! I fail to execute the above code correctly. I've added the app_sid and app_key to the code as per my created test.pdf app on groupdocs. This error is coming when I run python3 filename.py. It does give that the document is converted successfully and when I go to the url, there's an error. I'm sharing the ss of the same

Collapse
 
medhagupta098 profile image
Medha

Unable to attach the ss

Collapse
 
tilalahmad profile image
Tilal Ahmad Sana

@medhagupta098
If your conversion is successful then either you can view/download your file from cloud storage using dashboard.groupdocs.cloud or download file to local drive as follows:

#Download Document from Storage        
request_download = groupdocs_conversion_cloud.DownloadFileRequest(output_name)
response_download = file_api.download_file(request_download)

copyfile(response_download, 'sample_copy.docx')
print("Result {}".format(response_download))