keeping records from being split when printing (almost solved)
3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 16, 2010 (RSS)
By gkornbluth - June 11, 2010 - edited: June 12, 2010
Hi all,
If someone has a better approach I hope they'll share it.
I'm using CSS to keep address book records from being split when printed from a web page.
I’d prefer to use the CSS "page-break-inside: auto" but it’s not supported by most browsers, so I’m trying to get by with "page-break-after: always".
Here’s the code that I came up with.
Hope this helps someone else.
Now all I have to do is deal with book format page printing.
This one's going to be "interesting"...
2 - 5.5 x 8.5 pages on an 8.5 x 11 sheet, with the correct ones printing on the left, right, front and back so the stack comes out of the printer collated and ready for folding and stapling.
If anyone has a great idea... Please pass it on.
Best,
Jerry Kornbluth
If someone has a better approach I hope they'll share it.
I'm using CSS to keep address book records from being split when printed from a web page.
I’d prefer to use the CSS "page-break-inside: auto" but it’s not supported by most browsers, so I’m trying to get by with "page-break-after: always".
Here’s the code that I came up with.
<?php $count1 = 0; ?>
<?php foreach ($my_tableRecords as $record ): ?>
<?php $count1++; ?>
<table >
<tr>
<td>
<?php echo $record['first_name'] ?>, <?php echo $record['last_name'] ?><br />
<?php echo $record['street_address'] ?>, <?php echo $record['city'] ?> <?php echo $record['state'] ?> <?php echo $record['zip'] ?><br /><br />
</td>
</tr>
</table>
<?php endif ?>
<?php if ($count1 >6): ?><p style="page-break-after: always"></p>
<?php $count1++; ?>
<?php endif ?>
<?php endforeach; ?>
Hope this helps someone else.
Now all I have to do is deal with book format page printing.
This one's going to be "interesting"...
2 - 5.5 x 8.5 pages on an 8.5 x 11 sheet, with the correct ones printing on the left, right, front and back so the stack comes out of the printer collated and ready for folding and stapling.
If anyone has a great idea... Please pass it on.
Best,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] keeping records from being split when printing (almost solved)
By Jason - June 16, 2010
Hi Jerry,
Have you made any progress with this? Is it just a matter of formatting the margins?
Let me know where you are and if you need any help.
Thanks.
Have you made any progress with this? Is it just a matter of formatting the margins?
Let me know where you are and if you need any help.
Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] keeping records from being split when printing (almost solved)
By gkornbluth - June 16, 2010
Thanks Jason,
Thanks for responding to my post.
I think that this one gets a bit (too) heady.
The pages would be printed 2 to a sheet (2 5.5 x 8 on an 8.5 x 11 sheet. Both sides would need to be printed.
The trick will be automatically setting up the 2 sides of each of the sheets (4 pages each) so that when they're printed, folded and stapled, the appropriate pages show up adjacent to each other.
The setup would have to change dynamically depending on how many pages there are in total.
I can't believe that the algorithm doesn't already exist out there since every book that's printed deals with exactly the same sort of issues.
So it's not just the margins. I wish it were that easy.
For now they're doing a manual pasteup and getting copies made, and it may end up staying that way.
Thanks again,
Jerry Kornbluth
Thanks for responding to my post.
I think that this one gets a bit (too) heady.
The pages would be printed 2 to a sheet (2 5.5 x 8 on an 8.5 x 11 sheet. Both sides would need to be printed.
The trick will be automatically setting up the 2 sides of each of the sheets (4 pages each) so that when they're printed, folded and stapled, the appropriate pages show up adjacent to each other.
The setup would have to change dynamically depending on how many pages there are in total.
I can't believe that the algorithm doesn't already exist out there since every book that's printed deals with exactly the same sort of issues.
So it's not just the margins. I wish it were that easy.
For now they're doing a manual pasteup and getting copies made, and it may end up staying that way.
Thanks again,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php