Hi I think the language component reads the resource as text based. Not sure if there is some explicit String.class conversion in there. Would need to check the code.
On Wed, Sep 24, 2014 at 4:03 AM, Rebecca Kreuter <alilyamongtho...@gmail.com> wrote: > I am trying to return a pdf as a response to a GET request. > For the time being I would like to return a pdf from a file on the classpath. > I tried using <to > uri="language:constant:resource:classpath:sample.pdf" /> as indicated > by [0]. > The file is coming through but it's been corrupted. > I tried convertBodyTo byte[] but I haven't gotten it to work. > Any thoughts? > Thank you. > > [0] http://stackoverflow.com/a/16811930/1623533 > > Before: > %PDF-1.5 > %âãÏÓ > > After: > %PDF-1.5 > %���� -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/