Web page print button with set options

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
Ben11858
Forum Newbie
Posts: 16
Joined: Sat Nov 28, 2009 11:27 am

Web page print button with set options

Post by Ben11858 »

I'm not sure if this can be done or how. But I have a online system that takes information via forms and updates mysql database with various information using php. At the end I populate a web page with information from the database using php and what I want to do is have a print button that a user can press to print out the web page for the user but I want it so some printing options are set for the user like margins and have certain pages printed 2sided without user having to manually enter info so pages come out in right format. Does anyone know how this can be achieved? I haven't found anything in php that will work, so any advise would be appreciated.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Web page print button with set options

Post by Darhazer »

You cannot set this at a server, you need to set is at client side, which means a client side application (ActiveX for IE; or maybe Java?)
Ben11858
Forum Newbie
Posts: 16
Joined: Sat Nov 28, 2009 11:27 am

Re: Web page print button with set options

Post by Ben11858 »

Yeah, I wanted something client side. After some searching around I came across scriptx. The free basic verisin allows for margin, header, footer and page orientation options to be set. This is enough, although full version gives much greater control. Not that hard to implement after too. Just that it's ie only, which isn't a problem for me. But cheers :)
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Web page print button with set options

Post by omniuni »

I think your answer actually just lies in CSS for the printer.
Post Reply