You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2024/07/30 08:19:00 UTC

[jira] [Resolved] (CAMEL-21026) camel-pdf: simplify conversion from byte array to PDF

     [ https://issues.apache.org/jira/browse/CAMEL-21026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Otavio Rodolfo Piske resolved CAMEL-21026.
------------------------------------------
    Resolution: Fixed

> camel-pdf: simplify conversion from byte array to PDF
> -----------------------------------------------------
>
>                 Key: CAMEL-21026
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21026
>             Project: Camel
>          Issue Type: Task
>          Components: camel-pdf
>    Affects Versions: 4.7.0
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>             Fix For: 4.8.0
>
>
> When receiving a PDF document as a byte array, users need to convert the data manually to a PDF document. For instance, consider a route like: 
> {code:java}
>     from("direct:consumePDF")
>                 .process(this::convertBytesToPDFFile) // -> this is needed to convert
>                 .pipeline()
>                     .to("pdf:extractText")
>                     .process(...);
> {code}
> Then, the {{convertBytesToPDFFile}} should contain something like: 
> {code:java}
> final byte[] body = e.getMessage().getBody(byte[].class);
> PDDocument document = Loader.loadPDF(body);
> {code}
> This makes designing routes that consume PDFs harder.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)