Perhaps you forgot to set the fill color back to black before drawing the text??

From: Sailesh K <[email protected]<mailto:[email protected]>>
Reply-To: Sailesh K <[email protected]<mailto:[email protected]>>
Date: Wed, 19 Oct 2011 07:47:51 -0700
To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
Cc: Post here 
<[email protected]<mailto:[email protected]>>
Subject: Re: [iText-questions] What Text Rendering mode should I use

For some reason, when I do this, the text just disappears. I have the 
background fill set
to white:
so this
contentBye.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE_CLIP);

causes it to appear with the font in black outline and white inside and this:

content.setTextRenderingMode(0);

causes the font to disappear altogether. puzzling ...
From: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
To: Sailesh K <[email protected]<mailto:[email protected]>>; Post here 
<[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 19, 2011 9:04 AM
Subject: Re: [iText-questions] What Text Rendering mode should I use

Then don't set the render mode, or set it to 0.

From: Sailesh K <[email protected]<mailto:[email protected]>>
Reply-To: Sailesh K <[email protected]<mailto:[email protected]>>, Post 
here 
<[email protected]<mailto:[email protected]>>
Date: Wed, 19 Oct 2011 05:54:24 -0700
To: Post here 
<[email protected]<mailto:[email protected]>>
Subject: [iText-questions] What Text Rendering mode should I use

Hi,

I have an OCG which I am filling with a background Color. when I then try to
add text using contentByte.showTextAligned ...the writing appears with only the
outlines of the writing but the fill color seeping into the lettering itelf. 
What
TextRenderingMode should I be using instead?

currently, I have:
contentBye.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE_CLIP);

Tried a couple of the others too... but really need the lettering to show up in 
the normal solid,filled style.

Cheers



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to