Link to home
Start Free TrialLog in
Avatar of garyttu
garyttu

asked on

Page Length / Line Counting for Printing Layout

I have a document I am laying out in CFM/HTML or CFM/CFDocument (undecided) to be used for printing. The document consists of 3 tables (top,middle,bottom) of information (a header, footer, and body).  I have tried to use cfdocument's header/footer capabilities, but they are limited since in the 'header' and 'footer' part of my page are just as long as the body as they contain multiple cells of output data. (This usually doesn't work well with cfdocument if the header and footer are more than just a line or two).  Each page must look the exact same for printing in that the top and bottom tables must look the exact same on each printed page and it prints as many pages as necessary to display the body (middle table) information.   The problem is the middle table contents are dynamic and can span a number of records each with multiple lines.  This results in making the page length too long and it cuts off the bottom table before page breaking and restarting with the top table.

Does anyone know of any way to 'count' how long the page will be if I display a record and if it is too long, stop display on that row,  display the bottom table, break, and start the top table on the next page?
Avatar of dgrafx
dgrafx
Flag of United States of America image

I think you need to investigate page-break- before & page-break-after, as well as page-break-inside
look up some css possibles for these.
you can control when to page break and when to NOT page break
ASKER CERTIFIED SOLUTION
Avatar of reitzen
reitzen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't have it right in front of me
but if you look up documentation on page-break
you'll see that there are params you can specify that deal specifically with orphans

please check it out - it works ...
dgrafx, I don't see any orphan control options in the CF 8 documentation.  Would really appreciate it if you could post some more information on it