At 04:17 PM 7/11/2006, Helix Yz wrote:
>could anyone please provide me with pointers on how to go about
>implementing some PDF checking functions, namely verifying that
>content is within a given margin and that any colourful objects are
>represented in CMYK space.

         iText does not have any high level APIs that would enable 
such a thing.  You will have to get into the details of PDF content 
and object structure and use the low level features.

         The alternative would be for you to look at existing tools 
that can provide you with the details you want (usually in XML) and 
then produce your report from that.


>   get page content: PdfDictionary dict = reader.getPageN(pageNum)

         That's NOT the page content - that's the Page Object that 
contains references to all the "things" that are referenced by the 
page, only one of which (/Contents) is the actual contents.  Other 
things range from thumbnails to actions to resources to structure/tagging info.


>   get names (keys) of all objects on the page using dict.getKeys()

         So yes, you would need to iterate the objects of the content 
stream - and this is where iText doesn't have any APIs.  It can give 
it back to you as a raw stream of text, but you would need to be 
responsible for parsing it and giving it "meaning".

         In addition, there are a variety of other places in a PDF 
other than the Page content stream where content lives..


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[EMAIL PROTECTED]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)



-------------------------------------------------------------------------
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&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to