Information gathered from the controller: ${randomString}
ID | Name | Age |
---|---|---|
${id} | ${name} | ${age} |
styled with css... |
Favorite food: ${pdf?.food}
Favorite food: ${pdf?.food.toString()}
Hometown: ${pdf?.hometown}
${pdf}
Images with relative URL's are automatically resolved by the the modified version of XHTMLrenderer included with the plugin
Images with absolute URI's also do just fine:
Hint: One way to style gsp's that you intend to make into pdf's is to have two seperate style sheets one for media="print" and one for media="screen". The print style sheet will be used to style the PDF, and if PDF generation fails you will get a styled HTML view that isn't all weird because of fonts sized in pt and such.
Varialbles passed into gsp that the plugin will render as PDF need to start with pdf. so for example the form field name was hometown and to reference that varialbe here we needed {pdf.hometown}
${content}