Sample PDF Output

This is simple HTML

this has inline CSS

Here is some data passed from the contorller...

Information gathered from the controller: ${randomString}

Here is some information sent in the URL and handled by a controller (get variables):

ID Name Age
${id} ${name} ${age}
styled with css...
laptop

checkbox: %{-- checkboxes used to cause an error in pdf generation, but now they simply don't show up... --}%

%{-- text field sample --}%

Text Input:

Here is some information gathered from a form and handled grails render method (post variables):

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

laptop

Images with absolute URI's also do just fine:

laptop2

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.