Not reliably, no... not without a Huge amount of work (or a PDF renderer). You'd have to:
1) Parse all pages' contents looking for color operators. RGB, G, and so forth. 2) Search through all image resources to see what colors they used. 3) There are several kinds of resource that can contain their own resources and/or drawing operators that might include color changes. OR Render the PDF and look through the resulting image. iText cannot do that. Another open source project, GhostScript, can but it's written in C, not Java. PS: why do you need to know? And are shades of gray okay, or just B&W? --Mark Storer Senior Software Engineer Cardiff Software #include <disclaimer> typedef std::Disclaimer<Cardiff> DisCard; > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Rudi > Verago [vlain] > Sent: Monday, May 22, 2006 4:32 PM > To: itext-questions > Subject: [iText-questions] Color info > > > Hi everybody, > I'm using itextsharp from 2 days and I find it very useful. > In some case I have to find information about pdf files, I > correctly detect orientation, size and number of pages but I > cannot find any information about color. > > Is there any way to detect if a pdf is color or black/white? > Or any way to find if there is a istance of a color in a pdf > document? Also some tricks... > > Thanks and bye, > > Rudi > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
