|Oct 23, 2009, 11:10 AM||#1|
Opening powerpoint files using Java
I am working on a signed Java applet (used on an internal network only, so has full system privileges as if it were an application). As of now the applet works perfectly on Windows, but we are wanting to expand to let our growing base of Mac users to use the software too.
One of the main functions of the applet is that it launches files (mostly powerpoint files). These files are stored on the server and their names are displayed in the browser as a select list.
The user selects a file from the select list and can hit Preview, Edit, or Delete. At this point the file is downloaded from the server to the user's Desktop and subsequently opened by the operating system.
Delete is fairly simple, it deletes the file from the server and does not download the file.
On Windows, Preview opens the file in SlideShow mode regardless of if the file extension is ppt or pps. i.e. what you see when using PowerPoint Viewer, it goes directly to running the slideshow and no option to edit.
Also on Windows, Edit opens a ppt or pps file in the normal PowerPoint editor, so that you can make changes to the presentation and save/exit.
I am aware of the Desktop API for Java but this doesn't seem to work in this case. Both Desktop.open and Desktop.edit opens a file in the normal PowerPoint perspective. Instead, I have opted to use Runtime.getRuntime().exec() and pass it the full path to POWERPNT.exe. For the Preview action I also pass the "/s" switch, which forces it to run in slideshow mode. As stated earlier, this is working wonderfully for Windows.
Now that you see the picture of what I am trying to accomplish, onto the problem. As I said earlier we are wanting to branch into Mac OSX. I have determined that I can accomplish much the same thing on OSX again using the Runtime.getRuntime().exec() function, but this time pass it off to the 'open' command.
Runtime.getRuntime().exec("open -b com.microsoft.Powerpoint file.ppt");
Does anyone know how to specify a command line switch, or some other suggestion or solution to opening a ppt/pps file specifically as a slideshow or in edit mode?
Note: Renaming the file between ppt and pps to trigger slideshow mode is not an option here, unfortunately, for various "upper management" reasons.
Thanks so much for any help you can provide!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Opened .crt file, but no "Profiles" in Settings?||iExchange||iPhone Tips, Help and Troubleshooting||0||Nov 19, 2011 07:30 AM|
|can't run .jar file using java launcher in Mac OSX 10.6||maclover2011||OS X||3||Oct 13, 2011 04:56 AM|
|Cannot open powerpoint zip file||vertigofan||Mac Applications and Mac App Store||4||Jan 13, 2009 07:45 PM|
|file size of font file using java||ashokformac||Mac Programming||0||Mar 27, 2007 05:03 AM|
|Help opening Powerpoint files on Windows machine||AdamZ||Mac Applications and Mac App Store||2||Nov 28, 2004 05:10 PM|
All times are GMT -5. The time now is 10:30 AM.