Reputation: 1457
Well, i am using JavaScript window.print() method and has no printer attached so can i get the output as an image or pdf to be sure that i am getting the desired output??
Upvotes: 1
Views: 713
Reputation: 22452
In most new browsers, you have a print preview function that you can use to see if you get desired output based on your media:print setup in the css. window.print
in Javascript is just to trigger the print function in the browser, and really have nothing to do with how the print looks.
Upvotes: 0
Reputation: 1038990
You can't do this. You cannot test if a printer is available or not on the client machine unless you use some browser plugin.
Upvotes: 1