window print not printing Iframe content

Window print only print the document (DOM) of window and Iframe is another document object (DOM) treat as same window object. Below code help you to print the content of iframe.

<iframe src="home.html" name="printIframe"></iframe>

view demo

Share and Comment the post


Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
Harinder Singh

Harinder Singh

My name is Harinder Singh and I specialize in Software industry. I consider myself as a life learner. I love learning new concepts, embracing new ideas and reading and searching for innovation.