I've been attempting to achieve this for a while now. I have an HTML page with various icons, and when I click print, my goal is to have the page printed with all the icons intact.
I followed the advice from a solution referenced in Printing specific div
However, I'm facing issues where the icons aren't loading and the formatting of the page becomes chaotic. Any suggestions on how to seamlessly print the page without disrupting the existing layout and styling?
The application includes a cshtml file with styles and icon references that are commonly used across different html pages. Therefore, when I execute window.print()
, the styles are not applied as the specific div
being printed doesn't load the necessary icons. How can I successfully call window.print()
in such cases where styles are defined globally for the entire application?