问题
http://fiddle.jshell.net/bTtKT/show/
If I print the above page in Chrome as A4 Landscape I get two pages as expected given the size of the canvas on the page, if I do the same in Firefox however (with print preview for example), it gives me only one page and therefor cuts the image/canvas in half. If I change the scale in Firefox however I do start to see the whole image (but then it's too small), so the image is there as a whole but Firefox seams to ignore that its bigger then one page for some reason.
How do I get Firefox to recognize that the image needs more then one page so I can print the whole thing in correct size?
(possible to edit the above page example here: http://jsfiddle.net/bTtKT/ )
回答1:
I didn't try it out, but you could try:
canvas { page-break-inside: avoid; }
See: https://developer.mozilla.org/en/CSS/page-break-inside
回答2:
Putting this style on the div encompassing the canvas might help ya:
page-break-inside: avoid
clear: both
float: none
来源:https://stackoverflow.com/questions/10350688/firefox-printing-cuts-canvas-on-end-of-first-page-how-do-i-make-it-not-do-that