You can go to XMLWorkeriText. Below code will provide you content in orange
document.open();
String finall= "<style>h1{color:orange;} </style><body><h1>This is a Demo</h1></body>";
InputStream is = new ByteArrayInputStream(finall.getBytes());
XMLWorkerHelper.getInstance().parseXHtml(pdfWriter,document, is);
document.close();
HTML , , PDF. , , XHTML , .
, HTML <br>, <br/> , .