Re: howto send a whole smarty page to a printer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Łukasz 'nostra' Wojciechowski wrote:

W odpowiedzi na maila (18:09 - 5 września 2005):

Hi

Hello

I am using smarty with my php site, I know you can send a whole smarty
template page to a variable, is their any way i can easily print that
variable out.  or am i going about this the wrong way.

Why don't you just make another template file witch would be more
printer friendly (i.e. just formated text). You would take your
compiled variable, parse it (threw away all img,swf etc.) and give it
to print tpl.

Personaly I do it with CSS ... i just change my
layout.css to layout_print.css with no backgrounds and black text. But
images still remain.

You can even use XSL ... but it would
require to redesign whole presentation part of your website. More info
here: http://www.w3.org/Style/XSL/

If you are running on a Linux server (your e-mail is confusing as a browser is client side and PHP cannot change what happens to the code once it has been sent) then you can use html2ps to render and print a page.

HTH,

Mikey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux