Hi,
We have purchased and using Aspose words for Java since last year. We are using “Aspose.Words.jdk16.jar” version.
We are using “ReplaceHandlerInsertRtf” java file to insert Editable rtf document into word document. We are getting “The document appears to be corrupted and cannot be loaded” exception. Could you help us how we can resolve this issue.
If we use the latest jar file, we are getting method incompatible issues.
Thanks
Hi Kalyani,
Thanks for your inquiry. Would you please share sample code and source file? So we will have a closer look into the issue and suggest you solution accordingly.
Please feel free to contact us for any further assistance.
Best Regards,
Hi,
If we insert Editable rtf document into word document. We are getting “The document appears to be corrupted and cannot be loaded” exception.The file name is “OutputRTF.rtf”
But, we insert rtf document into word document then we dont get the exception. The file name is “Output.rtf”
Please see the attachements of sample program, Input, rtf and Editable RTF files.
Appreciate your help.
Hi Kalyani,
Thanks for sharing additional information. I have tested your code with latest version of Aspose.Words i.e. v11.4.0. but unable to reproduce the reported issue. Please try latest version of Aspose.Words. Hopefully it will resolve your issue. Moreover, please note ReplaceEvaluator was replaced with IReplacingCallback interface in your sample code for testing, as it has been obsolete. You can find further details regarding this updation at following link.
https://docs.aspose.com/words/java/aspose-words-for-java/
So you need to implement IReplacingCallback interface in your DemoInsertDocumentReplaceHandler class. Please check following link for IReplacingCallback interface implementation example.
https://docs.aspose.com/words/java/find-and-replace/
Kindly let us know for any further assistance. We will be glad to help you.
Best Regards,
Hi i am not able to open the urls given in the response.
I am using the latest jar file only body is copying into the destination document not header and footer parts.
I need insert the Editable Rtf into the Docx file as it is(including headers and footers)
each page of Rtf document should start in the new page of Docx document.
Can anyone please help me on this?
thanks
can any one please help me on this quickely…
Hi Sreelakshmi,
Thanks for your request. Please check following post, replied by one of my colleague, for the answer.
https://forum.aspose.com/t/56067
Please let us know for any further query.
Best Regards,