Extra page printed out


#1

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?


#2

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


#3

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.


#4

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.


#5

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

<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>

#6

Took me a second to see the problem there, first I thought it might have been the width that may be trying to print to the next page, so I added text to the bottom of the page and the text printed on the second page.

Then I set my eyes on “

:

” There lies the problem. Wherever your code is echoing that into the page, it needs to be removed.

Bobby


#7

I noticed it in two places, near the bottom, and up near the top. The one near the top is in the style sheet. do both of them have to go, or just the bottom one?

Also, how were you able to take the code and test print it out? I would love to test this off line but I don’t know how to do it.

Thanks so much for the help.

EDIT:

I deleted the lower line code you mentioned and I renamed the file and then I boosted it up on my website, printed it out, and it WORKED!!! No second page!!!

Thanks again for the help. You made my day!!! :D


#8

Glad I could help out


#9

Out of curiosity - do you use an off line editor to test your code? I haven’t really found one that works great, and I’d like to be able to work off line and test pages, for both PHP and html. Having to upload everything to test it is so time consuming.


#10

Well, most of the time I am not working from home. During those times I personally just make my changes and upload everytime. I like having two copies of everything during the working process, in case I mistakenly mees up a file and don’t notice till after I save, then I can just download from the server. Otherwise I just have my screen split so I just drag the files over while making my changes. It doesn’t take me long on my connection, and it doesn’t bother me. When I am home though I have PHP installed on my system so I can run from there.

I do know that most editors like dreamweaver allow you work directly from the server and/or a test server during production. I just prefer to use notepad. Haven’t really found another editor that I like.

But that’s just me. I am sure others here can provide you with many more options that may fit your needs.

Bobby


#11

You can split screen notepad? how do you do that? The only way I found was to resize to half width.


#12

No I didn’t mean split screen notepad. I ment tile the two folder views Local filesystem on the top half, and the server filesystem on the bottom. I just keep that as my setup in the background. That way when I open a file and save it. I can just drag and drop to the server.


#13

That sounds a lot like my ftp server setup, except it is a left and right split, and I don’t drag and drop, I select a file and click an arrow.


#14

As long as you have a decent connection, I don’t see a problem with it. It’s the way I prefer to work.