Okay, answered my own question (sorry, I'm new to iText - I just downloaded
it today).
Because you can tell the type of each element you parse, then you can set
the spacing under a paragraph by simply using SpacingAfter:
//--------------------------------------
ArrayList elementList = HTMLWorker.ParseToList(strReader, theStyleSheet);
iTextSharp.text.IElement theElement;
iTextSharp.text.Paragraph theParagraph;
for (int k = 0; k < elementList.Count; ++k)
{
theElement = (iTextSharp.text.IElement)elementList[k];
if (theElement.Type == Element.PARAGRAPH)
{
theParagraph = (iTextSharp.text.Paragraph)elementList[k];
theParagraph.SpacingAfter = 10.0F;
document.Add(theParagraph);
}
else
{
document.Add(theElement);
}
}
//--------------------------------------
Dan
--
View this message in context:
http://www.nabble.com/HTMLWorker%3A-Stylesheet-not-affecting-p-elements-tp22896923p23993410.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/