Apache的POI XSLF电影添加到幻灯片 [英] Apache POI XSLF Adding movie to the slide

查看:282
本文介绍了Apache的POI XSLF电影添加到幻灯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Apache POI库创建与Java PowerPoint幻灯片。
我们的客户有兴趣嵌入文字,图片和视频。没有华丽的
像图等东西是需要现在。据我所知,XSLF仍
正在开发中,还没有一个成熟的产品。

I am using the Apache POI library to create powerpoint slides with Java. Our client is interested in embedded text, images and videos. No fancy stuff like charts etc. is needed for now. I understand that XSLF is still under development and not yet a mature product.

我已经使用Apache POI HSLF模型实现我的目标,但它唯一缺少的是,这是嵌入式的视频不显示任何播放控制。小研发后,我发现,这是这些都使得事情不同PPTX和PPT文件的标准。所以,现在要解决这个问题,我从HSLF迁移到XSLF。但不幸的是XSLF库没有任何方法添加的视频文件(不像HSLF addmovie法)。

I have achieved my target using Apache POI HSLF model but the only thing it is missing is that videos which are embedded doesn't show up any playback controls. After little researching I found that it is the pptx and ppt file standards which are making the things different. So now to solve this issue I am migrating from HSLF to XSLF. But unfortunately XSLF library doesn't have any method to add video file (unlike HSLF addmovie method).

用什么方法?是否有任何其他的方式来显示(而不是PPTX)?我的意思是通过附加的ActiveX控件/媒体播放器上的PPT文件播放控件。如果是究竟应该如何使用Java做?

What method you guys recomend ? Is there any other way to show the playback controls on ppt files(and not pptx)?I mean by additional activex control/mediaplayer. If yes how should it be done using Java ?

推荐答案

<一个href=\"http://www.pptfaq.com/FAQ00155_Sounds-Movies_don-t_play-_images_disappear_or_links_break_when_I_move_or_email_a_$p$psentation.htm\"相对=nofollow>从2010年简报有可能嵌入PPTX档案影片开头(...而不是把它们联系起来,或者使用某种的ActiveX / YouTube的组合)。如果您嵌入<一个href=\"http://office.microsoft.com/en-us/powerpoint-help/compatible-audio-and-video-file-formats-in-powerpoint-2010-HA010336709.aspx#_Toc261351670\"相对=nofollow> MP4,视频,你需要安装QuickTime的插件。

Beginning from Powerpoint 2010 it's possible to embed videos in PPTX-files (... instead of linking them or using some kind of ActiveX/youtube combo). If you embed MP4-videos you need to have the Quicktime plugin installed.

对于播放控件,我的PP 2010查看器显示他们当你在视频形状移动鼠标。有时,他们不会再出现,当你点击直接进入图像,而不是等待弹出。

Regarding the playback controls, my PP 2010 viewer displays them when you move the mouse over the video shape. Sometimes they never show up again, when you click straight into the image instead of waiting for the popup.

以下code ...

The following code ...


  • 取一个MPEG(可能也是一个本地文件)

  • 创建五号第二,它是用来作为preVIEW图像的帧的快照。我在这里使用了 Xuggle 库,但当然任何其他库都OK太(平... JMF (不带扩展包)无法处理(本) MPEG文件)

  • 嵌入图像和视频

  • ,并增加了一些随意;)的东西,它需要PP实际播放视频

  • fetches a MPEG (could be also a local file)
  • creates a snapshot of the frame on the 5th second, which is used as the preview image. I've used the Xuggle libs here, but of course any other libs are ok too (... plain JMF (without extension pack) couldn't handle (this) MPEGs)
  • embeds image and video
  • and adds some arbitrary ;) stuff, which PP needs to actually play the video

下面是code:
<一href=\"https://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/AddVideoToPptx.java.txt\" rel=\"nofollow\">https://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/AddVideoToPptx.java.txt

(更新2016年2月6日:移动code到POI的例子,所以只有一个在新功能的情况下被改性的地方此外,还有在POI 3.13回归使它不可能。添加图片添加电影到媒体目录之后 - 这被固定在即将到来的POI 3.14)

这篇关于Apache的POI XSLF电影添加到幻灯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆