如何打印(通过打印机)分割成不同页面的数据,而不会多次弹出打印对话框?

I have a program in PHP that makes score sheets for students after their marks have been keyed in and then generates their score sheets. I need to print all the score sheets for each student. I tried using window.print()//in javascript. This means i have to view the score sheet for each student and print it one by one. This would be a lot of work, case i have like 500 students. Is there a way i can have one button that when pressed gives the print dialog box once and then prints all the score sheets without popping up the dialog each time a new score sheet is being printed?

Generate a single web page which contains all of the score sheets, and print that!

You can use the page-break family of CSS properties (e.g, page-break-before: always) to ensure that the score sheets are printed on separate pages.