Dear Magnolians

I would like to render a magnolia page as PDF. Of course I could create my own 
filter which then gets the HTML-code using a HTTP client, then convert it to a 
PDF with one of the HTML-2-PDF libraries. But as Magnolia is built in a super 
flexible and modular way I would like to do it properly:

- create a template variation
- create a custom PDF renderer used by this variation
- return the generated PDF just like you would return the HTML page making full 
use of all the Magnolia features like cache and ACLs.

My current guess is to have a "onRender" method in my renderer which will 
render the content regularly as HTML, but will not write into the render 
context but rather a buffer. From there the HTML should be converted to a PDF 
(with the help of Flying Saucer or something alike) and then write the PDF to 
the render context.

- Does this seem like a good plan?
- As I only have access to the render context and not to the response directly, 
here can I set the mime type (or is it set automatically)?
- Has anyone already developed something like this and would like to share?

Thanks!
-will

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=f0b05b4e-814c-4317-af2c-8fef2203950a


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to