Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-06-12 Thread danparks
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

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-06-12 Thread danparks
I have a related question. If the element is a paragraph (p), then you could use SpacingAfter to create the desired white space after the paragraph. Something like this: //-- ArrayList elementList = HTMLWorker.ParseToList(strReader, theStyleSheet); iTextSharp

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-22 Thread 1T3XT info
Pauli Borodulin wrote: > Is there any reason why not replace the call > > currentParagraph = FactoryProperties.createParagraph(h); > > in the above p tag processing with > > currentParagraph = FactoryProperties.createParagraph(cprops); I changed the code in the SVN repository so tha

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-07 Thread 1T3XT info
Pauli Borodulin wrote: > Is there any reason why not replace the call > > currentParagraph = FactoryProperties.createParagraph(h); > > in the above p tag processing with > > currentParagraph = FactoryProperties.createParagraph(cprops); The major difference I see, is that createParag

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-06 Thread Pauli Borodulin
Harakiri wrote: > [...] > i showed you how you can by default add a new line - this is exactly > what browsers do If I read it correctly, the example showed how to add a new line in the beginning of every paragraph. Based on my knowledge on web browsers, the margin/spacing should be after each

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-06 Thread Harakiri
--- On Mon, 4/6/09, Pauli Borodulin wrote: > From: Pauli Borodulin > Subject: Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements > To: harakiri...@yahoo.com, "Post all your questions about iText here" > > Date: Monday, April 6, 2009, 12:31 PM

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-06 Thread Pauli Borodulin
Hi! Harakiri wrote: > Change the code of HTMLWorker - its not implemented correctly (depending on > your viewpoint =) - simply change the above code to > [...] > // create newline for P > currentParagraph.add(factoryProperties.createChunk("\n", > cprops)); > [...]

Re: [iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-06 Thread Harakiri
--- On Sun, 4/5/09, Pauli Borodulin wrote: > From: Pauli Borodulin > > Since iText's HTMLWorker doesn't add any margin > after p elements while > web browsers by default do, I tried adding some using > StyleSheet object: > HTMLWorker.startElement(String, > HashMap) has the following proce

[iText-questions] HTMLWorker: Stylesheet not affecting p elements

2009-04-05 Thread Pauli Borodulin
Heya! Since iText's HTMLWorker doesn't add any margin after p elements while web browsers by default do, I tried adding some using StyleSheet object: HTMLWorker hWorker = new HTMLWorker(doc); StyleSheet styles = new StyleSheet(); styles.loadTagStyle("p", "after", "10");