cordova-plugin-printer icon indicating copy to clipboard operation
cordova-plugin-printer copied to clipboard

Print multiple files at once?

Open Polm90 opened this issue 6 years ago • 7 comments

Is it possibile to print multiple files at once? For example, printing 2 or 3 PDF files with only one call to print function?

Polm90 avatar Sep 26 '19 14:09 Polm90

@Polm90 Did you find a way to do that?

vishwas097 avatar Dec 10 '19 09:12 vishwas097

No

Polm90 avatar Dec 10 '19 10:12 Polm90

@Polm90 Do you have any idea on printing via html content? Like if i need to print different html contents in two different pages at a time. Is that possible to do that?

vishwas097 avatar Dec 10 '19 12:12 vishwas097

You can build a single html document with all the content you need. To be sure to break page as needed, I suggest you to use the css page-break rules

Polm90 avatar Dec 10 '19 12:12 Polm90

@Polm90 Nice idea and thank you very much!

vishwas097 avatar Dec 10 '19 12:12 vishwas097

Anyone found solution to print multiple files at once?

Phoenix-Alpha avatar Dec 02 '20 15:12 Phoenix-Alpha

@Phoenix-Alpha Yes you need append after a photo or doc this code <p style="page-break-after : always"></p>. Then call the print function cordova.plugins.printer.print($('#divwithalldocs').html()); and you get multiple prints. Thanks to @Polm90 very nice idea!

alexcodelab avatar Dec 08 '20 11:12 alexcodelab