We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to convert doc file to pdf

i am trying to convert doc file into pdf but it is throwing following error

"class com.aspose.pdf.exceptions.InvalidPdfFileFormatException: Incorect file format"

i am using latest version of aspose

Here is my code snippet
Document doc = new Document( “C:\Users\Prodash001\Desktop\re.docx”);
try {
doc.save(“C:\Users\Prodash001\Desktop\re.pdf”, SaveFormat.Pdf);
catch(Exception ex)

Hi there,

Thanks for your inquriy. Please note Aspose.Pdf supports PDF to DOC(X) conversion. However if you want to convert DOC(X) to PDF then you may use Aspose.Words for the purpose.

Please feel free to contact us for any further assistance.

Best Regards,