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 HTML page by URL

See original GitHub issue

Printing a server-rendered PDF like this works great:

printJs('someUrl', 'pdf');

But there doesn’t seem to be a way to do the same thing with a server-rendered HTML page.

I’ve tried both 'html' and 'raw-html' and they seem to be for when you want to print an element on the page, or just a raw string of html.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jraoultcommented, Jun 2, 2020

Just in case anyone is still looking: https://github.com/joseluisq/printd

1reaction
johnknoopcommented, Feb 17, 2020

I haven’t found any elegant workarounds. What I have is an iframe, and I change the [src] of it to the URL I want to print, and in the bottom of that HTML document is a script tag with window.print().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Printing a web page using just url and without opening new ...
This will load the page you want to print. To print, you can add javascript code to the print page so that it...
Read more >
Add a Print Button or Link to Your Web Page - ThoughtCo
You can set up the ability for users to print specific parts of your web page using a print button or link. You...
Read more >
Simple Steps for Printing Out a Web Page - LD Products
1. Open Your Web Page · 2. Click Menu · 3. Click Print.
Read more >
How do you create a print link in HTML? - Quora
To create a link within the same page using HTML, you can use the anchor tag <a> with the href attribute and the...
Read more >
How to Print Entire Web Page
Open the web page. 2. Press Ctrl + A 3. Right click on the page and left click on “Print” 4.
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