<% grid = @page.forms.grid @props.gh = @addForm('grid').gridHelper() gridWidth = @props.gh.width() %> pdfDocument = { {BEGIN backgroundImage} background: { image: {$backgroundImage}, {BEGIN bgWidth} imgWidth: {$bgWidth}, imgHeight: {$bgHeight}, {END bgWidth} }, {END backgroundImage} styles: { <% include "pdf/style.htm", @self() %> }, defaultStyle: { <% include "pdf/default-style.htm", @self() %> }, "content": [ <% location = 'top' %> <% if @page.forms[ location ] : %> <% include @page.forms[ location ].pdfTemplate( @addForm( location ) ), @addForm( location ) %>, <% end %> <% location = 'above-grid' %> <% if @page.forms[ location ] : %> <% include @page.forms[ location ].pdfTemplate( @addForm( location ) ), @addForm( location ) %>, <% end %> <% location = 'grid' %> <% if @page.forms[ location ] : %> <% include @page.forms[ location ].pdfTemplate( @addForm( location ) ), @addForm( location ) %>, <% end %> <% location = 'below-grid' %> <% if @page.forms[ location ] : %> <% include @page.forms[ location ].pdfTemplate( @addForm( location ) ), @addForm( location ) %>, <% end %> ] }; pdfFonts = {$pdfFonts};