Document.add(Chunk) does not change the document leading. Put your
chunks inside a Paragraph.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Fleischer, Klaus
> Sent: Monday, May 10, 2004 5:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: [iText-questions] first newlines missing, first 
> chunks overprinted
> Importance: High
> 
> Problem:
> If a Document begins with chunks or Chunk.NEWLINE,
> the newlines will not be printed, the chunks will
> be overprinted.
> 
>  <<Test examples.java>> 
> Patch:
> The reason of that behaviour is that in line 423 of
>  * $Id: PdfDocument.java,v 1.174 2004/02/07 10:28:40 
> blowagie Exp $
>     leading is initiated with 0.
> 
> A quick solution is to insert after line 1192
>     case Element.CHUNK: {
> the following line:
>         leading = ((Chunk) element).font().leading(1.5f);
> 
> (The more beautiful solution, to initiate leading with 
> Float.NaN and do the setting here conditionally, does
> not work, (at least not so quick) because the 
> carriageReturn(); in line 2077 of initPage(), which is 
> called by open(), will try to insert a
> PdfLine with the height Float.NaN and I don't know,
> whether there are more side effects.)
> 
> 
> 
> With kind regards
>        Klaus Fleischer
> 
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to