Op 5/05/2011 21:01, Brendan Ganning schreef:
> I agree, I don't mind parsing out the values. If I have the full 
> content stream, I would just parese it out and get this nissianIQi and 
> parse it.  I originally was able to read in the PDF via coldfusion's 
> pdf tag.  However after someone did a save as on the pdf I lost part 
> of the stream.
>
> Forgive me as I am new to this, so what you are saying is I can get 
> the content stream through something like
>
> <cfscript>
> /* Read the PDF */
> reader = 
> CreateObject("java","com.lowagie.text.pdf.PdfReader").init(expandPath("test.pdf"));
>
> /* Get the Page Dictionary object, I think I need this to read the 
> stream? */
> pageDict = reader.getPageN(1);
>
> /* Create a pdfname object */
> pdfname = createObject("java","com.lowagie.text.pdf.PdfName");
>
> Now I see the dictionary has a getAsStream
> however pageDict.getAsStream(pdfName) doesnt work.
???
In don't understand Cold Fusion code, but it seems clear that you're 
cutting too many corners in your snippet.

You say you're able to get the text from the Text annotation. Well, now 
you need to get the normal appearance stream from the Stamp annotations. 
In the page dictionary, you need to get the /Annots. This is an array 
with 7 annotations: 1 Text, 3 Popup and 3 Stamp annotations (If I 
remember correctly). You need to get the /AP from the /Stamp 
annotations. In the /AP, you have the normal appearance /N. This /N 
refers to a Stream. That's the stream you need.

------------------------------------------------------------------------------
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