gpc / rendering

Provides rendering of GSPs as PDFs, JPEGs, GIFs and PNGs
http://gpc.github.com/rendering
Apache License 2.0
31 stars 45 forks source link

Achieving Page Rotation with Rendering Plugin #25

Open sohaiba opened 9 years ago

sohaiba commented 9 years ago

Hello!

We are using the rendering plugin (0.4.4) with grails version 2.2.4 to generate a pdf file via the RenderingService. Our controller uses the following lines of code to generate and save the file locally on the server:

new File(completeFileName).withOutputStream { outputStream ->
            pdfRenderingService.render(controller: this, template: 'report/ReportPdfTmpl', model:[id : id], outputStream)};

We are trying to rotate the first page 90 degrees counterclockwise so that even if it is printed as portrait, it still has a default landscape orientation. This is similar to what we can achieve via the transform : rotate (-90deg) property in html markup in a browser. Is it possible to achieve this for the generated pdf? If so, please let us know how.

Thank you!