i am using below coding and getting 403 expection. Attached pdf is my input. Please advice.
Dear support team,
Hi Bharani,
We are sorry for the delayed response. Please note 403 error arises while some resource is missing. Please check complete code for PDF to HTML conversion using Aspose.Pdf for Cloud and double check the availability of source file as well. If the issue persist then please share your source PDF document and share your credentials(AppSID/AppKey) via private message. We will look into the issue and will guide you accordingly.
Best Regards,
Hi Bharani,
Thanks for sharing required details via email. I am looking into it and will update you my findings soon. However meanwhile I will appreciate it if you please amend your code as following and share the results, as your code shows that you are not uploading source document to storage for processing.
#set input file name
fileName = "Telangana Cotton Mills, L.P.- Draft K1 Sample - Readable"
name = fileName + ".pdf"
format = "html"
storage = ""
folder = ""
outPath = ""
try:
print "before call"
#upload file to aspose cloud storage
response = storageApi.PutCreate(name, data_folder + name)
#invoke Aspose.Pdf Cloud SDK API to convert PDF to DOC
response = pdfApi.GetDocumentWithFormat(name, format, storage, folder, outPath)
print "After call"
print response
if response.Status == "OK":
#save converted format file from response
outfilename = "c:/temp/" + fileName + "." + ".zip"
with open(outfilename, 'wb') as f:
for chunk in response.InputStream:
f.write(chunk)
We are sorry for the inconvenience.
Best Regards,
Is there any Updates ?
Hi Bharani,