How to print a webpage/div with bootstrap css applied to it?

Home / Uncategorized / How to print a webpage/div with bootstrap css applied to it?

Question:
This is the html code.


Hello World 1
Hello World 2


This is how the page looks like

When I print the page using window.print() I get the following: pdf screenshot

I want the exact alignment and styles that are applied in the webpage to be applied when it is printed. What should I do to print the whole page or only the div below the print button??

When the page is large window.print() doesnot print the whole page.

edit(webpage screenshot)enter image description here


Answer:
I think this link will help you. https://www.smashingmagazine.com/2011/11/how-to-set-up-a-print-style-sheet/
Read more

Leave a Reply

Your email address will not be published. Required fields are marked *