Error converting from -doc to .pdf using aspose.words

Hi

I’m having this error when converting .doc to .pdf:

"java.lang.ClassCastException: com.aspose.words.akt"

The code is the following:

com.aspose.words.Document doc = new com.aspose.words.Document(inStream);
doc.unprotect();
PdfSaveOptions options = new PdfSaveOptions();
options.setSaveFormat(SaveFormat.PDF);
options.setPrettyFormat(true);
doc.save(outFolder+newName, options);

Any help? I’m having this problem in 1 of 5 cases, so it’s very annoying because we can’t rely on the program to do thre right conversioin.

Hi Cristina,


Thanks for your inquiry. Unfortunately, it is difficult to say what the problem is without the input Word document. I need this document to reproduce the problem exception on my side.
Moreover, it is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. Also you can send the file to my e-mail as described here:
You can also remove any sensitive information by replacing it with dummy data instead.
Best regards,