Skip to content

Commit

Permalink
Fix printing issue by specifying page size
Browse files Browse the repository at this point in the history
  • Loading branch information
asl97 committed Dec 26, 2023
1 parent 9d18138 commit 96096df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ <h1>Batch Card Printer</h1>
batch_cards.push(printer_card.outerHTML);
}
var a = window.open('', '', 'height=500, width=500');
a.document.write('<html><body>'+batch_cards.join('<div style="break-after:page"></div>')+'</body></html>');
a.document.write('<html><head><style>@page{size: A4 landscape};</style></head><body>'+batch_cards.join('<div style="break-after:page"></div>')+'</body></html>');
a.document.close();
a.print();
}
Expand Down Expand Up @@ -1719,7 +1719,7 @@ <h1>Batch Card Printer</h1>
batch_cards.push(printer_card.outerHTML);
}
var a = window.open('', '', 'height=500, width=500');
a.document.write('<html><body>'+batch_cards.join('<div style="break-after:page"></div>')+'</body></html>');
a.document.write('<html><head><style>@page{size: A4 landscape;}</style></head><body>'+batch_cards.join('<div style="break-after:page"></div>')+'</body></html>');
a.document.close();
a.print();
}
Expand Down

0 comments on commit 96096df

Please sign in to comment.