Hi,
Is it possible to set default fonts as in MS Word?
Thanks.
Document doc = new Document();
Section section1 = doc.addSection();
// Set font
Paragraph para1 = section1.addParagraph();
para1.getStyle().getCharacterFormat().setFontName("Times New Roman");
para1.getStyle().getCharacterFormat().setFontSize(15);
para1.appendText("Hello World");
para1.appendText("123241241");
para1.appendText("Spire.Doc");
section1.addParagraph().setText("TestFont");
section1.addParagraph().appendText("E-iceblue.Test");
doc.addSection().addParagraph().setText("TestSpire.DocFont");
doc.saveToFile("testFont.docx");