Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Show PDF file on client
Show PDF file on client [message #1278502] Thu, 27 March 2014 12:23 Go to next message
Karel Haruda is currently offline Karel HarudaFriend
Messages: 22
Registered: March 2014
Junior Member
Hi,
Does anyone know how to preview PDF file on client ? I generate PDF file on server, next i transport it as byte[] to client. On client i save it as PDF file and now i need to show pdf.

thx ..
Re: Show PDF file on client [message #1278505 is a reply to message #1278502] Thu, 27 March 2014 12:30 Go to previous messageGo to next message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Hi Karel,
if you are using the desktop client and have a PDF Viewer installed, you could use the following snippet:

if (Desktop.isDesktopSupported()) {
 try {
  File myFile = new File("c:\\myfile.pdf");
  Desktop.getDesktop().open(myFile);
 }
 catch (IOException ex) {
  // no application registered for PDFs
 }
}


Does this help you?
Re: Show PDF file on client [message #1278508 is a reply to message #1278505] Thu, 27 March 2014 12:32 Go to previous messageGo to next message
Karel Haruda is currently offline Karel HarudaFriend
Messages: 22
Registered: March 2014
Junior Member
yes .. i find scout solution .. but pricip is same .. thx for answer ..
SERVICES.getService(IShellService.class).shellOpen(temp.getAbsolutePath()); (temp is File class)
Re: Show PDF file on client [message #1278511 is a reply to message #1278508] Thu, 27 March 2014 12:39 Go to previous message
Matthias Nick is currently offline Matthias NickFriend
Messages: 197
Registered: August 2013
Senior Member
Ah cool, I forgot about that.
Thanks for sharing your solution
Previous Topic:Trouble after updating to nightly Luna build
Next Topic:Dynamic resizing of table columns
Goto Forum:
  


Current Time: Fri Apr 19 09:35:12 GMT 2024

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

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

Back to the top