kurent wrote:
> I did figure out where it goes wrong with the help of your example - with
> font definition. I embedded the font because without it I cannot guarantee
> special characters of my language being displayed correctly.
> 
> BaseFont BaseFontek = null;
> try
> {
> BaseFontek =
> BaseFont.createFont("GS_confidentialA1_priority1\\defenseStatusReports\\iText_font\\verdana.ttf",
> BaseFont.CP1250, BaseFont.EMBEDDED);
> } catch (DocumentException e) { }
> 
> // step 4: we add a paragraph to the document 
> Font font = new Font(BaseFontek, 12, Font.BOLD);
> 
> 
> But when doing this bold text is transparent. 

Please read what the book about iText says about this. Verdana is a 
"FONT FAMILY". This font family consists of different fonts, that are in 
different font files, such as verdana.ttf, verdanai.ttf, verdanab.ttf, 
verdanaz.ttf, etc...

These are DIFFERENT fonts, so if you need Verdana Bold, you need 
something like baseFontek = BaseFont.createFont(
"GS_confidentialA1_priority1\\defenseStatusReports\\iText_font\\verdanab.ttf",
BaseFont.CP1250, BaseFont.EMBEDDED);

You can't expect Font font = new Font(BaseFontek, 12, Font.BOLD); if you 
don't follow the rules as described in the book (for this to work, you 
need to REGISTER all the fonts in the family). This being said: having 
more info about the problem, I notice that the fact if the page was 
rotated or not was irrelevant, wasn't it?
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to