PowerPoint的Java解决方案

关于PowerPoint的Java解决方案

2006年6月19日(Monday) 20点06分 作者: 刘冬 天气: 心情: 一般

在找一些Java操作PPT文档的资料,得到这样一些信息:

  1.  POI(hslf)对PPT的支持还在开发之中,目前尚未发布任何版本包括测试版。可以通过apache的版本控制系统获取到正在开发中的代码,不知道能用否;
  2. 搜索引擎查到最多的是一个商业版本——TonicPoint Builder (http://tonicsystems.com/products/builder/),提供DEMO版,等填完资料后告诉你说两天后答复你;
  3. 使用jawin(http://jawinproject.sourceforge.net/),这是一个开源的项目,只是它的工作原理是利用JNI调用OLE来操控PowerPoint,因此要求机器必须是Windows系统,且要装有PowerPoint,不是纯java的解决方案。

    Here's the code to load and export a PowerPoint presentation (with strPowerPoint as the path to the PowerPoint presentation and strOutputDir as the path to a directory in which to dump the images):

    Ole32.CoInitialize();
    DispatchPtr app = new DispatchPtr("PowerPoint.Application");
    DispatchPtr preses = app.getObject("Presentations");
    DispatchPtr pres = (DispatchPtr) preses.invoke("open", strPowerPoint,
                                                   new Integer(0), new Integer(0),
                                                   Boolean.FALSE);
    pres.invoke("Export", strOutputDir, "PNG");
    pres.invoke("Close");
    app.invoke("Quit");			
    Ole32.CoUninitialize();

    The code was based on a Jawin example. Obviously, this would be really painful for any significant amount of COM interaction, but for a quick-and-dirty task like this, it's pretty sweet.

继续搜寻中......或者等TonicPoint Builder把demo版发过来看能否破解之。如果不行,最后一种应该是最合适的方案。

 

 

 

 

 

The application PowerPoint is presentation software and a part of Microsoft Office. Its native file format has a file extension of .ppt. This page lists Java software to read and write PPT files.

Library / packageLicenseDescription
Davisor OffisorCommercialRead Powerpoint (PPT) files. Can convert them to XML. 100% Java.
POIApache Software License 1.1Read and write Microsoft OLE 2 compound document format files. This includes MS Office files (DOC, XLS, PPT) written with Office versions that were released after 1997.
Tonic Java PowerPoint LibraryCommercial, demo availableRead, create and manipulate PowerPoint files. 100% Java. Also available is a free Java reader for PPT files.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值