Alith7 Posted February 19, 2009 Share Posted February 19, 2009 Basically, is there a way to pull a datafield and tell the script to place a page break after so many lines? Or maybe so many characters? ??? Read below please. I have a quoting database set-up for our company, and my boss wants some changes to the viewing/printing layout. There's a signature/fine print section that he wants to print at the bottom of the page, and if the quote is multiple pages, to print at the bottom of all pages. I have the script working to print the footer section on the bottom of both pages and that part is working. However if the quote needs to flow to multiple pages it flows OVER the footer, how do I get it to break?? ??? I think I need to somehow tell it to insert a page break after so many lines, but I don't know how. I tried looking for help in the CSS forum, but I think this might need some kind of special scripting beyond what CSS can do. Here is the code so far: <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>View Quote</title> <link href="styles/quote.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 {font-size: 12px;} #Quote {width:760px;} #header {width:760px; display:block;} #footer {width:760px; display:block;} --> </style> <style type="text/css" media="print"> #footer {position: fixed; bottom: 0;} </style> </head> <body> <form id="view_quote" name="view_quote" method="post" action=""> <div id="header"> <p><center><img src="images/delogo.jpg" width="250" height="52" /> </center></p> <table width="750" id="custInfo"> <tr> <td width="479" valign="top"><h2>Quote for: </h2> <p><strong><?php echo $row_getQuoteCust['name']; ?></strong><br /> <?php echo $row_getQuoteCust['street']; ?><br /> <?php echo $row_getQuoteCust['city']; ?>, <?php echo $row_getQuoteCust['state']; ?> <?php echo $row_getQuoteCust['zip']; ?><br /> Phone: <?php echo $row_getQuoteCust['phone']; ?><br /> Fax: <?php echo $row_getQuoteCust['fax']; ?><br /> Attn: <?php echo $row_getQuoteCust['quote_to']; ?></p></td> <td width="259" valign="top"><h2 align="right">Quote Number: <?php echo $row_getQuoteSales['quote_id']; ?></h2> <p align="right">Quote For: <?php echo $row_getQuoteCust['title']; ?><br /> Quoted on: <?php echo $row_getQuoteCust['created']; ?><br /> Quote is valid for 30 days. </p> </td> </tr> </table> </div> <div id="Quote"> <h2 align="center"><?php echo $row_getQuoteCust['title']; ?></h2> <p><?php echo nl2br($row_getQuoteCust['quote']); ?></p> </div> <div id="footer"> <table width="750"> <tr> <td width="376"><p> <?php echo "<img src=\"images/".$row_getQuoteSales['sig'].".jpg\">"; ?><br /> <strong><?php echo $row_getQuoteSales['first_name']; ?> <?php echo $row_getQuoteSales['last_name']; ?><br /> </strong> 755 Water Street<br /> Milwaukee, WI 53202 <br /> Phone: 414-272-3343 <br /> Fax: 414-272-3344 <br /> Email: <?php echo $row_getQuoteSales['email']; ?><br /> <?php echo $row_getQuoteSales['cell']; ?></p> </td> <td width="372" valign="bottom"><div align="justify"> <ul class="style1"> <li>Any changes made to the project after the final proof, excluding our mistakes, will be customer changes and will be chargeable artwork time and require a new proof.</li> <li>Layout and any changes to supplied art is billed separately at $60 per hour, if needed.</li> <li>Any additional artwork fees will be requoted and submitted to the customer for approval before changes will be made. </li> </ul> </td> </tr> </table> </div> </form> <p> </p> </body> </html> Link to comment https://forums.phpfreaks.com/topic/145969-inserting-a-page-break-into-a-datafield/ Share on other sites More sharing options...
mjahkoh Posted February 21, 2009 Share Posted February 21, 2009 try loop where u divide the loop value with 2. if the result has a remainder then that was an odd number then do x. if no remainder that was an even number then do y. or search for modulus in php Link to comment https://forums.phpfreaks.com/topic/145969-inserting-a-page-break-into-a-datafield/#findComment-767618 Share on other sites More sharing options...
Alith7 Posted February 21, 2009 Author Share Posted February 21, 2009 thanks! I've tried looking and came up with nothing, I'll try a few more google searches today. Link to comment https://forums.phpfreaks.com/topic/145969-inserting-a-page-break-into-a-datafield/#findComment-767780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.