question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Print api multiple page print bug

See original GitHub issue

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

Test case: HTML:

<html>
<head>
<style type="text/css">
  .page {
      width: 210mm;
      height: 297mm;
      padding: 50px;
  }
</style>
</head>
<body>
  <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>
</body>
</html>

Then i call the print with:

nw.Window.get().print({
                    "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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
rogerwangcommented, Nov 17, 2016

reopen as we may fix the upstream bug.

1reaction
rogerwangcommented, Aug 11, 2017

As upstream backported the fix to m61, the issue is now fixed in nw25 branch and will be released with 0.25.0-beta1 soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Single-page display, multi-page print problem - Stack Overflow
For ease of display here, I'm using on page styles, but you can easily use off page references. Declaring the following styles: <!--...
Read more >
Printing a multi-page document only prints the first page - GitLab
Printing a multi -page document only sends the first page to the printer, even when "Print all pages" is selected.
Read more >
[#2589] - Printing multiple pages per sheet does not work
Hello,. I suppose that the JRPrintServiceExporter does not properly print multiple pages per sheet when using the Java Printing API in Linux.
Read more >
3 ways to print an image on multiple pages - YouTube
Sometimes, you just need to Print Big. Historically, this was done with Microsoft's Paint application. But recently, they noted that Paint ...
Read more >
UWP - Printing multiple pages - Microsoft Q&A
Both the sample and the document shows how to print one page. So you will need to change the sample code a little...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found