Hi,

Having gotten help regarding this in the past (Thanks Paolo and Leonard...) i have now stumbled across something that i can't seem to fix. I currently use HtmlWorker together with StyleSheet to populate a PDF using HTML. Most of this works like a dream. The problem is that i need to force the fonts (normal font) to use Times-roman 11pts. Whatever i try, i always get Times-roman 12 pts (equal to font size="4"). Since there is no way other than to use a StyleSheet, i have tried to add directives for this size using the StyleSheet class:

                                styles = new StyleSheet();                                
                                styles.loadStyle("pdfFont", "size", "11px");                                
                                styles.loadStyle("pdfFont", "font-size", "11px");

                                ArrayList array = HTMLWorker.parseToList(sr,style);  // array of itext objects                
                                                                                       
                                float[] position = af.getFieldPositions( bodyFieldName );
                                ...
                                ...

(I define my font as a class called "pdfFont". Have also tried to use loadTagStyle for fonts of class "pdfFont" as well as for normal font tags. Have tried "px" and "pt"... No success)

Whatever i try, the font size is always 12pts

Is it possible to control this in such a granular matter? What would be the best way to achieve this?

Since (as i know of) only NN browsers allow for controling the "point size" in the HTML directly, this is not an option either (we mainly use IE).

Kind regards

Daniel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to