How To Convert rtf To String In Java?

public String convertRtfToText(String fareRules) throws IOException, BadLocationException { try { byte[] x = Base64.getDecoder().decode(fareRules.getBytes()); RTFEditorKit rtfParser = new RTFEditorKit(); Document document = rtfParser.createDefaultDocument(); rtfParser.read(new ByteArrayInputStream(x), document, 0); String fareRuleText = …

How To Convert rtf To String In Java? Read More