Adobe CQ Prepends Front Header Image to Pages with .pdf Extension
In this post, I'll show you how to render PDF documentation (.pdf) with an extra image page prepended to the front of the whole PDF document, and how to embed an extra image to the top of an existing page.
I'm using CQ5.6.1 which is not too reliable when I played with an extension so, after trial and error, I modified the above file to reference proxy.jsp using the full path and without carriage return at the end of the line to avoid any possible 500 Internal Server Error. The Page.pdf.jsp file now saved have only one line:
<%@include file="/libs/foundation/components/primary/cq/Page/proxy.jsp" %>
For rendering .pdf, I use the out of the box PDF Rewriter mechanism. CQ5 demonstrates the default PDF Rewriter in their demo sites. For example, you can change an existing URL ends with .html extension:
to .pdf extension to see the default behavior of PDF Rewriter output of a page: