0

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

iambeginner
  • 13
  • 1
  • 2
  • 4

1 Answers1

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