printing a page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

printing a page

Post by duk »

hy guys,

there is something that i could do, to print a page, but automaticly no one needs to clik ok just starts printing..

thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

No. You can open the print dialogue by putting document.print(); in the body onLoad attribute, but the user will still need to click.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

yeah im using that...

i realy need something to print automaticly, if someone knows something that could do this please tell me :D

thanks
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

I have to ask why you would want to circumvent a user's control over their own PC to start automatically printing anything? It's sort of a discouraged practice for law abiding folk...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The only automatic printing you could do, legally, is having the server print. But that's probably not what you want.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

Maugrim_The_Reaper wrote:I have to ask why you would want to circumvent a user's control over their own PC to start automatically printing anything? It's sort of a discouraged practice for law abiding folk...
my boss wants like that...

basicly its a registration form, when cames to the end should print two pages but he ask if i can take the user prompt to print and just start printing...
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

If you boss isn't that computer savey tell him/her that it has to do with computer security and the way the internet works. You are not allowed that type of control over a persons computer.
If they have seen a site that does it though, asking them where it is and have a look at their code.

I quite often print a registration page to file and would hate to have the printer spit it out at me if I wanted to save the page to file instead.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

phpScott wrote:If you boss isn't that computer savey tell him/her that it has to do with computer security and the way the internet works. You are not allowed that type of control over a persons computer.
If they have seen a site that does it though, asking them where it is and have a look at their code.

I quite often print a registration page to file and would hate to have the printer spit it out at me if I wanted to save the page to file instead.
lol, in fact things doesn't work that way in the business world, if the boss wnats something we nee dto look forward to find something that could do that... if not someone could find it for you, what i was tring to get here and i get it from feyd, maybe a print server could help me, and i just reply about my boss becouse someone was wondering why the hell this guy(me) wants to conrole a persons compeuter...
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Update.. this is possible. Albeit with a bit of a cheat.

Go here: http://www.ooer.com/bltl/list/printtest

Click "Print (PDF)" at the bottom, then click "Print as PDF" in the flyout .. hey presto .. one printed form.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

onion2k wrote:Update.. this is possible. Albeit with a bit of a cheat.

Go here: http://www.ooer.com/bltl/list/printtest

Click "Print (PDF)" at the bottom, then click "Print as PDF" in the flyout .. hey presto .. one printed form.
Interesting, nice find ;)
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

realy interesting :D

but i didn't find any how to???
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Everything you need to do it is on this page: http://www.fpdf.org/en/script/script36.php
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

nice find as well.

duk
part of your job would hopefully be partly to provide education on what is possible, what the standards are, and what might be acceptable.

If this is for internal use then you can do what the boss wants, if it is for public use, i would be hesitant to implement such a feature.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

phpScott wrote:nice find as well.

duk
part of your job would hopefully be partly to provide education on what is possible, what the standards are, and what might be acceptable.

If this is for internal use then you can do what the boss wants, if it is for public use, i would be hesitant to implement such a feature.
you right... and i know that... a part of education i do my best to explain, but sometimes there is some boos's that they just want to hear yes or no... and just a brief explanation if they want to hear...

off course i would never use this in a online service... someone that try to apply this online will not respect a visitor and not respecting in fact the all ethic arroud world wide web where the user interaction is all about :)
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

all is good with the world then.
Post Reply