Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Printing with Client Printers
Printing with Client Printers [message #552243] Wed, 11 August 2010 12:08 Go to next message
Edin Edin is currently offline Edin EdinFriend
Messages: 101
Registered: January 2010
Senior Member
Is there a way somehow to find out what printers are installed on the client side, and let a rap user to choose it and print i.e a pdf document created by the RAP application ? At the moment im using
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
from the javax.print.PrintServiceLookup class, then i create a menu in the workbench main menu that lists the printers and lets the user choose one for printing. but of course im getting only the server-side printers shown. i would like to bind client side printers, to avoid the user going to the server room for the papers, especially if they are in another city Smile in the browser i can see the local printers. i can save the pdf and then print it localy, but that is not comfortable. i want to have this option in my app. my view with a table has the button print, and when i press it, jasperreport creates a formatted pdf for that table and the choosen local printer shold start printing it.

Best regards, Edin
Re: Printing with Client Printers [message #552297 is a reply to message #552243] Wed, 11 August 2010 15:30 Go to previous message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 338
Registered: July 2009
Senior Member
Hi,

there is no way to get the installed printers of the remote system with
usual utilities. Maybe there is a way to use ActiveX to achieve this but
this would be a IE-only solution (and maybe low security settings).
But you could generate a PDF or HTML version of your print content and
print this on the client.
With HTML, you can use the SWT Browser widget and do a
executeScript("window.print();") or something similar.

Regards,
Ben

ededagic wrote:
> Is there a way somehow to find out what printers are installed on the
> client side, and let a rap user to choose it and print i.e a pdf
> document created by the RAP application ? At the moment im using
> PrintService[] services = PrintServiceLookup.lookupPrintServices(null,
> null);
> from the javax.print.PrintServiceLookup class, then i create a menu in
> the workbench main menu that lists the printers and lets the user choose
> one for printing. but of course im getting only the server-side printers
> shown. i would like to bind client side printers, to avoid the user
> going to the server room for the papers, especially if they are in
> another city :) in the browser i can see the local printers. i can save
> the pdf and then print it localy, but that is not comfortable. i want to
> have this option in my app. my view with a table has the button print,
> and when i press it, jasperreport creates a formatted pdf for that table
> and the choosen local printer shold start printing it.
>
> Best regards, Edin


--
Benjamin Muskalla | EclipseSource Karlsruhe
Need professional support for RAP and RCP?
Go to: http://eclipsesource.com/support
Twitter : @bmuskalla
Blog : http://eclipsesource.com/blogs/tag/rap/
Previous Topic:Current UI update is always triggered by the next UI event
Next Topic:DataBindig - performance problems when binding large lists
Goto Forum:
  


Current Time: Sat Nov 09 02:05:36 GMT 2024

Powered by FUDForum. Page generated in 0.03222 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top