edabg / jsprintsetup

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

Printing multiple specific elements from one page. #30

Open esquinato opened 7 years ago

esquinato commented 7 years ago
<script>
function print() {
   test=document.getElementById('div_target');
   jsPrintSetup.setPrinter('Printer');
   jsPrintSetup.setSilentPrint(1);

   jsPrintSetup.printWindow(test);

}
</script>

<div id="div_target">
    sdlkjflksjdflkjsdf
</div>

I was hoping in some way I could make this work! But no matter what I do I just can't get it working! Any help with this without loading them in iframes? I have multiple things that could potentially be printed off of one page and the iframe solution wont work for me.

Thanks for any advice!

mitkola commented 7 years ago

You can try the solution suggested from Guillaume Crico http://www.mozdev.org/pipermail/jsprintsetup/2011-October/000068.html