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.
I have the same problem :(
Yo have any solution with out do a manual request of the html download and add the html into a iframe?
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().
Well, that sounds good for me...
Thanks for share your solution!
Just in case anyone is still looking: https://github.com/joseluisq/printd
Hey guys, the library doesn't support printing an external HTML page. It's meant to print HTML elements on the current page (or the entire current page). It would be interesting to implement such option, but since I haven't had much time to maintain the lib in a while, I'm just trying to focus on bugs right now. A PR would be welcomed. Thank you.
Most helpful comment
Just in case anyone is still looking: https://github.com/joseluisq/printd