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

Free Support Forum - aspose.com

RTF to HTML conversion failed

I am trying to convert one RTF document to HTML but it is failing with following error.

06:35:14,607 INFO [stdout] (http–0.0.0.0-8080-5) 06-07-2018:06:35:14 ERROR [http–0.0.0.0-8080-5] (HTMLConverter.java:170) Error : The document appears to be corrupted and cannot be loaded. occured while processing file for pdf conversion
06:35:14,608 INFO [stdout] (http–0.0.0.0-8080-5) com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
06:35:14,609 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.FileFormatUtil.zzZ(Unknown Source)
06:35:14,609 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Document.zzY(Unknown Source)
06:35:14,610 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Document.zzZ(Unknown Source)
06:35:14,610 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Document.(Unknown Source)
06:35:14,611 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Document.(Unknown Source)
06:35:14,611 INFO [stdout] (http–0.0.0.0-8080-5) at com.healthfidelity.dcs.converters.HTMLConverter.initDocument(HTMLConverter.java:206)
06:35:14,612 INFO [stdout] (http–0.0.0.0-8080-5) at com.healthfidelity.dcs.converters.HTMLConverter.RTForTEXTorWORDtoHTML(HTMLConverter.java:156)
06:35:14,613 INFO [stdout] (http–0.0.0.0-8080-5) at com.healthfidelity.dcs.converters.HTMLConverter.convert(HTMLConverter.java:75)
06:35:14,613 INFO [stdout] (http–0.0.0.0-8080-5) at com.healthfidelity.dcs.services.DocumentConversionService.convertDocument(DocumentConversionService.java:47)
06:35:14,614 INFO [stdout] (http–0.0.0.0-8080-5) at com.healthfidelity.dcs.controllers.DocumentConversionController.convertDocument(DocumentConversionController.java:116)
06:35:14,629 INFO [stdout] (http–0.0.0.0-8080-5) at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
06:35:14,640 INFO [stdout] (http–0.0.0.0-8080-5) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
06:35:14,649 INFO [stdout] (http–0.0.0.0-8080-5) at java.lang.reflect.Method.invoke(Unknown Source)
06:35:14,658 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
06:35:14,668 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
06:35:14,678 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
06:35:14,688 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
06:35:14,699 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
06:35:14,711 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
06:35:14,722 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
06:35:14,732 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
06:35:14,741 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
06:35:14,751 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
06:35:14,762 INFO [stdout] (http–0.0.0.0-8080-5) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
06:35:14,763 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
06:35:14,764 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
06:35:14,765 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
06:35:14,766 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
06:35:14,767 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.event(JBossWebContext.java:67)
06:35:14,769 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.modcluster.container.jbossweb.JBossWebContext$RequestListenerValve.invoke(JBossWebContext.java:48)
06:35:14,770 INFO [stdout] (http–0.0.0.0-8080-5) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
06:35:14,772 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
06:35:14,773 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
06:35:14,774 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
06:35:14,775 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
06:35:14,777 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
06:35:14,778 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
06:35:14,779 INFO [stdout] (http–0.0.0.0-8080-5) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
06:35:14,780 INFO [stdout] (http–0.0.0.0-8080-5) at java.lang.Thread.run(Unknown Source)
06:35:14,781 INFO [stdout] (http–0.0.0.0-8080-5) Caused by: java.lang.IllegalStateException: Cannot find a style with this istd.
06:35:14,782 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.StyleCollection.zzXQ(Unknown Source)
06:35:14,783 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Style.zzZlC(Unknown Source)
06:35:14,784 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Style.zzXR(Unknown Source)
06:35:14,785 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Style.zzXS(Unknown Source)
06:35:14,786 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Paragraph.zzYq(Unknown Source)
06:35:14,787 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Paragraph.zzYp(Unknown Source)
06:35:14,788 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Paragraph.zzZye(Unknown Source)
06:35:14,789 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Paragraph.isListItem(Unknown Source)
06:35:14,790 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.zzZ44.zzZu4(Unknown Source)
06:35:14,790 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.zzZ38.zzX(Unknown Source)
06:35:14,791 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.zzZ5A.zzU(Unknown Source)
06:35:14,792 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.zzZ50.zzU(Unknown Source)
06:35:14,793 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.zzZ3R.read(Unknown Source)
06:35:14,794 INFO [stdout] (http–0.0.0.0-8080-5) at com.aspose.words.Document.zzY(Unknown Source)
06:35:14,795 INFO [stdout] (http–0.0.0.0-8080-5) … 37 more
06:35:14,796 INFO [stdout] (http–0.0.0.0-8080-5) 06-07-2018:06:35:14 ERROR [http–0.0.0.0-8080-5] (DocumentConversionController.java:139) Invalid document model for processing

@subhashlengare,

Thanks for your inquiry. Please ZIP and attach your input RTF document here for testing. We will investigate the issue on our side and provide you more information.

4295_1790.rtf.zip (3.9 KB)

@subhashlengare,

Thanks for sharing the document. We have tested the scenario using latest version of Aspose.Words for Java 18.6 and have not found the shared issue. Please use Aspose.Words for Java 18.6.