Well yes I am replying to my own message. This is my first question, I am
wondering if I need more information? Did I miss a page about how to outline
a message? Maybe no one is getting my email?  Or maybe this question doesn't
fit into peoples knowledge base?  Let me know thanks!

On Thu, Nov 19, 2009 at 4:38 PM, Fake Name <email.address.j...@gmail.com>wrote:

> Hi,
>
> I currently have code that checks whether a given PDF has embedded files:
>
> ...
> PdfReader reader = new PdfReader(byteOutStream.toByteArray());
>             PdfDictionary names = (PdfDictionary)
> PdfReader.getPdfObject(reader.getCatalog().get(PdfName.NAMES));
>
>             if (names != null) {
>               PdfDictionary embFiles = (PdfDictionary)
> PdfReader.getPdfObject(names.get(new PdfName("EmbeddedFiles")));
>
>               if (embFiles != null) {
>               //REF A
>                ...
>                }
> ...
>
> Now this will catch both adobe packages and pdfs with attachments in the
> "//REF A" block.  Is there any way to differentiate the two?
>
>
> I also have a second question, please let me know if I should send a new
> email.
> The above code will catch a PDF with an attachment in "//REF A".  Take the
> same PDF and delete the attachment.  The above code is STILL catching this
> PDF in the "//REF A" block.  Is there some left over data on the PDF that is
> flagging this as having an embedded file?
>
> Thank you for all the help anyone can give!
> ~Matt
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to