我正在使用PrimeFaces 4.0,我尝试打印包含表格的表格,我在这里使用了PrimeFaces打印机链接 ,它与打印机配合得很好。 但问题是桌子没有显示在纸上,因为它显示在屏幕上(数组大小,书写大小等等)我想知道如何管理打印机上的显示器或是否有与eclipse集成的工具,使其更容易!
I am using PrimeFaces 4.0, I try to print a form that contains tables, I used PrimeFaces printer link here and it works well with the printer. But the problem is that the table is not displayed on paper as it is displayed on the screen (the array size, the size of the writing etc ...) I wanted to know how to manage the display on the printer or if there is a tool to integrate with eclipse that makes that easier!
最满意答案
您需要为打印介质定义自己的CSS样式或修改现有样式,以便主题也可用于打印介质。
例如,将此添加到您的css:
@media print { .dataTableClassName { width: 650 px; text-align: right; } }在这里,您可以设置dataTable的样式,使其看起来像在纸上一样。 我不知道是否有任何工具可以帮助你。 Firefox有一个显示打印样式的选项,但我不喜欢它。
http://www.w3schools.com/css/css_mediatypes.asp
You need to define your own css styles for print media or modify the existing ones so that themes are also available for print media.
For example add this to your css:
@media print { .dataTableClassName { width: 650 px; text-align: right; } }And here you can style your dataTable to make it look like you want it on paper. I don't know if there are any tools that can help you with that. Firefox has an option to display print styles, but i don't like it that much.
http://www.w3schools.com/css/css_mediatypes.asp
更多推荐
发布评论