Print on a server side printer

jglafkid
jglafkid's picture

Joined: 2004-01-25
Posts: 41
Posted: Thu, 2004-09-02 21:35

Hi,
I'd like to allow my logged-in users to print any picture from my gallery on a photo printer connected to my windows gallery server.

Does one of you has done it for gallery and if no can you help me doing the following (I'm not a dev expert ) for gallery 1.4.4 :
Having bellow each photo a print button which launch a printing on the server printer and write in a text file named userID-command.txt the name of the picture, the date of the print .

thanks for your help

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Thu, 2004-09-02 22:19

This sounds like a pretty scarry feature, I hope you protect your gallery well and hand pick your users. The first dude that prints out 50 images and drains your inkjet/color laser dry would piss me off.

Maybe instead of actually printing it, it would email you and say "print this pic please" or something. Seems more secure.

 
jglafkid
jglafkid's picture

Joined: 2004-01-25
Posts: 41
Posted: Fri, 2004-09-03 06:37

I agree it is scarry, but the goal is to have the requested printing in the spool, I then check and put printer online.
Having an e-mail implie I go on each picture then do the print myself. I'd like to have some kind of automatisation with a validation process.

Another way would be to write in a file the list of requested prints then a cron schedule the printing on a regular basis.

my main problem is that I don't know how to print a .JPG in PHP

thanks

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Fri, 2004-09-03 14:23

the scary part is allowing users & even logged in users the right to execute code on your local machine. If they have that function then there's the possibility to do even more damage.

:roll: [/code][/list]

 
jglafkid
jglafkid's picture

Joined: 2004-01-25
Posts: 41
Posted: Fri, 2004-09-03 15:13

I don't want them to execude code.
My functional need is to allow a logged-in user by clicking a button bellow a picture to send a print request of the picture on server side printer. I will add a validation process to avoid abuse.
I was also thinking of a shoping cart where user add picture to cart then submit the printing on my server.

My question are :
1/ how to print a JPG on server side from a PHP script ?
1'/ or how to print automatically from a batch file where the picture path is writen in ?
2/ how to add a button below the picture to call the previous script (1/) and write down a batch (1'/) or log (1/) file with the picture path and user name.

thanks for your warning.
There will be no more than 20 paper page in the printer so the risk of abuse is limited. And of course I don't want to allow an exec() function. I just want to send a .jpg print command on my server printer from the web UI.
My site is a familly site so not a lot of users.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Sat, 2004-09-11 20:31

since it is a windows box, you just need to find a piece of software that will print from the command line. irfanview will do it.

 
jglafkid
jglafkid's picture

Joined: 2004-01-25
Posts: 41
Posted: Mon, 2005-12-12 15:57

Only logged in user I know can connect to my server it is friends or Familly.
To add some precision of my request, I'm looking for an Additional Cart Action:
"Print on server site"
or "Treat picture on server".
This cart write down a piece of flat file with the name of the user and the list of picture to print(or to do whatever else).

Then a batch is launch which read the file and launch the printing (with irfanview ? or other) or any other action.
I don't know how to write the Cart Action. I am only able to write the batch.

Thanks for the help

 
jglafkid
jglafkid's picture

Joined: 2004-01-25
Posts: 41
Posted: Mon, 2005-12-12 15:58

My request is for G2 as now I'm on G202

May a moderator move this post to feature request of G2 or to G2 customisation ?

Thanks