It's the right way for attachments at the document level but you may have also 
attachments at the page level and they are not located in NAMES. More details 
in the PDF reference.

Paulo 

-----Original Message-----
From: r00fus [mailto:[email protected]] 
Sent: Wednesday, May 12, 2010 5:52 PM
To: [email protected]
Subject: Re: [iText-questions] Remove pdf attachments


1T3XT info,

Thanks, but what I'd like to know is why, in the following code, names is
NULL :
 PdfDictionary catalog = reader.getCatalog(); 
 PdfDictionary names =
(PdfDictionary)PdfReader.getPdfObject(catalog.get(PdfName.NAMES));   

Is this the wrong way to access the NAMES catalog/dictionary within the PDF?


1T3XT info wrote:
> 
> r00fus wrote:
>> Mark,
>> I've attached the pdf here:
>> http://n4.nabble.com/file/n2174232/Test.pdf Test.pdf 
>> 
>> It's not embedded videos... and most of the attachments themselves are
>> pdfs
>> (this example includes a doc file as well).
> 
> You're trying to remove document level attachments,
> but the attachments are file attachment annotations.
> 
> Don't know where you found the example, but you took the wrong one.
> (This will all be explained soon in chapter 16 of iText in Action 2E).
> -- 
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
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