[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Restrict Printing to local printers only  XML
Forum Index -> Development
Author Message
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello Community,

we have the following requirement from a customer:
The user should only be able to print on printers that are locally attached to the clients machine. The reason behind this is that the information that should be printed is very sensitive (PIN letter).

I know that we have the pdfprinter component where we can restrict the printing to the standard printer. But this is not an option for the customer since the end user can change the standard printer.

After a bit of googling i could not find a way to find out any information about if the printer is connected locally or through the network.

Does anyone of the community have any experience with that? Is there some hint you can give me? Can we have it as a feature in the pdfprinter ;-)?

Tobias
krinninger

Power User

Joined: 17/11/2008 21:19:41
Messages: 567
Offline

Hello Tobias,

we have written our own print-controls because we had a lot of such weired printing requirements. We solved such an issue by matching printer names directly to users, because with Java you just get a PrintService-Array when looking up printers. There you do only have limited access to informations about the printer.

But you can access Win32PrintService by reflection. There the method getPort() is available which gives you a hint if printer is whether local or not.
It is also possible to register an own PrinterLookupService, with a more "native" implementation, but we have never tried to, so we do not have any experience to share.

If Björn is interested, we can hand over our printer controlset to captaincasa community.

kind regards,
Michael
hilka

Power User

Joined: 23/11/2007 09:00:08
Messages: 191
Offline

Hello Michael,

I knew that we have the experts around that in the community!

So if I understand correctly you save the printer name for each user in the user record and pass it to your print control. That could be an option, but then we have to do the administration for each user.

I will try the hint with the Win32PrintService, but then we are platform-dependent, which is ok for this one customer, but not a general product solution.

Thanks a lot for you help!

Tobias
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team