I have a document file (DOCX) in which I am inserting the content of an RTF file after using
DocumentBuilder.insertDocument(rtfDoc, ImportFormatMode), I want to to set the font size of the inserted content.
I tried using DocumnetBuilder.getFont().setSize(10), but it does not work.
Please suggest which API to use to set the font size of the inserted content.
Thanks for your inquiry. You can set the font size of inserted rtf contents using following code example. Please check the code of FontChanger class in attachment.
Document rtf = new Document(MyDir + "in.rtf");
FontChanger changer = new FontChanger(11);
rtf.accept(changer);