print from html pages in A4

余生颓废 提交于 2019-12-21 21:05:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!