<% @props.gh = @gridHelper() rowHeights = [] if @location == "grid" columnWidths = @page.forms.grid.pdfColumnWidths( @props.gh ) rowHeights = @page.forms.grid.pdfRowHeights( @props.gh ) else columnWidths = [] columnWidths.push '*' for col in [1..@props.gh.width()] %> <% if @props.gh.width() && @props.gh.height() : %> { table: { <% if @form.tableForm() : %> tableForm: true, <% end %> location: '<%- @location %>', widths: [ <% for w, col in columnWidths : %> <% if @form.tableForm() : %> {BEGIN col_<%- @location %>_<%- col %>} <% end %> <%- JSON.stringify(w) %>, <% if @form.tableForm() : %> {END col_<%- @location %>_<%- col %>} <% end %> <% end %> ], <% if rowHeights.length : %> heights: [ <% for h, row in rowHeights : %> <% if @form.tableForm() : %> {BEGIN row_<%- @location %>_<%- row %>} <% end %> <%- JSON.stringify( h ) %>, <% if @form.tableForm() : %> {END row_<%- @location %>_<%- row %>} <% end %> <% end %> ], <% end %> body: [ <% include 'pdf/gridbody.htm', @addProp( "rowGroup", @form.singleRowGroup() ) %> ] } } <% else : %> '' <% end %>