Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox prints extra blank page

I have a web page that prints correctly on Chrome, Safari and IE, but has the followign problem on Firefox:

It prints just the header on the first page. The rest of it is blank. The actual content is shown only on page 2.

Googling a bit about it i found that the "float: left" style is causing it. If i remove the "float: left" it prints ok, but it does not look as it is supposed to as it needs to display 2 columns beside each other in print as well as on screen.

Is there a solution to this problem?

Thanks.

like image 611
memical Avatar asked Sep 13 '11 07:09

memical


People also ask

Why is my printer printing extra blank pages?

Corrupted or incomplete software could cause the printer to feed a blank page after each print job. Disconnect the USB cable from the printer, if necessary. In Windows, search for and open the Control Panel. Click Programs and Features.

How do I fix about blank in Firefox?

Open Firefox, click the three horizontal lines, and select Settings. Click Home and then click Custom URLs next to Homepage and new windows. Type about:blank and press Enter.


2 Answers

Hi I had a similar problem but I had an extra blank page at the END when I printed. IE would do the same thing, so I figured I had CSS issues.

Long story short, I found that if you have a paragraph as the first element in the body element, and the paragraph has the 'margin' property set in CSS, it printed a blank page at the end. Interestingly, it only printed a blank page if there was only one page. If I removed the margin from the style OR added an element before the paragraph it did not print the extra blank page.

JAB

like image 134
Jacob Boyko Avatar answered Oct 01 '22 19:10

Jacob Boyko


I found that setting the page height in your HTML a little smaller than indicated in the printer's page height prevents the blank page issue.

like image 30
IMB Avatar answered Oct 01 '22 19:10

IMB