Reputation: 136
I want to control the pages that is to be print by following options: 1. Print All Pages 2. Print Current Page 3. Print selected pages (like 3,4,6-9 etc)
By using window.print() all the pages gets selected by default. How can i pass the required pages for printing, so that window.print() have those pages only. I need to use JavaScript for this purpose.
Upvotes: 5
Views: 1650
Reputation: 1082
Hi I made an some code sample based on my comment https://jsfiddle.net/hg9cn7hs/
in this example div with class second-page
will be ignored in print, you need to add just the custom logic for your scenario.
Upvotes: 3