Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print Page functionality in MVC [closed]

Anyone done this in MVC? any info would be great!. Thanks.

like image 990
ShaneKm Avatar asked Jun 12 '26 15:06

ShaneKm


1 Answers

You can get pretty far simply by including a print.css file for media type print.

Hide everything you don't want and include logical page breaks and demensions (inches, etc... actually format more correctly using the print.css override).

I have used a custom controller (or filter) to handle links using something like index.print instead of index.html, which simply overrides the master layout with a layout more suitable for printing, but I still feel that the alternate stylesheet is the best way to go.

http://www.alistapart.com/articles/goingtoprint/

like image 184
Hal Avatar answered Jun 15 '26 22:06

Hal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!