You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Scott Duncan <sc...@hotmail.co.uk> on 2009/03/03 21:33:46 UTC

Help Extracting Attachments From A PDF

Good evening,
 
I am new to PDFBox and have been working on a PDF that is encrypted and can contain zero or more attachments.


I have successfully decrypted the attachment, however, I am looking for some guidance on how to extract attachments? I have debugged the application and as far as I can see the names dictionary is null. An example program or some code would be greatly appreciated.


Thanks,
 
Scott

_________________________________________________________________
Free photo editing software from Windows Live . Try it now! 
http://clk.atdmt.com/UKM/go/134665240/direct/01/

RE: Help Extracting Attachments From A PDF

Posted by Scott Duncan <sc...@hotmail.co.uk>.
Quick addition to the below. I created a test PDF document using the EmbeddedFiles example and then parsed this document searching for the embedded file.

 

This worked successfully, finding the attachment. However, when I search other documents with attachments, it does not find the attachments - 'document.getDocumentCatalog().getNames()' returns null.

 

Can attachments be added to a PDF document in more than one way?

 

Thanks,

 

Scott


 

 
> From: scott_dunc@hotmail.co.uk
> To: pdfbox-users@incubator.apache.org
> Subject: RE: Help Extracting Attachments From A PDF
> Date: Mon, 9 Mar 2009 21:31:11 +0000
> 
> 
> Hi Andreas,
> 
> 
> 
> Thanks for the reply.
> 
> 
> 
> I made the assumption that if PDFBox has the ability to allow you to add attachments, then it has an API to enable you to extract attachments.
> 
> 
> 
> Does anyone know if PDFBox does support extraction of attachments and if so how to do it?
> 
> 
> 
> Thanks,
> 
> 
> 
> Scott
> 
> > Date: Mon, 9 Mar 2009 16:29:22 +0100
> > From: a.lehmkuehler@lehmi.de
> > To: pdfbox-users@incubator.apache.org
> > Subject: Re: Help Extracting Attachments From A PDF
> > 
> > Hi Scott,
> > 
> > > I understand it is a busy time during the incubation period, so just a quick reminder about the query below. Even if any users in the past have implemented something similar, your guidance would be helpful.
> > > ...
> > >>
> > >> I am new to PDFBox and have been working on a PDF that is encrypted and can contain zero or more attachments.
> > >>
> > >>
> > >> I have successfully decrypted the attachment, however, I am looking for some guidance on how to extract attachments? I have debugged the application and as far as I can see the names dictionary is null. An example program or some code would be greatly appreciated.
> > I'm not familiar with every pdf-feature, but I guess this one is not 
> > supported by pdfbox, yet. I just flew through the code and can't find a 
> > hint for any code concerning that feature. But perhaps someone else 
> > knows more about that...
> > 
> > Andreas Lehmkühler
> 
> _________________________________________________________________
> View your Twitter and Flickr updates from one place – Learn more!
> http://clk.atdmt.com/UKM/go/137984870/direct/01/

_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

RE: Help Extracting Attachments From A PDF

Posted by Scott Duncan <sc...@hotmail.co.uk>.
Hi Andreas,

 

Thanks for the reply.

 

I made the assumption that if PDFBox has the ability to allow you to add attachments, then it has an API to enable you to extract attachments.

 

Does anyone know if PDFBox does support extraction of attachments and if so how to do it?

 

Thanks,

 

Scott
 
> Date: Mon, 9 Mar 2009 16:29:22 +0100
> From: a.lehmkuehler@lehmi.de
> To: pdfbox-users@incubator.apache.org
> Subject: Re: Help Extracting Attachments From A PDF
> 
> Hi Scott,
> 
> > I understand it is a busy time during the incubation period, so just a quick reminder about the query below. Even if any users in the past have implemented something similar, your guidance would be helpful.
> > ...
> >>
> >> I am new to PDFBox and have been working on a PDF that is encrypted and can contain zero or more attachments.
> >>
> >>
> >> I have successfully decrypted the attachment, however, I am looking for some guidance on how to extract attachments? I have debugged the application and as far as I can see the names dictionary is null. An example program or some code would be greatly appreciated.
> I'm not familiar with every pdf-feature, but I guess this one is not 
> supported by pdfbox, yet. I just flew through the code and can't find a 
> hint for any code concerning that feature. But perhaps someone else 
> knows more about that...
> 
> Andreas Lehmkühler

_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

Re: Help Extracting Attachments From A PDF

Posted by "A.Lehmkühler" <a....@lehmi.de>.
Hi Scott,

> I understand it is a busy time during the incubation period, so just a quick reminder about the query below. Even if any users in the past have implemented something similar, your guidance would be helpful.
> ...
>>
>> I am new to PDFBox and have been working on a PDF that is encrypted and can contain zero or more attachments.
>>
>>
>> I have successfully decrypted the attachment, however, I am looking for some guidance on how to extract attachments? I have debugged the application and as far as I can see the names dictionary is null. An example program or some code would be greatly appreciated.
I'm not familiar with every pdf-feature, but I guess this one is not 
supported by pdfbox, yet. I just flew through the code and can't find a 
hint for any code concerning that feature. But perhaps someone else 
knows more about that...

Andreas Lehmkühler

RE: Help Extracting Attachments From A PDF

Posted by Scott Duncan <sc...@hotmail.co.uk>.
I understand it is a busy time during the incubation period, so just a quick reminder about the query below. Even if any users in the past have implemented something similar, your guidance would be helpful.

 

Thanks,

 

Scott
 
> From: scott_dunc@hotmail.co.uk
> To: pdfbox-users@incubator.apache.org
> Subject: Help Extracting Attachments From A PDF
> Date: Tue, 3 Mar 2009 20:33:46 +0000
> 
> 
> Good evening,
> 
> I am new to PDFBox and have been working on a PDF that is encrypted and can contain zero or more attachments.
> 
> 
> I have successfully decrypted the attachment, however, I am looking for some guidance on how to extract attachments? I have debugged the application and as far as I can see the names dictionary is null. An example program or some code would be greatly appreciated.
> 
> 
> Thanks,
> 
> Scott
> 
> _________________________________________________________________
> Free photo editing software from Windows Live . Try it now! 
> http://clk.atdmt.com/UKM/go/134665240/direct/01/

_________________________________________________________________
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/