PHP Programming > Beginners - Learning PHP

Extra page printed out

(1/3) > >>

Shrubwater:
I have a form that is filled out, then customers have the option to print it.  When it prints, the form info occupies about 60% of the first page, then it labels the bottom of the first page, and proceeds to print out a blank second page also labeled at the bottom.

Any idea why it would print out page 2 when the first page printing does not come closer than 3 inches from the bottom, except for the URL page title.  It is a PHP page with HTML for the format.

Speaking of which, can I stop that bottom URL from being printed, too?

DBestViper:
As far as I know only on the user end can you stop the url from being printed 'Page setup->Footer'

As far as the other situation, I would check to be sure that you don't have any extra HTML at the bottom of the page.  You can go to View->Source on the output page in IE to see what html is acually being phrased and work from there.

  Hope this helps

Shrubwater:
Thanks for the response.  I would think that there is a minimum set up so that it does not happen on any printer.  I know some printers are more cranky than others, but if I could set things to be at a minimum maybe it would not happen?

If it is an HTML problem it isn't appropriate for here, so I guess I have to just frankenstein the script and see if I can recreate the monster.

DBestViper:
Well even if your script is written in PHP when you view source in IE it will show the HTML output for the page.  It doesn't mean that it is an HTML problem, it will just assist you with seeing what the problem is.  Go ahead and post the output of the html.

Shrubwater:
Here it is.  If this shouldn't be here, the mods can just remove it.  I'll understand.


--- Code: ---<style type='text/css'>
<!--
.unnamed1 {

        font-family: Georgia, 'Times New Roman', Times, serif;

        font-style: normal;

        line-height: normal;

        font-weight: normal;

        font-variant: normal;

        text-transform: none;

        background-color: #FFFFCC;

        border: thin solid #999999;

}

P.break { page-break-after: always;

color: white;

}

Table {

border:solid black 1px;
}

TD {

border:solid black 1px;
}

Input {

border-right: 0 ;

border-left:0 ;

border-bottom: solid black 1px;

border-top: 0;

}

-->

</style>

<!-- ZoneLabs Privacy Insertion -->
<script language='javascript' src='http://127.0.0.1:1027/js.cgi?pcaw&r=20710'></script>

</head>

 

<SCRIPT LANGUAGE='JavaScript'>

         function BackToOrder() {

                 window.location = 'CustOrderForm.php';

         }

         function CloseForm() {

                  window.close();

         }

function printPage() {

if (window.print) {

agree = confirm('Thank You for your Order. To print a copy of your Order, Click OK. If not, click Cancel');

if (agree) {

         document.all['divbuttons01'].style.display='none'

         window.print()

         document.all['divbuttons01'].style.display=''

        }

  }

}


function reprint() {

        document.all['divbuttons01'].style.display='none'

        window.print()

        document.all['divbuttons01'].style.display=''

}


</script>

<body OnLoad='printPage()'><div http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>

<div>

<FORM id=form1 name=form1>

<TABLE style='width:100%;'>

<tr>

              <td colspan='4'><!--INPUT type=button id=printBut onclick='PrintThis();'-->
                      <div id='divbuttons01'>
                      <INPUT type=button value='Order New Job' id=gotoOrder onclick='BackToOrder();'>
                      <INPUT type=button value='Close' id=closeme onclick='CloseForm();'>
                      <INPUT type=button value='Re-print' id=reprintme onclick='reprint();'>
                      </div>
              </td>

      </tr>

<table>

<table width='100%' height='44' border='1'>

  <tbody><tr>  

    <td height='53' colspan='3'><center><b>THE PAGE HEADER GOES HERE</b></center><br>

        <center><b>ORDER CONFIRM PAGE</b></center><br>

<div align='center'><font size='-1'><br><b>MAIN:</b> 1-800-888-8888  <b> FAX:</b> 1-888-888-8888<br><b>MAILING ADDRESS:</b> P.O. Box 999, Los Angeles, Ca. 93535<br><b>CONTACT:</b>email@mybusinessnamegoeshere.com<br></font></div></td>

  </tr>

  <tr><td width='366'></td></tr>  

</tbody></table>

 

       

  <table width='100%' border='1'>

    <tbody><tr>  

      <td width='101'><div align='right'>Insured:</div></td>

      <td colspan='3'> Test  

      </td>
     
      <td nowrap><div align='right'>Due Date:</div></td>

      <td>06/25/2004 </td>

    </tr>

    <tr>  

      <td><div align='right' nowrap>Survey Address:</div></td>

      <td width='40%'> Test  

      </td>


      <td width='5%'><div align='right'>City:</div></td>


      <td width='30%'> test </td>


      <td><div align='right'>Zip:</div></td>


      <td width='25%'> 12345  


      </td>


    </tr>


    <tr>  

      <td><div align='right'>Contact Name:</div></td>

      <td> test </td>

      <td colspan='2'><div align='right'>Contact Phone Number:</div></td>

      <td colspan='2'> test  

      </td>

    </tr>

    <tr>  


      <td><div align='right'>Broker Name:</div></td>

      <td> test </td>

      <td colspan='2'><div align='right'>Broker Phone Number:</div></td>

      <td width='144' colspan=2> test  

      </td>

    </tr>

    <tr>  

      <td><div align='right'>Carrier:</div></td>

      <td>

          test

        </td>

      <td colspan='2'><div align='right'>Policy Number:</div></td>

      <td colspan='2'>

          test
        </td>

    </tr>

        <tr>  

      <td><div align='right'>Type of Risk:</div></td>

      <td>

          test

        </td>

      <td colspan='2'></td>

      <td colspan='2'>

           

        </td>

    </tr>

  </tbody></table>

   

   

   

    <table width='100%' border='1'>

        <tbody><tr>  

          <td width='23'> X </td>

          <td width='97'>The Risk </td>

          <td width='23'>

           
            </td>

          <td width='73'>EarthQuake</td>

          <td width='23'>

             
            </td>

          <td width='210'>Contractors Laab (A & B) </td>

          <td width='23'>

             
            </td>

          <td width='378'>General Labrility</td>

        </tr>

        <tr>  

          <td>

             
            </td>

          <td>Builders Disk</td>

          <td>

             
            </td>

          <td>Fire</td>

          <td>

             
            </td>

          <td>Flaet Labrility</td>

          <td>

             
            </td>

          <td>Outland Marne</td>

        </tr>

        <tr>  

          <td>

             
            </td>

         <td>D.A.C</td>

          <td>

             
            </td>

          <td>Fleet</td>

          <td>

             
            </td>

          <td>Grange Labrility</td>

          <td>

             
            </td>

          <td>Precise Labrilitys</td>

        </tr>

        <tr>  

          <td>

             
            </td>

          <td>Work. Camp</td>

          <td>

             
            </td>

        <td>Creme</td>

          <td>

             
            </td>

          <td>Grange Keepers Legal</td>

          <td>

             
            </td>

          <td>Products Labratory</td>

        </tr>

      </tbody></table>

   

   

    <table width='100%' border='1'>

        <tbody><tr>  

          <td width='888' height='53'><div align='center'><strong>Additional Information  

              - Check all that apply</strong></div></td>

        </tr>

      </tbody></table>

       

    <table width='100%' border='1'>

      <tbody><tr>

        <td width='26'>

            X
        </td>

        <td width='226'>Bldg Value: $</td>

        <td width='26'></td>

        <td width='208'>Contents: $  

          </td>

        <td width='23'></td>

        <td width='357'>Time Element: $</td>

      </tr>

      <tr>

        <td></td>

        <td>Completed Operations</td>

        <td></td>

        <td># of Units: </td>

        <td></td>

        <td>Other: </td>

      </tr>

      <tr>

        <td> </td>

        <td> </td>

        <td> </td>

        <td> </td>

        <td> </td>

       <td> </td>

      </tr>

      <tr>

        <td></td>

        <td>Gross Rcpts: $ </td>

        <td></td>

        <td>Payroll: $ </td>

        <td></td>

        <td>Sub Costs (OCP): $ </td>

      </tr>

      <tr>

        <td></td>

        <td>Standard Report</td>

        <td></td>

        <td>Long Form Report</td>

        <td></td>

        <td>Reinspection</td>

      </tr>

      <TR>

                <td>X</td>

                <td>Photo</td>

                <td></td>

                <td></td>

                <td></td>

                <td>Diagram</td>

        </TR>

    </tbody></table>

    <table width='100%' height='125' border='1'>

        <tbody><tr>  

        <td width='100%'><div align='center'><strong>Comments /  

            Additional Requested information:</strong></div></td>

      </tr>

   <tr>  

        <td height='68' colspan=100%> <textarea name='CVGCommentsReqsts' id = 'CVGCommentsReqsts' value='' style='width:100%;' rows='5'>Tests</textarea>  

        </td>

      </tr>

    </tbody></table>  

 

   
<P class=break>:</P></form>

   

 

</div>

</div>
</body></html>
<!-- ZoneLabs Popup Blocking Insertion -->
<script language='javascript'>postamble();</script>

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version