As Bruno said, you'll need to work at a MUCH lower level to accoimplish these 
things, but they are both doable.  However, it will require that you read ISO 
32000-1:2008 to understand the details of PDF and then get into the guts of 
iText.

* Determining if all fonts are embedded is well defined as certainly doable.  
Just iterate over all text/fonts in use and check the names.

* Text color is a LOT harder, because there are 11 different(!) colorspaces in 
PDF – and you will need to determine "black" in each one of them.

Leonard

From: Jeremy Rocke <[email protected]<mailto:[email protected]>>
Reply-To: Post here 
<[email protected]<mailto:[email protected]>>
Date: Mon, 8 Aug 2011 14:48:47 -0700
To: Post here 
<[email protected]<mailto:[email protected]>>
Subject: [iText-questions] Reader capacities

Hello,
I am a developer for AutoDocs, and am attempting to see if we can integrate 
iText with one of our goals.

What we need is the ability to read PDF’s and view Metadata(for a lack of a 
better word).  I know you all have a PDF reader but unfortunately from what I 
can tell with all my research iText is focused on writing data, which makes 
what we are trying to do difficult.

To put into context we want to check PDFs fit requirements before allowing them 
to upload them.  For example:
            //color
            Paragraph p = new Paragraph(10);
            if (p.Font.Color == iTextSharp.text.BaseColor.BLACK)
                x++;//Pass
            //embeded
            if (p.Font.BaseFont.IsEmbedded())
                x++; //pass

Things like-> make sure all font is black and all text in the PDF is embedded.  
Unfortunately I have yet to find a way to get your reader to give me a 
paragraph object or any similar device to do these checks.

Am I blind and missing something?  Or does your library not support a strong 
reading model?

Ofcourse if we find you libraries useful and able to provide us with the 
solution we need, you can expect to hear from us to inquire about a license.

Jeremy Rocke
AutoDocs, LLC
703-532-9720
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
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