Print api multiple page print bug

If i try to print a document which will be on multiple pages, pages after page 2 will be blank.

Test case:

<style type="text/css">
  .page {
      width: 210mm;
      height: 297mm;
      padding: 50px;
  <div class="page">page1</div>
  <div class="page">page2</div>
  <div class="page">page3</div>
  <div class="page">page4</div>
  <div class="page">page5</div>

Then i call the print with:

                    "printer": "HP LaserJet P2035",
                    "marginsType": 3,
                    "marginsCustom": { "marginBottom": 0, "marginLeft": 0, "marginRight": 0, "marginTop": 0 },
                    "mediaSize": { "name": "test", "width_microns": 210000, "height_microns": 297000, "custom_display_name": "test", "is_default": true }

Win 10, Tried with multiple different printers and nw.js versions, same result.

If i print it with window.print() it works as it should.

Author: Fantashit

1 thought on “Print api multiple page print bug

Comments are closed.