I am using eclipse with tomcat server. 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
Asked
Active
Viewed 469 times
0
-
im looking for example how to do this one, i have done one. A very long code. but then cannot work. im really stuck on this right now – iambeginner Dec 06 '13 at 08:44
-
try something and we might help you. and it's really unclear for me what oyu want to do – Philipp Sander Dec 06 '13 at 08:46
-
i dont know which part of my code i should paste here. i have done a very long code one. – iambeginner Dec 06 '13 at 08:57
1 Answers
0
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. 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. use this plugin and:
$('#yourcontainer').prepend('<a class="preview-page">Print this page</a>');
$('a.preview-page').printPreview();
then you can call $.printPreview.loadPrintPreview();
and your problem is solved. here this is a DEMO get a view-source, you'll see the solution.

Mehran Hatami
- 12,723
- 6
- 28
- 35
-
BTW, you can find this plugin's git repository in this link: [Print Preview Plugin](https://github.com/etimbo/jquery-print-preview-plugin) – Mehran Hatami Dec 06 '13 at 09:51