houssam_ballout Posted May 8, 2011 Share Posted May 8, 2011 Hello, How to customize print page in php ? I had a page, but I need to print it like an invoice look page. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/235849-print-in-php/ Share on other sites More sharing options...
wigwambam Posted May 8, 2011 Share Posted May 8, 2011 Creating and including a separate print.css style sheet will allow you to customize the page for printing. Link to comment https://forums.phpfreaks.com/topic/235849-print-in-php/#findComment-1212391 Share on other sites More sharing options...
wildteen88 Posted May 8, 2011 Share Posted May 8, 2011 One way you can do it is with CSS. Add a new stylesheet to your webpage that is only used for printing (make sure you give it the media type of print), eg <link rel="stylesheet" type="text/css" media="print" href="print.css" /> What will happen now is your web browser will apply the styles within print.css and override the css defined in your main stylesheet. Or in PHP just create a new file which only outputs the bare minimum data needed for printing. Link to comment https://forums.phpfreaks.com/topic/235849-print-in-php/#findComment-1212393 Share on other sites More sharing options...
houssam_ballout Posted May 8, 2011 Author Share Posted May 8, 2011 Any applied example? Thanks Link to comment https://forums.phpfreaks.com/topic/235849-print-in-php/#findComment-1212396 Share on other sites More sharing options...
fugix Posted May 8, 2011 Share Posted May 8, 2011 check this out Link to comment https://forums.phpfreaks.com/topic/235849-print-in-php/#findComment-1212405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.