java - 如何读取ppt等office文档中的数据结构
巴扎黑
巴扎黑 2017-04-18 10:23:35
0
2
512

请问一下,如果想读取一个ppt等office文件中的所有数据,比如说转场动画,照片及其大小定位等信息。有没有什么好的推荐?

自己搜索了几天,就发现了3个相关的。

  1. OpenOffice(LibreOffice)

  2. office官方开发(不过需要在.net 上开发)

  3. PHPPresentation。

但是office官网的应该是只支持做扩展应用,不符合我的需求。
PHPPresentation支持下却不是很强,读取的接口很多不支持。
所以就剩下了OpenOffice,这个选项,请问OpenOffice是否通过java编程对ppt里的内容进行读取?
或者还有什么好的建议?

巴扎黑
巴扎黑

reply all(2)
Ty80

Official documentation is here
Link

After thinking about it, this link might be more helpful. . .
https://blogs.msdn.microsoft....
After all, it is based on xml. The reading part is technically not difficult, but it is a little troublesome to actually do it

阿神

The 2003 version of the PPT format is in binary format, and the details are not fully disclosed. Most third-party manufacturers use one-way engineering methods to guess and analyze it. WPS does a better job, but the only open source one is LibreOffice (formerly OpenOffice) which does a very poor job.
The PPTX format after the 2007 version is based on the OOXML open document specification. It is essentially a ZIP package that compresses XML documents and related resources. OOXML itself has become an ISO standard and published.
But. The functions of Office documents are extremely complex. Think about the Office code, which has more than a million lines of code. Only Microsoft Office has truly fully implemented OOXML, and Office is closed source. So if you want to parse OOXML yourself, it is extremely difficult. LibreOffice's own set of document specifications and OOXML are competitors, so mutual support is poor.
The only feasible way is to use COM to call the Office programming interface. This can only be used on a system with Office installed. To use C++ and Microsoft Office SDK, you must use Visual Studio. You basically don't get the original data structure. You can only call the API interface one by one, enumerate the content one by one, and obtain attributes and so on. This is how Adobe Acrobat converts Word to PDF.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!