Hello,
i use HTMLWorker for rendering a PdfPTable with SUB- and SUP-Elements.
If i select with
styles.loadTagStyle("body", "size", "4px");
a smaller font, the subscripts are positioned to low as within the bigger font.
A lot of tries with f.e.
styles.loadTagStyle("SUB", "SUBSUPSCRIPT", "4px");
or
styles.loadTagStyle("SUB", "textrise", "20.0px");
doesn't work.
What's wrong ?
TIA
Regards
Ingo
============================
The excerpt from the code :
Font font_header = new Font( Font.HELVETICA, 4);
PdfPTable table = new PdfPTable( columnCounter);
StyleSheet styles = new StyleSheet();
styles.loadTagStyle("body", "size", "4px");
// styles.loadTagStyle("SUB", "SUBSUPSCRIPT", "4px");
// styles.loadTagStyle("SUB", "textrise", "20.0px");
// rs : Resultset from Database
String line = rs.getString("beschriftung_d");
ArrayList objects = HTMLWorker.parseToList( new StringReader( line ), styles );
Paragraph para = new Paragraph( "", font_header );
for (int k = 0; k < objects.size(); ++k)
{
Element headerContent = (Element) objects.get(k);
PdfPCell cell = new PdfPCell(para);
cell.addElement( headerContent );
table.addCell( cell );
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/