Free Support Forum - aspose.com

Can't convert pdf file to word file


#1

class com.aspose.pdf.internal.ms.System.ArgumentException: Save a document to a doc format is not supported.


#2

@hardik24895

Could you please make sure that you are using code snippet as given in this example. In case issue still persists, please share your PDF document with us. We will test the scenario in our environment and address it accordingly.


#3

Document pdfDocument = new Document(SdPath + “/sample.pdf”);
pdfDocument.save(SdPath + “/sample.doc”, SaveFormat.Doc);


#4

sample.pdf (3.0 KB)


#5

@hardik24895

Thanks for sharing sample PDF.

Please use following code snippet to convert your PDF document into .doc format using Aspose.PDF for Java 19.4.

Document doc = new Document(dataDir + "sample.pdf");
DocSaveOptions saveOption = new DocSaveOptions();
saveOption.setFormat(DocSaveOptions.DocFormat.Doc);
doc.save(dataDir + "sample.doc", saveOption);

sample.zip (6.7 KB)

Attached is the output .doc file which was generated in our environment without raising any issue. In case of any further assistance, please feel free to let us know.


#6

hi is there any licence required to conversion ? because i m using free version


#7

@hardik24895

Yes, in order to perform conversion without any limitation, you need to use a valid license. In case you do not have one, you can consider applying 30-days free temporary license over our website.