打印网页问题::寻找打印网页的好教程(由Jquery ui,jqgrid,zend构建) [英] Print webpages problems :: looking for good tutorial to print web pages (build by Jquery ui, jqgrid , zend)
问题描述
我应该用jqgrid,Jquery日历+其他Jquery ui +背景图片等打印网站的网页。在服务器端使用Zend框架构建它。
I should print web-pages of website with jqgrid , Jquery calendar+ other Jquery ui+background images etc.. in server side its build with Zend Framework.
没有网页打印的经验和知识,但我在我的工作中得到了这个使命。
I don't have experience and knowledge in web page printing, but i get this mission in my job.
我需要:
-
很好的教程或书(我阅读关于背景图片的问题)来研究这个问题(我有时间了)。
Good tutorials or book (i read about background images problem) to study this issue well (I have time for that).
更实用的说明如何打印网页使用Jquery + Jquery UI + jqgrid(我知道Jquery UI有浏览器兼容性问题vs yui(yahoo库))。
More practical instructions how print web pages that build with Jquery + Jquery UI + jqgrid (I know that Jquery UI have browsers compatibity issues vs yui (yahoo library)).
感谢所有伟大的人,
推荐答案
p>打印的很多问题可以解决与样式表定义的 media
属性有关。您可以声明
A lot of problems with printing you can solve with respect of media
attribute of the stylesheet definition. You can declare
<link rel="stylesheet" type="text/css" media="screen" href="..." />
仅包括一些屏幕css,使用 media =all / code>定义一些信息显示在屏幕和打印机上,或使html元素只在打印期间显示。以jQuery UI为例,你可以找到一个好主意,只打印一个选定的标签(或手风琴)。你可以找到有用的不打印一些隐藏的div像
div.loadingui
。因此,您可以使用像
to include some css for screen only, use media="all"
to define some information be displayed on both screen and printer or make a html elements be displayed only during printing. With jQuery UI for example you can find a good idea to print only a selected tab (or accordion). You can find useful not print some hidden divs like div.loadingui
. So you can make a CSS like
<style type="text/css" media="screen">
#printableButNotVisible { display:none }
</style>
<style type="text/css" media="print">
#accordion h3, #vcol, div.loadingui, div.ui-tabs-hide,
ul.ui-tabs-nav li, td.HeaderRight { display:none }
#printableButNotVisible { display:block }
</style>
这只是一个例子,但我希望解释一下主要想法。此外,您可以动态创建css并在HTML文档中插入或切换(请参阅 http:// docs .jquery.com / Tutorials:5_Quick_jQuery_Tips#Switch_A_Stylesheet )。
It's only an example, but I hope to explain the main idea. Moreover you can dynamically create a css and insert or switch in your html document (see http://docs.jquery.com/Tutorials:5_Quick_jQuery_Tips#Switch_A_Stylesheet).
在打印期间从页面中删除菜单可能是个好主意,但我可以给你没有例子,因为我不知道你使用什么样的菜单。
It can be a good idea to remove menus from the page during printing, but I can gives you no example, because I don't know what kind of menus you use.
如果有人知道一个好的CSS打印媒体的jQuery UI和jqGrid它会非常有趣的我。
If somebody knows a good CSS for print media for jQuery UI and for jqGrid it would be very interesting for me too.
这篇关于打印网页问题::寻找打印网页的好教程(由Jquery ui,jqgrid,zend构建)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!