<% if @form.tableForm() : %> {BEGIN cellblock_<%- @location %>_<%- @gridCell.cell %>} <% end %> { cellId: '<%- @gridCell.cell %>', col:0, row:0, <% if @cell.field : %> fieldName: '<%- @goodFieldName( @cell.field ) %>', <% end %> <% if @props.cellStyle : %> style: '<%- @props.cellStyle %>', <% end %> <% if @form.tableForm() : %> // dynamic colspan/rowspan <% if @gridCell.colspan && @gridCell.colspan>1 : %> {BEGIN colspan_<%- @location %>_<%- @gridCell.cell %>} colSpan: {$colspan_<%- @location %>_<%- @gridCell.cell %>}, {END colspan_<%- @location %>_<%- @gridCell.cell %>} <% end %> <% if @gridCell.rowspan && @gridCell.rowspan>1 : %> {BEGIN rowspan_<%- @location %>_<%- @gridCell.cell %>} rowSpan: {$rowspan_<%- @location %>_<%- @gridCell.cell %>}, {END rowspan_<%- @location %>_<%- @gridCell.cell %>} <% end %> <% else : %> // static colspan/rowspan <% if @gridCell.colspan && @gridCell.colspan>1 : %> colSpan: <%- @gridCell.colspan %>, <% end %> <% if @gridCell.rowspan && @gridCell.rowspan>1 : %> rowSpan: <%- @gridCell.rowspan %>, <% end %> <% end %> <% cellPadding = @form.getCellPaddings( @gridCell.cell ) %> <% if cellPadding : %> // [left, top, right, bottom] margin: [ <%- cellPadding.left %>, <%- cellPadding.top %>, <%- cellPadding.right %>, <%- cellPadding.bottom %> ], <% end %> <% if @form.effective( 'orientation', @cellId ) != 'vertical' && @cell.items.find( (id) => @page.items[id].type == 'details_preview' ) == undefined : %> "text": [ <% else : %> "stack": [ <% end %> <% for itemId in @cell.items : %> <% if @page.items[itemId].type == 'section' || @page.items[itemId].type == 'tabs' : %> <% include "pdf/section.htm", @self().addItem( itemId ) %> <% else : %> <%- @page.items[itemId].pdfText( @self().addItem( itemId ) ) %>, <% end %> <% end %> <% if !@cell.items.length : %> '', <% end %> ], "border": <%- @form.pdfCellBorder( @self() ) %>, <% borderColor = @form.pdfCellBorderColor( @self() ) %> <% if borderColor : %> "borderColor": <%- borderColor %>, <% end %> <%- @form.pdfCellBg( @self() ) %> <%- @form.pdfCellColor( @self() ) %> <% align = @form.effective( 'align', @cellId ) %> <% if align: %> "alignment": '<%- align %>', <% else if @cell.columnName=='field' : %> "alignment": '{$<%- @goodFieldName( @cell.field ) %>_align}', <% else : %> "alignment": 'left', <% end %> <% pageBreak = @form.effective( 'pageBreak', @cellId ) %> <% if pageBreak == 'after' : %> "pageBreak": 'after', <% else if pageBreak == 'brefore' : %> "pageBreak": 'before', <% end %> <% fontSettings = @form.pdfCellFontSettings( @self() ) %> <% for fsName, fsValue of fontSettings : %> <%- fsName %>: <%- fsValue %>, <% end %> }, <% if @form.tableForm() : %> {END cellblock_<%- @location %>_<%- @gridCell.cell %>} <% end %>