How do I set an exchange header to the result of a route?
<p>I have a camel route which has a step which calls a subroute to convert the text portion of the body to PDF. Unfortunately <code>camel-pdf</code> does not preserve headers. Is there a way I can get the value of the subroute without losing my current exchange?</p>

<p><strong>Sub Route</strong></p>

<pre><code>from("seda:generate-pdf")

// Back up the original in a header
.setHeader("original", body())

// Create the PDF
.to("pdf:create?textProcessingFactory=autoFormatting")
// UHOH! All my headers are gone :(

// Set the PDF as the header for the doc server
.setHeader("pdf", body())

// Move the indicator back to the body
.setBody(header("original")) // &lt;-- this no longer exists
</code></pre>

<p><strong>Main Route</strong></p>

<pre><code>// Snip

// Unmarshal into Java

.unmarshal().json(JsonLibrary.Gson, MyReportContainingText.class)

// Call sub-route to generate the PDF
.inOut("seda:generate-pdf")
// UHOH! All my headers are gone :(

// Snip
</code></pre>