edabg / jsprintsetup

JSPrintSetup Firefox addon
Mozilla Public License 2.0
76 stars 39 forks source link

How to define the window (tab) to be printed? #32

Open CarlTuji opened 7 years ago

CarlTuji commented 7 years ago

Hi there! This add-on is great!

Sometimes I need to print some big reports (more than 100 pages) and this add-on really helps me a lot. Is there any way to define the window (tab) to be print to make me able to continue using the computer for another task while printing?

Thanks in advance

CarlTuji commented 7 years ago

I think I wan't clear enought, let me explain: sometimes I need to print lists of products separeted by categories; The problem is that the report format isn't simple, so I made a template and fill it with the results from the DB ( 25 rows per page ); Some lists have more than 70 pages, so the print process takes a very long time, and while printing, the user usually use the computer to browser to another page;

My question is if there is some way to send the correct window to the printer instead of the current window. Thanks again

mitkola commented 7 years ago

I think that you can call jsPrintStup.print on body onload of window to be printer. Another way is to use jsPrintStup.printWindow method which get as parameter newly opened window. In both cases you have to consider:

I hope that this will help you.