Hi, Can you please let me know if there is a API to replace a specific font with other in entire document. Ex: Replace Times New Roman with Arial . Below code seems working but not sure if it is effieciant. Thank you.
for (Paragraph p : (Iterable) doc.getChildNodes(NodeType.PARAGRAPH, true)) {
for (Run run : p.getRuns()) {
if(“Times New Roman”.equalsIgnoreCase(run.getFont().getName())){
run.getFont().setName(“Arial”);
}