You are right, I made a stupid mistake and the font is changed somewhere else !
Thanks for your help and advices.

Pierre

----- Original Message ----- 
From: "Bruno Lowagie" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Friday, May 16, 2008 11:50 AM
Subject: Re: [iText-questions] Change of font/size


Looking at your code, there are still many possible causes:

Pierre Gilquin wrote:
>     private static Font grasFont = FontFactory.getFont(FontFactory.HELVETICA, 
> 8, Font.BOLD, new Color(0, 0, 0));

This is a private static variable; can you make it a constant?
How to make sure it's not changed somewhere else in that (incomplete)
class file you've sent us.

This part could be written in a cleaner way:
>         Paragraph paragraphDocteurs = new Paragraph(
>             "Service de Pharmacologie et Toxicologie cliniques\n",
>             stFont);
>         Phrase el2 = new Phrase(
>             "Centre d'informations thérapeutiques et de pharmacovigilance\n",
>             grasFont);
>         paragraphDocteurs.add(el2);
>         document.add(paragraphDocteurs);

Why are you working with \n and adding separate Phrases,
you risk less errors if you create Paragraphs instead of Phrases,
and add them to the document one by one. That's more efficient.
However, if this is the cause of the problem, you must be using
different iText versions and experience some font propagation
problem. Without the PDFs, we can't check the document properties
to find out if you're really using the same iText version.

But most of all, I'd like to see the content stream, more specifically
the operand used with the operator that sets the font and size.

br,
Bruno


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to