perl code to get a list of printer name from user's pc

Hi all, I posted this question a few months ago and no one could answer it. I would like to ask again  if anyone know the way to do it now. thanks

I have a Perl applicaiton running on the unix platform. Users can access the application via  ie browser from their laptop or PC (window xp).  The question is: when user clicks a print button in the perl application, is that a way to what printers are installed/available  on user's PC from perl application?  I am a newbie to Perl and unix stuffs, So any help is appreciated. Thanks in advance.

LuckyperlAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TintinCommented:
If the user does

File->Print from their browser they can select a printer.

It's not possible to do it via a server side Perl (or any other language) application.
0
jmcgOwnerCommented:
So what you might be able to do is let the user pick a printer from a list of printers that the server knows how to print to and store that selection (via a cookie or a persistent session variable).

What you cannot do, without violating the web browser security model, is include some script code in a web page that retrieves arbitrary information from the user's PC. I think the default printer selection probably falls under this general prohibition. If you and your users were willing to violate the security model, then it'd be fairly simple to have them download and execute a program that would report the printer selection back to your web server.
0
LuckyperlAuthor Commented:
Could you give more specific or example about this?

"include some script code in a web page that retrieves arbitrary information from the user's PC"

Thanks
0
jmcgOwnerCommented:
Suppose you could write some scripting code on a web page that, without asking the user, searched the hard drive for Quicken data files and extracted account information from them, then sent this information back to a place of the web site's choosing. That's the sort of scenario that the browser's security model is intended to prevent. Of course, learning what printer the user has selected as a default does not sound like such a terrible security problem, but it's something that currently lies outside the boundary of things the browser allows scripts to know.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
My approach would be similar to jmcg's first suggestion.

The first time a user goes to print, they are given a list of printers to send it to.  When they have selected their desired printer, a cookie is set so that they don't need to select the printer again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.