Printing causes problems
I am having problems with print layout in Firefox 3 and 4. I work on a large e-commerce site which generates between 15,000 and 20,000 orders a day, with an average basket size of 80 items.
The problem comes in when customers try to print the details view of their order confirmation page in Firefox. The list of their items appears in a 4 column table. If there are more items than can fit on a single page, Firefox simply does not print the table.
I have partially fixed this by removing floats from all container elements and also setting overflow: visible wherever I can in my print CSS. Now FF prints the table (part of it anyway) but it ignores my column spacing and shoves the entire table into one jumbled column.
My print layout works PERFECTLY in: IE 6, 7, 8, 9, Chrome, Safari, Opera. Only Firefox has this issue. FF represents about 13% of our users. We are at the point if no one has a solution to this, where we will stop the print event on FF browsers and suggest they use another browser with a link to the page showing this VERY OLD FF defect which has not been fixed so our customers will stop blaming us.
does anyone know of a way outside what I have already done to fix this? Sorry, but I can't send a link to the page because it is a secure order confirmation page that would require login (not possible outside the UK) and placing an order.
所有回覆 (5)
Do I give you the benefit of the doubt for posting a reply and assume you are trying to be helpful or do I assume that telling me how to click File | print is a bit of condescension? It is clear to me from the 8+ years that this defect has been around that it is not taken very seriously. Allow me to explain why I am making this request.
I work on an e-commerce grocery site that does over £2 billion (yes, BILLION) in revenue each year. Customers want to print their orders when they make them and those customers who use FF (16% of the total) can't. They blame us, while the problem is actually in the browser. 16% of £2billion is a hell of a lot of money and currently those people are pissed at us.
So if you were being condescending, try and think that I might have a good reason for asking what I ask, and that I might, after 15+ years developing, actually know what I am talking about.
Thank you and have a nice day.
Well, I'm sure your response will encourage other users to try and assist you. ;)
You have a nice day too.
Yours was not exactly what I would call a helpful post, now was it? Surely you could not have assumed in this day and age that anyone did not know how to print? While I may have over-reacted, I have seen enough snotty responses to honest questions on these forums to be disinclined to give people the benefit of the doubt.
Problems like that have existed in the core code since before Firefox was first created back in 2002 (at least one bug was carried over from the Mozilla Suite and Netscape), but from what I have seen in Firefox 4.0 this problem is fixed to a large degree. I don't see that problem any more myself on pages that caused the problem for me in earlier versions, but I have no doubt that some page layouts could cause Firefox 4.0 to still not print beyond the first page.
These two print related bugs were fixed for Firefox 4.0.
https://bugzilla.mozilla.org/show_bug.cgi?id=154892
https://bugzilla.mozilla.org/show_bug.cgi?id=129941
Without being able to access your pages or see the code being used, there isn't much we can do to try to help you. But I am pretty sure there is a workaround you could implement especially if you're using a media-print.css file for those pages. Maybe something like this:
https://bugzilla.mozilla.org/show_bug.cgi?id=154892#c22
Here's another "fix" that might be useful, or get you started fixing it on your end.
https://bugzilla.mozilla.org/show_bug.cgi?id=154892#c46
You could try posting at the Web Development / Standards Evangelism forum at MozillaZine and provide a link to a sample or "test case" of you code and see what the guys over there think. They are more knowledgeable about web page development issues with Firefox.
http://forums.mozillazine.org/viewforum.php?f=25
You'll need to register and login to be able to post in that forum.