Hi

Yeah its a missing feature to be able to load a pdf document from the
classpath. It currently requires you to create the PdfDocument
instance yourself.

You are welcome to log a JIRA ticket to improve this so we can load
the resource from file/classpath etc.
http://camel.apache.org/support.html

And contributions is welcome
http://camel.apache.org/contributing.html

On Mon, Jun 6, 2016 at 9:28 AM, Luc Engelen <[email protected]> wrote:
> Hi,
>
> I'm trying to extract text from PDF files using the Camel PDF component.
> Unfortunately, I'm running into a NullPointerException each time I send a
> PDF file to the component. I've set up a route in a Camel test that connects
> a direct component to a PDF component. When I send PDF files to the direct
> component, the exception is thrown once the message reaches the PDF
> component.
>
> The exception is thrown in the class PdfProducer. The line "PDDocument
> document = exchange.getIn().getBody(PDDocument.class);" in this class
> results in document being null. When a method is called on document, the
> NullPointerException is thrown. As far as I can tell, this is the result of
> a missing TypeConverter.
>
> The failing test is available on Github:
> https://github.com/ljpengelen/camel-pdf-integration-test.
>
> Is this a bug or am I doing something wrong?
>
> Best regards,
>
> Luc
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Failing-to-extract-text-with-Camel-PDF-component-tp5783483.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to