Hi,
We’re looking at upgrading from version 16.6.0 to 19.8 to use a feature available in 19.8, but the rtf document that we a using isn’t converting correctly to html in 19.8.
My code (This is Aspose Words Java):
public static void main(String[] args) throws Exception { Document doc = new Document("sampletemplate.rtf"); HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.HTML); doc.save("output.html",options); doc.save("output.pdf");
}
The html file produced isn’t formatted correctly(The first section is missing), while the pdf does convert correctly. This works fine for both html and pdf in version 16.6.0.
The rtf file that we’re using:
sampletemplate.zip (1.3 KB)
Ultimately, I want to be able to do:
Pattern regex = Pattern.compile("\\<clinical comments\\>");
doc.getRange().replace(regex,"some text \r\n some more text");
But in 16.6.0 it won’t allow me to use line breaks(and substituting in &l as per the documentation isn’t working). 19.8 allows me to include line breaks in the replace string, but the conversion to html isn’t working correctly.
Is there a way round the formatting issue in 19.8? or alternatively an earlier version in between 16.6 and 19.8 where I can do both the conversion, and the replace operation with line breaks?