|Oct 23, 2009, 10: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|
|Searching for text within pdf files -- without opening the files?||Fishrrman||Mac Applications and Mac App Store||7||Jul 3, 2013 01:20 PM|
|Opening Files||Stumpy25||OS X 10.8 Mountain Lion||2||Apr 24, 2013 11:32 AM|
|Exporting powerpoint slides as hi-res JPEG files||FloatingBones||Mac Basics and Help||0||Feb 26, 2013 03:26 PM|
|Java VM and other Java files||RedCroissant||Mac Basics and Help||0||Feb 19, 2013 11:57 PM|
|MBP switching colors when opening CS6 and Java programs||Grkbella03||MacBook Pro||5||Jan 31, 2013 09:44 PM|
All times are GMT -5. The time now is 06:18 AM.