Jump to content

Customize the print option in browsers


d2daj86

Recommended Posts

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

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.

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.