Hi,
When I’m converting from html to RTF the font size is decreasing in RTF document.
The following code i have used for conversion
String htmlString="<p><span style=\"font-family: Arial; font-size: 10px;\">Trademark logo ® for testing in the ™ templates.</span></p>";
HtmlLoadOptions options = new HtmlLoadOptions();
options.setLoadFormat(LoadFormat.HTML);
options.setPreserveIncludePictureField(true);
ByteArrayInputStream is = new ByteArrayInputStream(htmlString.getBytes(Charset.forName("UTF-8")));
Document doc = new Document(is, options);
ByteArrayOutputStream os = new ByteArrayOutputStream();
com.aspose.words.SaveOptions saveOptions = com.aspose.words.SaveOptions.createSaveOptions(SaveFormat.RTF);
saveOptions.setSaveFormat(SaveFormat.RTF);
doc.save(os, saveOptions);
String rtfString = new String(os.toByteArray(), StandardCharsets.UTF_8);
In the code i gave 10px font size for html and I’m sending you the output file in that you can see font size change other than 10px.InsertDocumentAtReplace_out.zip (10.4 KB)