Closed tangwz closed 7 years ago
kRangeAllPages
- print all pages
kRangeSpecifiedPageRange
– print specified pages (see startPageRange
and endPageRange
)
kRangeSelection
– Prints selection
kRangeFocusFrame
– print focused frame
if you want to print from some page to other page, for example from page 2 to 3 you do this:
jsPrintSetup.setOption('printRange', jsPrintSetup.kRangeSpecifiedPageRange);
jsPrintSetup.setOption('startPageRange ', 2);
jsPrintSetup.setOption('endPageRange', 3);
@mitkola thanks. But what is page mean in HTML?<body></body>
?
The pages are created due process of print rendering depending on media.
Did this mean that the pages I just can use when I print a file, I cannot use it in HTML? Sorry I can't find any demo use it in HTML. I just want to print multi webpages one time like print pages.
I try to use
@media print {
.print {page-break-after: always;}
}
then I see the div
which class="print"
was split to two page. I think this is your mean media
.
Thank you, I will continue to try.
I don't understand if I set
printRange
tokRangeAllPages
and then the printer will print what. What is all pages? How can I set pages. If I want to print similar pages one times. How can I set option and print all? I'm really confused.