Re: Print preview in php [message #174227 is a reply to message #174226] |
Sat, 28 May 2011 00:33 |
The Natural Philosoph
Messages: 993 Registered: September 2010
Karma:
|
Senior Member |
|
|
Co wrote:
> Hi All,
>
> I was wondering if someone can help me with a code to preview part of
> a php page
> and eventually print it.
> I don't want to print all of the page with images etc, just the data
> within a certain area of the page.
>
> Anyone know if this is possible?
>
sort of.
The first question to ask, is how are you printing it?
rendered HTML is notoriously crap at being printed, since fonts and so
on can not be guaranteed at the clients browser end.
I got round that by generating pdf files which are then downloaded and
printed, with fonts embedded, but its a whole new bunch of programming.
If you just want to do a quick and dirty preview, either write a PHP
page than can be selected to just show that, or possibly make a
javascript window that pops up and includes it..
But whatever you do its a separate piece of code...there are no short
cuts that I know of.
> Regards
> Marco
|
|
|