You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sumatheja <su...@gmail.com> on 2011/06/01 17:17:52 UTC

Reading a pdf file in camel

Hi,
   I'm a newbie to camel. Want to know if the file component in camel can
read a pdf? if not is there a way to read a pdf using camel??

    Any help will be much appreciated.
Thanks in advance.

--
View this message in context: http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445535.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reading a pdf file in camel

Posted by Claus Straube <cl...@catify.com>.
To do this with camel today you need a processor (if you don't want to 
wait for the implementation ;). It should work with something like this:

from("file:///my-pdfs?noop=true&fileName=hello.pdf").process(new 
Processor() {

                     public void process(Exchange exchange) throws 
Exception {

                         GenericFile file = 
exchange.getIn().getBody(GenericFile.class);
                         // do something with pdfbox here...

                     }
                 }).to("mock://out");

On 01.06.2011 17:44, Christian Schneider wrote:
> Yes and there is already an issue open to create a component for it:
> https://issues.apache.org/jira/browse/CAMEL-3552
>
> It the mean time it is the easiest way to create a custom processor 
> and call pdfbox from there.
>
> Christian
>
>
> Am 01.06.2011 17:40, schrieb mitko.kolev@icw.de:
>> Maybe you should take a look at pdfbox  http://pdfbox.apache.org/
>>
>



Re: Reading a pdf file in camel

Posted by sumatheja <su...@gmail.com>.
I was about to try that out. Anyways thanks for the response.

--
View this message in context: http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445650.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reading a pdf file in camel

Posted by Christian Schneider <ch...@die-schneider.net>.
Yes and there is already an issue open to create a component for it:
https://issues.apache.org/jira/browse/CAMEL-3552

It the mean time it is the easiest way to create a custom processor and 
call pdfbox from there.

Christian


Am 01.06.2011 17:40, schrieb mitko.kolev@icw.de:
> Maybe you should take a look at pdfbox  http://pdfbox.apache.org/
>

-- 
--
Christian Schneider
http://www.liquid-reality.de

Apache CXF and Camel Architect
Talend Application Integration Division http://www.talend.com


Re: Reading a pdf file in camel

Posted by mi...@icw.de.
Maybe you should take a look at pdfbox  http://pdfbox.apache.org/







From:
sumatheja <su...@gmail.com>
To:
users@camel.apache.org
Date:
01.06.2011 17:39
Subject:
Re: Reading a pdf file in camel



Thanks for the response.. my requirement is to read the data in the pdf. 
Is
that possible? 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445597.html

Sent from the Camel - Users mailing list archive at Nabble.com.




�� 

InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), J�rg Stadler  
Aufsichtsratsvors.: Prof. Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Altrottstra�e 31  
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  

Re: Reading a pdf file in camel

Posted by sumatheja <su...@gmail.com>.
Thanks for the response.. my requirement is to read the data in the pdf. Is
that possible? 

--
View this message in context: http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445597.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Reading a pdf file in camel

Posted by Claus Straube <cl...@catify.com>.
Hi,

I haven't done it yet - but I would try it. Should be a thing of 5 
minutes ;)
http://camel.apache.org/file2.html

Best regards - Claus

On 01.06.2011 17:17, sumatheja wrote:
> Hi,
>     I'm a newbie to camel. Want to know if the file component in camel can
> read a pdf? if not is there a way to read a pdf using camel??
>
>      Any help will be much appreciated.
> Thanks in advance.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445535.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Reading a pdf file in camel

Posted by Taariq Levack <ta...@gmail.com>.
Great thanks, I'll also be looking for that component.

Taariq

On Thu, Jun 2, 2011 at 9:06 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>wrote:

> Hi all,
>
> I wrote a Camel component based on iText for that. It also support POI. I
> raised a Jira for that, I will add the patch beginning of the next week.
>
> Regards
> JB
>
>
> On 06/01/2011 05:34 PM, Christian Schneider wrote:
>
>> The file component can read pdfs but it won´t interpret them. So you
>> would have to work with the bindary data.
>>
>> Are you interested in extracting the text of the document are do you
>> want to just process the pdf as is?
>>
>> Christian
>>
>>
>> Am 01.06.2011 17:17, schrieb sumatheja:
>>
>>> Hi,
>>> I'm a newbie to camel. Want to know if the file component in camel can
>>> read a pdf? if not is there a way to read a pdf using camel??
>>>
>>> Any help will be much appreciated.
>>> Thanks in advance.
>>>
>>> --
>>> View this message in context:
>>>
>>> http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445535.html
>>>
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>

Re: Reading a pdf file in camel

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi all,

I wrote a Camel component based on iText for that. It also support POI. 
I raised a Jira for that, I will add the patch beginning of the next week.

Regards
JB

On 06/01/2011 05:34 PM, Christian Schneider wrote:
> The file component can read pdfs but it won´t interpret them. So you
> would have to work with the bindary data.
>
> Are you interested in extracting the text of the document are do you
> want to just process the pdf as is?
>
> Christian
>
>
> Am 01.06.2011 17:17, schrieb sumatheja:
>> Hi,
>> I'm a newbie to camel. Want to know if the file component in camel can
>> read a pdf? if not is there a way to read a pdf using camel??
>>
>> Any help will be much appreciated.
>> Thanks in advance.
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445535.html
>>
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>

Re: Reading a pdf file in camel

Posted by Christian Schneider <ch...@die-schneider.net>.
The file component can read pdfs but it won´t interpret them. So you 
would have to work with the bindary data.

Are you interested in extracting the text of the document are do you 
want to just process the pdf as is?

Christian


Am 01.06.2011 17:17, schrieb sumatheja:
> Hi,
>     I'm a newbie to camel. Want to know if the file component in camel can
> read a pdf? if not is there a way to read a pdf using camel??
>
>      Any help will be much appreciated.
> Thanks in advance.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Reading-a-pdf-file-in-camel-tp4445535p4445535.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
--
Christian Schneider
http://www.liquid-reality.de

Apache CXF and Camel Architect
Talend Application Integration Division http://www.talend.com