2

I am trying to develop a printable statement using Civicrm and Smarty. I built a table to display the data giving me control over the formatting, I got most of the statement working nicely. I have a little over a half page of boilerplate. I ended the table, The text overlays the table at the top of the page. I tried to put the text in a cell, the cell comes out bigger then the available space on the page. It causes a page break so I have almost half a page blank and the entire cell on the next page.

I would like to find a way to end the table and have the text just follow on the same page, An alternative is to allow the text to have a page brake in the cell and continue the text on the next page

  • I will try to answer your question but before i or others do, if you'd like to have a stackoverflow site dedicated to CiviCRM, you should support the project by committing to the proposal here : http://area51.stackexchange.com/proposals/77367/civicrm – samuelsov Nov 09 '14 at 15:37
  • I just posted to the vote – Bruce Sicherman Nov 09 '14 at 19:34
  • @BruceSicherman it looks like you may have signed into Area51 with a different email than the one you use here - your 2 accounts are not linked (so rep you earn at SO is not currently being reflected at Area51). There's an easy fix for this - just click "my logins" on your account screen and add the other email :) – Coleman Nov 16 '14 at 02:23

1 Answers1

1

You could use CSS page-break-after property to force a page break before the table. See http://www.w3schools.com/cssref/pr_print_pageba.asp

I have already used it in this context and it works.

samuelsov
  • 395
  • 2
  • 10
  • My problem is I am using a table to control the placement and formatting. If I end the table and have regular text it overlays the table. If I have one large row with a lot of text if forces the entire row to the next page leaving almost half of the page blank. – Bruce Sicherman Nov 10 '14 at 21:05
  • Do you need the same content to be both printed and sent by email ? Do you have a screenshot to help me understand ? – samuelsov Nov 10 '14 at 21:42
  • I have to go back and create the issue. I took the large row of text and broke it into a number of smaller ones, just a few lines go on the next page. Not pretty but I got past it. I think it is a bug in Smarty. – Bruce Sicherman Nov 11 '14 at 23:23