You are here: Re: Printer Friendly page « PHP Programming Language « IT news, forums, messages
Re: Printer Friendly page

Posted by Erwin Moller on 08/07/06 08:17

weetat.yeo@gmail.com wrote:

> Hi all ,
>
> I have php page which the data in the page are extracted from MYSQL
> database.
> The data are retrieved when user click submit button .
> In the php page , there is a print button for user to print the php
> page.
> Presently, i am using javascript window.print() which not an elegant
> option.
>
> I tried to use CSS for printer friendly in php page , however i did not
> know how to start.
> Anyone have any idea how to , please share it with me .
>
> Thanks
> - weetat

Hi Weetat,

I always solve this the simple way:
1) Make a button: "Printer friendly page"
2) If somebody hits that button, simply create a popupwindow in which you
retrieve the data again, and display it with little/no colors, just black
and white.
From there you can call window.print() safely.

Alternatively, you can make a stylesheet for the printer, and tell the
browser to use that (without the popupwindow). That should work too, but I
prefer the first option because the user can see what will be printed
beforehand excactly.

just my 2 cent.

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация