I have been trying to get this done from long. I have a HTML page with few icons and upon clicking print I want the page to be printed including the icons.
I did as per the solution suggested in the Print specific div
But in this I am not able to load the icons and also the page formatting goes haywire. Any suggestions on how to get the page printed upon click without having to play around with the already formatted/styled page.
The application has a cshtml file which has the styles, icons referenced which again need not be referenced to in each html page I create. So when I call window.print()
the styles are not loaded as that specific div
which I want to be printed, does not load the icons which the action is called for. My question is in such case where the styles are defined once for the entire application, how do I call the window.print()
?