简体   繁体   English

如何使用eclipse在打印前进行预览?

[英]How to preview before print using eclipse?

I am using eclipse with tomcat server. 我在Tomcat服务器上使用eclipse。 My program is about to print a page containing dynamic table, which means the data and number of column even header title also dynamic. 我的程序将要打印一个包含动态表的页面,这意味着数据和列数甚至标题的标题也是动态的。 The table is continue to the next page, and i need to view the table header as well as the first page. 该表将继续下一页,我需要查看表标题以及第一页。 Is there any example or page i can refer to? 我可以参考任何示例或页面吗? Thanks in advance 提前致谢

your explanation is not clear enough but based on your question (How to preview before print using eclipse?) I think I know what you mean. 您的解释不够清楚,但是基于您的问题(如何使用eclipse在打印之前预览?)我想我知道您的意思。 as I realized you want to have a preview before printing your page, Ok then, jQuery has a plugin with this very aim which is called Print Preview Plugin. 因为我意识到您希望在打印页面之前先进行预览,所以,好的,jQuery有一个针对此目的的插件,称为打印预览插件。 use this plugin and: 使用此插件并:

$('#yourcontainer').prepend('<a class="preview-page">Print this page</a>');
$('a.preview-page').printPreview();

then you can call $.printPreview.loadPrintPreview(); 然后您可以调用$.printPreview.loadPrintPreview(); and your problem is solved. 这样您的问题就解决了。 here this is a DEMO get a view-source, you'll see the solution. 这是一个DEMO获取视图源,您将看到解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM