Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » [Neon] Print Dialog - How to?(I want to print a file, which is generated on Server)
[Neon] Print Dialog - How to? [message #1730889] Fri, 29 April 2016 14:44 Go to next message
Andreas Christ is currently offline Andreas ChristFriend
Messages: 32
Registered: April 2016
Member
In my Scout Neon application I generate a PDF on a Server, and it will be transmitted to the Scout Client. The next step should be, that a "Print Dialog" pops up, where I can select a suitable printer and the PDF will be printed.

Well, I havn't found a "Printer Dialog"!

My workaround is the Scout's "Save As...". On Windows systems it (might) open the Acrobat Reader automatically, and I can review the PDF and print afterwards.

String filename = "blabla.pdf";
// retrieve PDF in binary data from REST service
byte[] data = BEANS.get(ICoverSheetService.class).createDocument(printPersonID);
// open "Save as..." dialog
ClientSessionProvider.currentSession().getDesktop().openUri(new BinaryResource(filename, data), OpenUriAction.DOWNLOAD);

My question:
Can I prevent the step with "Acrobat Reader" and go directly to the Printer Dialog?
Re: [Neon] Print Dialog - How to? [message #1731132 is a reply to message #1730889] Tue, 03 May 2016 06:05 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Since your neon application will be "running in a browser", your only option is really what you are doing (i.e. "downloading" the file to the user's computer and then letting him choose whether he wants to save it or to open it in his PDF viewer).
Re: [Neon] Print Dialog - How to? [message #1731525 is a reply to message #1731132] Fri, 06 May 2016 13:22 Go to previous message
Andreas Christ is currently offline Andreas ChristFriend
Messages: 32
Registered: April 2016
Member
Ok, thank you for your reply. Well, after all it's ok for the users. In fact, on their Windows systems the Acrobat Reader starts automatically with the PDF download, so they have a nice "preview" functionality. And they can print with the Reader on the printer of their choice... everybody's happy! Wink
Previous Topic:[Neon] Theming
Next Topic:[neon] M7 crash in session creation
Goto Forum:
  


Current Time: Sat Apr 20 00:06:46 GMT 2024

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

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

Back to the top