简体   繁体   中英

Javascript cannot twice print to printer

Firefox config :

dom.successive_dialog_time_limit = 0

print.always_print_silent = true

Using the javascript, put at the bottom of the page.

<script>
        window.print();
        window.print();
</script>

But it only print 1 copy, how to make it print two copies ?

Thanks

I think it's a "problem" of something beyond the js code. You call the printer and just after call again. Maybe if you make something like:

<script>
        window.print();
        console.log();
        window.print();
</script>

this works, because there is another thinkg between them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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