3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/asposeslidesjava/ActiveX/addactivex.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
pres = Rjb::import('com.aspose.slides.Presentation').new
pres.getSlides().get_Item(0).getControls().addControl(Rjb::import('com.aspose.slides.ControlType').WindowsMediaPlayer, 100, 100, 400, 400)
pres.getSlides().get_Item(0).getControls().get_Item(0).getProperties().set_Item("URL" , data_dir + "Wildlife.mp4")
pres.save(data_dir + "AddActiveX.pptx", Rjb::import('com.aspose.slides.SaveFormat').Pptx)
puts "Added ActiveX control, please check the output file."
end
|