That's called font propagation. I know that Phrase should be immutable
at that level but iText started a long time ago and we don't have a time
machine to go back and do it right. If you create the Phrase with a font
from FontFactory it will work as expected.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of agostino sclauzero
> Sent: Tuesday, May 15, 2007 9:49 PM
> To: [email protected]
> Subject: [iText-questions] Paragraph.add strange behaviour
> 
> In the following code, i generate a pdf with two very simple 
> Paragraphs, the 
> first adding the Phrase objects prs1 and prs2, the second 
> adding just prs1.
> 
> Well, what I found in the output pdf fiels is like:
> 
> This is Phrase prs1. This is Phrase prs2.
> 
> This is Phrase prs1. This is Phrase prs2.
> 
> Has anybody idea of what's appening here?
> 
> thanks ind advance
> 
> Agostino
> 
> CODE:
> 
> //FIRST Paragraph
> 
> Paragraph parA = new Paragraph();
> 
> 
> Phrase prs1 = new Phrase ("This is Phrase prs1.");
> 
> parA.add(prs1);
> 
> 
> Phrase prs2 = new Phrase ("This is Phrase prs2.");
> 
> parA.add(prs2);
> 
> doc.add(parA); //doc is of course a previously defined 
> com.lowagie.text.Document object
> 
> //SECOND Paragraph
> 
> 
> Paragraph parB = new Paragraph();
> 
> 
> parB.add(prs1);
> 
> //parB.add(prs2);
> 
> 
> doc.add(parB);
> 
> 
> 
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> 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/
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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