Forum Moderators: coopster

Message Too Old, No Replies

Printing problem

         

babloo

5:30 am on Sep 27, 2004 (gmt 0)

10+ Year Member



Hello,

I have a table of report generating from a mysql database. I have also given the print option to the users. But when i view the print preview, some sections of the table is going out of paper. I mean the few fields from the right side of the tables is going out of paper.

Is there any script which takes care of this Or is there any script which prints automatically in landscape mode. Please help me regarding this. Thanks

Babloo

mincklerstraat

8:34 am on Sep 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Printing would be more 'client side' (what the browser does) than 'server side' - so more likely a javascript issue. PHP could only be responsible for outputting this javascript in some way or other. I'd ask this question in the javascript forum - then you'll have to figure out what kind of javascript you are currently using to make things print (hint - look at the source of the print link), and replace the function being used.

jamie

8:46 am on Sep 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi babloo,

php is not the answer for this, i think this is possible with css, although afaik support from browsers is extremely limited / non-existant.

why not just popup a window or notice to tell users to change their print settings

ergophobe

5:38 pm on Sep 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've gotten pretty good results with print media stylesheets for text only. Once you have images and boxes and so on, I seem to remember problems with images splitting across pages.