Figuring out how to nicely print only a specific section of a webpage, without breaking the markup or styling. Was playing with some HTML-to-PDF libraries, but they are all equally terrible in both the end result and documentation. Then I figured I could just use the @media print CSS rules to create a print preview screen. Then the user can just hit CTRL+P and only print the part that they want. Super easy! π
Figuring out how to nicely print only a specific section of a webpage, without breaking the markup or styling. Was playing with some HTML-to-PDF libraries, but they are all equally terrible in both the end result and documentation. Then I figured I could just use the
@media print
CSS rules to create a print preview screen. Then the user can just hit CTRL+P and only print the part that they want. Super easy! πThat is great! I love how useful CSS is! And Soo underrated