3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/asposeslidesjava/Slides/creatingsvg.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(data_dir + 'demo.pptx')
last_slide_position = pres.getSlides().size()
i = 0
while i < last_slide_position
slide = pres.getSlides().get_Item(i)
slide.writeAsSvg(Rjb::import('java.io.FileOutputStream').new(data_dir + "SvgImage#{i}.svg"))
i +=1
end
puts "Created SVG images, please check output files."
end
|