print to a new page
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
print to a new page
i have a page created by querys and it echos everything out then forces a print (all works well) but i want to be able to after each query is echoed out to put in somthing to force the printer to start printing on a new piece of paper, how is this done?
This works even with IE
Code: Select all
<style>
@media print{
p{
page-break-after: always;
}
}
</style>- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
ok i tried that and did
the foreach looped twice so it printed both cv's on the 1st page then printed 2 extra blank pages afterward. any other ideas?
Code: Select all
foreach($_POST[checked] as $key => $value)
{
show_cv($value, '2');
echo '<p>';
}maybe
??
page-break-after creates page break after elements ending. You could set it for <div>'s if you like. Or page-break-before for <h1> and other headings.
Code: Select all
foreach($_POST[checked] as $key => $value){
echo '<p>'
show_cv($value, '2');
echo '</p>';
}page-break-after creates page break after elements ending. You could set it for <div>'s if you like. Or page-break-before for <h1> and other headings.