[b]The challenge is on: Creating PowerPoint Files with Java[/b]

Hi, guys and geeks!!
I'm new here and generally not as skilled and talented as you guys -
that's why I am passing this challenge on to you:
I want to create a PowerPoint presentation using Java. (My Data will be in XML and I'll have to generate slides with Flow-Charts from that data)
1.
I know of only one commercial Library that seems to do this very comfortably. But it costs about $5000... (http://tonicsystems.com/) - have you used it?
2.
I know that I could use Apache's POI (http://jakarta.apache.org/poi/), as it gives me access to the MsOLE 2 compound doc. format, but their work is most developed only for Excel and Word. so I'm not sure what kind of obstracles I'd be facing....
3.
And then there is JAWIN (http://jawinproject.sourceforge.net/) which would enable me to call COM-Components... How would I do that?
Any other /better ideas?
So, please let me know your thoughts and if you know what I could do!
Also, please let me know how I should go about with it.....
I'm looking forward to seeing your "muscles" (i.e. knowledge) play...!
Cheers,
Anna ;o)

Hi i'm still working on my program to generate PowerPoint Files with Jawin. I'm trying to get the heght property on a row.
For example: rows(1).height
I can get rows. but not rows(1).
I got a jawin Exception on :
public int getRowHeight(int row) throws COMException
DispatchPtr rows;
int rowHeight;
DispatchPtr theRows = (DispatchPtr) this.getDispatchPtr().get("Rows",new Integer(1));
rowHeight = (Integer) theRows.get("Height");
return rowHeight;
Here is the stacktrace:
org.jawin.COMException: 80020003: Member not found.
at org.jawin.marshal.GenericStub.dispatchInvoke0(Native Method)
at org.jawin.marshal.GenericStub.dispatchInvoke(GenericStub.java:201)
at org.jawin.DispatchPtr.getN(DispatchPtr.java:248)
at org.jawin.DispatchPtr.get(DispatchPtr.java:194)
at pptpublisher.PPTTable.getRowHeight(PPTTable.java:117)
at pptpublisher.Main.main(Main.java:51)
Thanks for replying

Similar Messages

  • Creating Powerpoint files with java

    Hi,
    I'm working on an existing web app. Our customer wants to have a download link to a powerpoint file that is filled dynamically with data from the SAP system. All user use the IE-browser.
    So I am facing three possibilities, but all are not really good.
    1. Convert the ppt-file (the empty template without the data) to html via powerpoint 'save as html'. After this, we rename the html-files to jsp's and coding in the jsp's some scriplets.
    So when the user gets the filled html-file in the IE, he / she can use 'Edit with Powerpoint' and save the file as ppt.
    But with this solution you can't do everything. In the html you can't embed documents, etc. which are afterwards included in the ppt file as well.
    2. We send a ppt-document to the browser which gets the data via macro over some servlets. But then I have to code some visual basic and I don't know vbasic (and don't know if this solution really works).
    3. We install powerpoint on the server and use the DCOM / ActiveX to connect to ppt. But in my opinion this is the worst case scenario. I don't want to have office running on a server. In an older project we used excel on a server which was horrible. Sometimes excel was grapping the whole memory while doing nothing.
    Any better ideas?
    Any known API's to create powerpoint, like POI which we are using to create excel sheets?
    All suggestions are welcome ...
    Greetings
    Ralph

    epilogue:
    We solved the problem in a complete different way - but this is only working in IE Browser as far as I know:
    1. We took the empty ppt slide, inserted Strings like 'session.getAttribute("name")' at the place where the dynamic data should be and saved it as html (in Powerpoint 'Save as...'). This generates 20 - 30 files. (Hard work and not very funny when you have to change sth.)
    2. We renamed the 'interesting' html pages to jsp and put them in another directory.
    In the jsps there is an forward to the other 'jsp'-slides
    3. We wrote a servlet which then writes the output of these jsps to disc (to the origin directory) as html files. (Before we got the data from the backend system and put them in the session and so in the jsps).
    4. After all a link to the original index.html of the ppt is send to the browser.
    5. The IE shows the files and 'regonizes' that this is a ppt.
    6. In the IE you can select 'Save as ppt'
    There you go !
    Thanks to M$ for all those open and integrated tools ;-)
    Ralph

  • Can't create log file with java.util.logging

    Hi,
    I have created a class to create a log file with java.util.logging
    This class works correctly as standalone (without jdev/weblogic)
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.*;
    public class LogDemo
         private static final Logger logger = Logger.getLogger( "Logging" );
         public static void main( String[] args ) throws IOException
             Date date = new Date();
             DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
             String dateStr = dateFormat.format(date);
             String logFileName = dateStr + "SEC" + ".log";
             Handler fh;          
             try
               fh = new FileHandler(logFileName);
               //fh.setFormatter(new XMLFormatter());
               fh.setFormatter(new SimpleFormatter());
               logger.addHandler(fh);
               logger.setLevel(Level.ALL);
               logger.log(Level.INFO, "Initialization log");
               // force a bug
               ((Object)null).toString();
             catch (IOException e)
                  logger.log( Level.WARNING, e.getMessage(), e );
             catch (Exception e)
                  logger.log( Level.WARNING, "Exception", e);
    }But when I use this class...
    import java.io.File;
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.FileHandler;
    import java.util.logging.Handler;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.logging.XMLFormatter;
    public class TraceUtils
      public static Logger logger = Logger.getLogger("log");
      public static void initLogger(String ApplicationName) {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
        String dateStr = dateFormat.format(date);
        String logFileName = dateStr + ApplicationName + ".log";
        Handler fh;
        try
          fh = new FileHandler(logFileName);
          fh.setFormatter(new XMLFormatter());
          logger.addHandler(fh);
          logger.setLevel(Level.ALL);
          logger.log(Level.INFO, "Initialization log");
        catch (IOException e)
          System.out.println(e.getMessage());
    }and I call it in a backingBean, I have the message in console but the log file is not created.
    TraceUtils.initLogger("SEC");why?
    Thanks for your help.

    I have uncommented this line in logging.properties and it works.
    # To also add the FileHandler, use the following line instead.
    handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandlerBut I have another problem:
    jdev ignore the parameters of the FileHandler method .
    And it creates a general log file with anothers log files created each time I call the method logp.
    So I play with these parameters
    fh = new FileHandler(logFileName,true);
    fh = new FileHandler(logFileName,0,1,true);
    fh = new FileHandler(logFileName,10000000,1,true);without succes.
    I want only one log file, how to do that?

  • What's the best way to create XML file with a schema from a database table?

    Hi,
    I want to create an XML file from a database table (which has over 600 columns) using XML schema (.xsd file). I want to know the best way to do this.
    The output XML file is NOT a direct data dump from the DB table, there�re some logic around it, such as the XML file has some hierarchy with repeating tags.
    I have done this using JAXB by creating Java classes form XML schema, but I don�t want to map 600 DB columns to these Java classes manually, and loop through the record set to create repeating tags.
    I know there are few tools around now like MapForce (Altova), how do people do these now?
    Thanks,
    Chandi

    Can you use a schema when we compose XML doc from Database tables?
    Actually, I'm using SQL Server (sorry, wrong forum). But, I thought a Java tool would have a solution for me.

  • What the best way to create XML files from JAVA application?

    Hi to all,
    I need to edit and to create new filex in format of xml. I know to parse, but what would be the best way to do:
    1. - Create new file, create like simle text file, or there is some clases that know to do it in more simple way
    2.a - Edit XML file, to take some data and add it to the XML in the place I want to.
    2.b - Also Edit, but not to add fields, just update some of them.
    Code examples or links to samples woul be welcomed.
    Best regards, Nick.

    I have tried working with XML directly using the Java classes but this was a pain. I then looked at DOM4J and JDOM and found JDOM easier to use.

  • Creating XML files with the DME

    Hi All,
    I'm working on an integration project between my company and HSBC, they are requesting that we supply our AP payment files for foreign currency in XML format.
    I have some limited experience with the DME and know it can create XML files, however, the elements available for XML files are different to standard flat files. Also it doesnt seem like I can create files with multiple levels? e.g.
    <InitgPty>
    ......... <Id>
    ............... <OrgId>
    ...................... <BkPtyId>ABC00103003</BkPtyId>
    .............. </OrgId>
    ........ </Id>
    </InitgPty>
    Does anyone have any documentation or experience with creating XML files with DME?
    thanks
    Phil.

    Hi,
    Please ask any Implementation team in ABAB or Report painter team with your friends,
    Thanks and REgards
    N.Soma Sundaram

  • I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I alocate th

    I am trying to find out how to assign files with particular extensions to the appropriate software. At the moment when I create a file using Word it is apparently given the extension .docx but Word doesn't recognise its own files. How do I allocate the extension .docx to Word? There used to be a way of doing it, I think under "Preferences" but I can't seem to find it.

    Still in the same location:
    File > Get Info > Open with (select) > Change All (button)

  • Captivate 8 : the PDF export created a file with a PDF extension.. but it's actually a video. Shouldn't it export the slides as a proper PDF document ?

    In Adobe Captivate, there is a "PDF export" checkbox available when you publish your project.
    It checked the box, and the project pulication created a file with a PDF extension.. but it's actually a video. Shouldn't it export the slides as a proper PDF document ?

    Thanks for the quick answer. I did not know about interactive PDFs..
    I just found how to export as a Word document. I would have expected to find that option in "Publish" or "Export", not "Print".. Anyway, I now have what I needed

  • Can i sing documents on ipad2? Can I make notes and corrections on a powerpoint file with a pen or something similar in the ipad2?

    Some one can help me if there is a way to sign documents on an ipad2 as on a tablet pc? or correct or making notes on a powerpoint file with some kind of pen in Ipad2?
    Thank you in advance!

    There are several app's that allow you to sign documents. I am currently using EasySign which not only allows you to sign but also several other features that accompany executing documents such as date, title, etc. DocsToGo allows you to open and edit PowerPoint slides and other MS Office files. Again there are other app's that are similar but DocsToGo has been a favorite of mine for years on several different platforms.

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Create dump file with datapump, with read right for everybody

    Hello,
    I have a problem under Linux : I am creating dump files with datapump.
    Those dump files are owned by a dba group, with no read access for users not in the dba group.
    Is there a way that the datapump utility creates dump files with a read access given to any user ?
    Franck

    Unlike "exp", when using "expdp", the dumpfile is created by the server process. The server process is forked from the database instance. It inherits the umask settings that are present when the database instance is started.
    (Therefore, the only way to change the permissions would be to change the umask for the oracle database server id and restart the database instance --- which is NOT what I would recommend).
    umask is set so that all database files created (e.g. with CREATE TABLESPACE or ALTER TABLESPACE ADD DATAFILE) are created with "secure" permissions preventing others from overwriting them -- of course, this is relevant if your database files are on FileSystem.
    Hemant K Chitale

  • What is the max size of a zip file with the JDK1.5 ?

    Hello everybody,
    I'm a french student and for a project, I need to create a zip file, but I don't know in advance the number and the size of files to include in my zip.
    I wish to know if someone have the answer to my question : what is the max size of a zip file with the JDK1.5 ? I believe that with the JDK1.3, the limit size of a zip was about 2Go, wasn't ?
    Thank you for all answer !
    Good day !
    PS : sorry for my very poor english ;-)

    Here is all I have found for the moment :
    ...Okay, what about my suggestion of creating your own 10GB file?
    Try this:import java.io.File;
    import java.io.RandomAccessFile;
    import java.nio.ByteBuffer;
    import java.nio.channels.FileChannel;
    import java.util.Random;
    class Main {
        public static void main(String[] args) {
            long start = System.currentTimeMillis();
            int mbs = 1024;
            writeFile("E:/Temp/data/1GB.dat", mbs);
            long end = System.currentTimeMillis();
            System.out.println("Done writing "+mbs+" MB's to disk in "+
                    ((end-start)/1000)+" seconds.");
        private static void writeFile(String fileName, int numMegaBytes) {
            try {
                int numBytes = numMegaBytes*1024*1024;
                File file = new File(fileName);
                FileChannel rwChannel =
                        new RandomAccessFile(file, "rw").getChannel();
                ByteBuffer buffer = rwChannel.map(
                        FileChannel.MapMode.READ_WRITE, 0, numBytes);
                Random rand = new Random();
                for(int i = 1; i <= numMegaBytes; i++) {
                    for(int j = 1; j <= 1024; j++) {
                        byte[] bytes = new byte[1024];
                        rand.nextBytes(bytes);
                        buffer.put(bytes);
                rwChannel.close();
            } catch(Exception e) {
                e.printStackTrace();
    }On my machine it took me 43 seconds to create a 1GB file, so it shouldn't take too long to create your own 10GB. Then try zipping that file.
    Good luck.

  • Creating .jnlp files from .java files

    Last resort: Ask on the forums. I'm having a lot of trouble creating .jnlp files with only a .java file. For some reason if I do create project, the project does not run correctly, but when I make the file and run the file alone, it works perfectly fine. Most of the tutorials that I have read online ask me to do weird manifest .class stuff (in order to make JAR files, which i have failed to do even after attempting to make one after 3 hours). And still, when it comes to make the .jnlp file, I don't quite understand anything. When putting it on the web, I'm planning not to use php (html is in my mind right now), and I have aborted every single attempt at making the JAR files and whatnot.
    At this point, I'm not asking for anything other than a link to a tutorial that actually works, because all that I have tried (for the JAR files, especially) have been giving me errors. By the way, one really bothersome output that comes up is the "illegal option: j" when I use the Tool for the JAR file, and I have no idea what that means--I google it and find nothing. The .java itself extends JPanel, so it isn't really an applet.
    How to: Run an Applet
    Create an Applet Class by clicking File > New > File > File Type > Java Classes > Applet Class.
    Enter a name and path for the applet and click Finish.
    Build the file by pressing F7.
    Create an Applet HTML file by clicking File > New > File > File Type > Other > HTML Applet.
    Enter a name and path for the applet and click Finish.
    Open the HTML file in JCreator and modify the applet tag to match the name of the applet class.
    Open the Project Settings window and select the HTML file as the Run parameter.
    Click the Run Project button.It isn't really a code, but I tried doing this and the HTML Applet said code = ".class" Again, I don't have a class for the file. And when you do the "File > New > File > File Type > Java Classes > Applet Class," you get the .java file and a folder that says "components, with two classes in it. I was completely befuddled.

    http://forum.java.sun.com/thread.jspa?messageID=9783924

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to create pdf files with text field data

    how to create pdf files with text field data

    That looks like it should work, but it doesn't.
    I opened the PDF I had created from Word in Acrobat (X Pro). Went to File > Properties. Selected "Change Settings". I then enabled "Restrict editing...", set a password, set "Printing Allowed" to "none", "Changes Allowed" to "none", and ensured that "Enable copying of text..." was disabled.
    I saved the PDF file, closed Acrobat, opened the PDF in Reader, and I was still able to select text and graphical objects.
    I reopened the PDF in Acrobat, and the document summart still shows everything as allowed. When I click on "show details" (from File > Properties) it shows the correct settings.
    Any ideas?

Maybe you are looking for

  • Is this a bug?: copied movie clip has wrong frame rate and ruins the main movie's sync

    Hello, I am trying to copy a movieclip with a frame rate of 30 frames per second to a movie that has a frame rate of 30 frames per second. Both movies are actionscript 3 movies. When I do this, my copied movie clip's frame rate reverts to 12 frames p

  • How to reset a passcode on an iPad given as a gift?

    How can I reset a passcode on an ipad given as a gift?

  • Dvd play

    Please advise procedure (step-by-step) for playing DVDs on this computer.Presently plays CDs efficiently with a one-step click on "media suite" for play back. DVDs in same tray using "media suite" to activate generates only error messages ("cannot pl

  • Sequence settings to avoid re-rendering

    After importing AVCHD files from my Panasonic SD1 and placing them in the timeline, a full time-consuming render is required. Plus, every cut or change I make requires re-rendering. This implies that the clip and sequence settings are incompatible. I

  • [svn:osmf:] 11209: Unit Tests for DRM.

    Revision: 11209 Author:   [email protected] Date:     2009-10-27 16:31:53 -0700 (Tue, 27 Oct 2009) Log Message: Unit Tests for DRM.  Not at full code coverage yet. Modified Paths:     osmf/trunk/framework/MediaFramework/org/osmf/drm/DRMServices.as