I have an RTF file with tracked changes. I included deleted text, inserted text, and reformatted text (bold, italics, underline) in the tracked changes. When I save the document as HTML only the inserted text and the deleted text is properly rendered … new text is underlined and red, deleted text is struck through and red.
The formatting changes are ignored. The rendered HTML displays the original formatting with no indication of any tracked change.
How can I get the updated format to display in the HTML output and have it highlighted as a change?
Here is the relevant piece of code, where ‘document’ contains the input RTF document …
RevisionOptions ro = document.getLayoutOptions().getRevisionOptions();
ro.setRevisedPropertiesColor(RevisionColor.BLUE);
ro.setRevisedPropertiesEffect(RevisionTextEffect.UNDERLINE);
final HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setExportImagesAsBase64(true);
saveOptions.setCssStyleSheetType(CssStyleSheetType.INLINE);
saveOptions.setSaveFormat(SaveFormat.HTML);
final ByteArrayOutputStream os = new ByteArrayOutputStream();
document.save(os, saveOptions);