Free Support Forum - aspose.com

Java Components - PDF to RTF

Hello,

Does the Java Components allow existing PDF file to be converted to RTF?

Thank you,

Gerald

Hi Gerald,


Thanks for your inquiry. No, you can’t load a Pdf document into Aspose.Words’ DOM (document object modal). You can find a list of file formats that can be loaded with Aspose.Words below:
http://www.aspose.com/docs/display/wordsjava/LoadFormat

However, you can use Aspose.PDF + Aspose.Words components to convert PDF to RTF in two steps. First you need to convert Pdf to Doc by using Aspose.Pdf. Once you have converted Pdf to Doc, please use Aspose.Words to convert Doc to RTF file format.

Please read the following documentation link to convert Pdf to Doc file format by using Aspose.Pdf.
http://www.aspose.com/docs/display/pdfjava/Convert+PDF+file+into+DOC+format

Please use the following code snippet to convert Doc to RTF by using Aspose.Words.

Document doc = new
Document(“in.doc”);<o:p></o:p>

doc.save("out.rtf", SaveFormat.RTF)


Tahir,

It appears that conversion from PDF to DOC is not supported and fails with following exception ...

Exception in thread "main" class com.aspose.ms.System.c: Save a document to a doc format is not supported.

com.aspose.pdf.Document.a(Unknown Source)

com.aspose.pdf.Document.a(Unknown Source)

com.aspose.pdf.Document.save(Unknown Source)

...

following is my code snippet ...

com.aspose.pdf.Document pdfDocument =

new com.aspose.pdf.Document("C:\\portal\\aspose\\Input\\dualColumn.pdf");

pdfDocument.save(

"C:\\portal\\aspose\\output\\test.doc",com.aspose.pdf.SaveFormat.Doc);

Please advice

Thanks,

Gerald

Hi Gerald,


Thanks for your inquiry. Could you please attach your input Pdf here for testing? We will investigate the issue on our side and provide you more information.

Moreover, your query is related to Aspose.Pdf. I am moving this forum thread to Aspose.Total forum. My colleagues from Aspose.Pdf team will start investigation into your issue once we have your Pdf file.

Hi Gerald,


Thanks for contacting support.

I am afraid the requested feature to convert PDF file to DOC format is
currently not supported. However for the sake of implementation, its already been logged in our issue tracking system under New Features list as PDFNEWJAVA-33309.
We will further investigate this requirement in details and will keep you
updated on the status of a correction. <o:p></o:p>

We apologize for your inconvenience.