Op 28/04/2011 15:23, Balajiprasad schreef:

Hi,

Is it possible to change entire text color to black in the existing pdf. In this case we need to open a pdf and change all text color to black inside the PDF.


In that case you need to parse all the content streams (page content streams and form XObjects) for color fill operators (see table 14.8 of iText in Action). You need to replace these operators and their operands by something like "0 g" (gray fill operator with operand 0 = black). Of course, you'll have the side-effect that all other shapes (e.g. vector images) will also turn black. What you're asking isn't impossible (assuming that you're talking about real text, not about text in an image), but it's not trivial either.

Before you ask: we don't have an example on how to do this, but we do sell consultancy.
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
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