Please help me .... I have a problem to convert the HTML string ...

1) I create function like this :-

public PdfPCell test(String textParam) {
PdfPCell pcell = new PdfPCell();
try {
    StringReader strReader = new StringReader(textParam);
    StyleSheet style = new StyleSheet();
    ArrayList p = HTMLWorker.parseToList(strReader, null);
    for (int k = 0; k < p.size(); ++k){
          pcell.addElement((Element) p.get(k));
    }
} catch (Exception e) {
    e.printStackTrace();
}
return pcell;
}

2) and I call that function from another function like this :-
datatable.addCell(String variable with simple HTML code (like bold,
underline and
listitem));

3) and the output :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to