Title: Re: [iText-questions] Extracting Attachments from PDF

Would anyone be able to supply example code as to how to extract attachments from a PDF???

 

The things that I am most concerned about are:

 

  1. getting the attached file(s)
  2. getting the filename
  3. getting the mimetype

 

any assistance will be appreciated

 

Neil

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paulo Soares
Sent: 28 August 2006 11:36 PM
To: Post all your questions about iText here
Subject: RE: [iText-questions] Extracting Attachments from PDF

 

There's a lot more code in ExtractAttachments.

Paulo

 


From: [EMAIL PROTECTED] on behalf of Neil Lane
Sent: Mon 28-Aug-06 21:23
To: 'Post all your questions about iText here'
Subject: Re: [iText-questions] Extracting Attachments from PDF

I am using the following

log.info("getting the dictionary");
PdfDictionary dictionary = reader.getCatalog();
               
try
{
        ExtractAttachments.unpackFile(reader, dictionary,
"//opt/jboss-4.0.4//server//all//extract.xls");
}
catch (Exception e)
{
    e.printStackTrace();                 
}

Surely this should extract the attachment(s) and write the file to the
location provided???




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Paulo
Soares
Sent: 28 August 2006 07:41 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Extracting Attachments from PDF

That class extracts all the attachments in document and annotations. As far
as I know there aren't any others. Post a link to your PDF and tell us what
you'd expect to happen.

Paulo

----- Original Message -----
From: "Neil Lane" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, August 28, 2006 4:17 PM
Subject: [iText-questions] Extracting Attachments from PDF


> Hi
>
>
>
> I am trying to extract all the attachments from a PDF.
>
>
>
> I have tried to use the com.lowagie.tools.plugins.ExtractAttachments class
> to do this, but no joy
>
> Please can someone assist with this issue?
>
> Thanks in advance
>
>
> Neil Lane

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