java文档在线播放实现

一:准备条件


(1)先安装OpenOffice, 并且将OpenOffice的Service启动

(2)JODConverter工具

        JODConverter是透过OpenOffice来做转换,可以将文档转化为pdf格式。

从官网下载工具,找到需要的所有jar文件   http://www.artofsolving.com/opensource/jodconverter 
commons-cli-1.2.jar
commons-io-1.4.jar
jodconverter-2.2.2.jar
jodconverter-cli-2.2.2.jar
juh-3.0.1.jar
jurt-3.0.1.jar
ridl-3.0.1.jar
slf4j-api-1.5.6.jar
slf4j-jdk14-1.5.6.jar
unoil-3.0.1.jar

xstream-1.3.1.jar

如果你想使用maven,整理了相关的配置

               <!-- JODConverter需要的jar begin -->
		<dependency>
			<groupId>commons-cli</groupId>
			<artifactId>commons-cli</artifactId>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupId>com.artofsolving</groupId>
			<artifactId>jodconverter</artifactId>
			<version>2.2.1</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>1.4</version>
		</dependency>

		<dependency>
			<groupId>org.openoffice</groupId>
			<artifactId>juh</artifactId>
			<version>3.0.1</version>
		</dependency>

		<dependency>
			<groupId>org.openoffice</groupId>
			<artifactId>ridl</artifactId>
			<version>3.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.openoffice</groupId>
			<artifactId>unoil</artifactId>
			<version>3.0.1</version>
		</dependency>

		<dependency>
			<groupId>org.openoffice</groupId>
			<artifactId>jurt</artifactId>
			<version>3.0.1</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.5.6</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-jdk14</artifactId>
			<version>1.5.6</version>
		</dependency>

		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.3.1</version>
		</dependency>
		<!-- JODConverter需要的jar end -->

 

(3)安装pdf2swf.exe 

         可以将pdf文档转化为swf文件



(4)flexpaper_flash.js控件

       可以播放swf文件


二:具体实现

       参考:http://blog.csdn.net/u013628152/article/details/42146725

你可能感兴趣的:(java,文档播放)