>Have you looked at class HTMLWorker?
>br,
>Bruno

I changed the code to use HtmlWorker and Stylesheet class.   after adding
the following to stylesheet class,I used HTMLWorker as below. ,
attached the pdf result. but no spacing between 2 paragraphs..did I miss any
attributes I can add using loadTagStyle for <p> tag. 

                        stylesheet.loadTagStyle("p", "face", "Times");
                        stylesheet.loadTagStyle("p", "leading", "15f");
                        stylesheet.loadTagStyle("p", "spacingAfter", "35f");
                        stylesheet.loadTagStyle("p", "spacingBefore", "35f");
                        stylesheet.loadTagStyle("p", "style",
"margin-top:20px;margin-bottom:20px");

                                                HTMLWorker worker = new
HTMLWorker(letterDocument);
                        FileReader reader = new FileReader("c:/simple.html");
                        worker.setStyleSheet(stylesheet);
                        worker.parse(reader);

http://www.nabble.com/file/7215/HtmlWorker.pdf HtmlWorker.pdf 
-- 
View this message in context: 
http://www.nabble.com/Paragraph-Spacing%3A-setLeading-adds-space-between-each-line-in-paragraph-and-spacingBefore-does-not-work-tf3396530.html#a9519481
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to