Is it possible. Currently i have an ashx handler file which is generating a PDF and writing it to the response stream.
Is it possible to also include some javascript or similar to show the print dialog?
Cheers for any help!
Printable View
Is it possible. Currently i have an ashx handler file which is generating a PDF and writing it to the response stream.
Is it possible to also include some javascript or similar to show the print dialog?
Cheers for any help!
Hey,
You can certainly call print using javascript, that is as simple as:
However, how you combine this with the response stream for your pdf, I am not quite sure.Code:window.print();
Gary
When streaming a file, you cannot send anything else along with it because that goes against the concept of the stream representing a resource.
If you want the PDF printed, then embed it on a page in an iframe/object tag, and call print on that element.