File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes how to load powerpoint presentation in java applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "how to load powerpoint presentation in java applet" Watch "how to load powerpoint presentation in java applet" New topic
Author

how to load powerpoint presentation in java applet

Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi all,

In my java application i am including an image in my applet by browsing through a dialog box, which can browse the image from my system wherever it is present. For example in c: drive or d: drive......

Same way if I want to browse power point presentations and want to display it on the applet, how can i do that?

I have searched a lot.
But found nothing.

Anybody has any idea please tell me.
Regards,


Khushwinder
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
In my java application i am including an image in my applet

I'm confused - is this an applet or an application? This matters because applets run under security restrictions that won't allow them to perform file I/O unless the applet is signed or the local security policy altered (you can find more about that here).

You would use the java.awt.FileDialog or javax.swing.JFileChooser classes to browse for files.

The hardest part would be to display PPT files. I'm not aware of an AWT or Swing component that can do that. It's not hard to read PPT files with the help of the Apache POI library, though. It lets you extract slide titles, text, images, notes and other information for each slide. You'll just have to display those in a meaningful way in the applet.
Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi Ulf Dittmer,
Thanks for your reply.
I apologize for not making myself clear.
Its an applet actually.
In my applet i have a canvas for displaying the images.
Now i want to display the ppt file in this canvas.
Is it possible or not?
I did not find any appropriate solution for this on the net.
Regards,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
You can't display it in the way you can display an image, because there's nothing in the class libraries that understands PPT files.

But as I said, it's not hard to use POI to read PPT files and iterate through their contents, displaying the slides' contents as appropriate. (If you want to show transitions etc. it gets a whole lot more complicated, of course.)
Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Thanks a lot Ulf Dittmer.
Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to load powerpoint presentation in java applet