问题
I am designing this site which is for technical engineers to take prints from and the page sizes are varied. When pages are printed tables get cut up into 2 halves which makes it difficult for them to read. Is there any code which can make the prints fit into one A4 sheet per page.
The other solution is that i make PDF's of each page in A4 size and put a 'print this page' button on every page, but that seems a little unprofessional, any ideas?
回答1:
Try using the CSS media attribute to specify different CSS for printing.
You also need to bear in mind that each browser will implement printing in its own way (just like CSS rendering).
回答2:
Use a print CSS. It all depends on how the user will set the print settings in the dialog, and remember, web!=print.
回答3:
The best way i have found to maximize A4 layouts is to have my CSS for print use % instead of Pixels, this will make sure that no items are out of the A4 print area.
来源:https://stackoverflow.com/questions/616200/print-from-html-pages-in-a4