d2daj86 Posted May 22, 2008 Share Posted May 22, 2008 Is there a way to customize the way my website prints with php? for an example im looking to remove my template from the page when someone goes to print the page from the browser... so there will only be certain areas i can have printed... ive been trying to find a website with this information but haven’t been able to come across any. I’m willing to do the research but i need a point in the right direction. i already know how to create my own print function and make it work for that but i can’t seem to find a way to change the browsers print. Link to comment https://forums.phpfreaks.com/topic/106830-customize-the-print-option-in-browsers/ Share on other sites More sharing options...
Darklink Posted May 22, 2008 Share Posted May 22, 2008 No. You will need to create a new template that will show less detail of the page. Or your own function which strips all the detail and just leaves you with the important stuff which you need to print. This isn't as simple as it sounds, so the best idea is to just create a print template. Link to comment https://forums.phpfreaks.com/topic/106830-customize-the-print-option-in-browsers/#findComment-547668 Share on other sites More sharing options...
AndyB Posted May 22, 2008 Share Posted May 22, 2008 No. You will need to create a new template that will show less detail of the page. Or your own function which strips all the detail and just leaves you with the important stuff which you need to print. This isn't as simple as it sounds, so the best idea is to just create a print template. Sorry, but that's totally incorrect. The correct answer is http://www.phpfreaks.com/forums/index.php/topic,198174.msg894658.html#msg894658 Link to comment https://forums.phpfreaks.com/topic/106830-customize-the-print-option-in-browsers/#findComment-547670 Share on other sites More sharing options...
Darklink Posted May 22, 2008 Share Posted May 22, 2008 I'm not incorrect. As I said, you would need to define the printable template. Which means it would need the print-specific CSS attributes as said in that thread. Link to comment https://forums.phpfreaks.com/topic/106830-customize-the-print-option-in-browsers/#findComment-547703 Share on other sites More sharing options...
AndyB Posted May 22, 2008 Share Posted May 22, 2008 You don't need a 'printable template'. The whole point is that defining two different style definitions solves the whole problem. What you actually need is TWO css files - one for normal view and the other for print. BOTH are loaded within the normal template/page. The print version ONLY applies to print views. Link to comment https://forums.phpfreaks.com/topic/106830-customize-the-print-option-in-browsers/#findComment-547730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.