Sha256: 232e1333496a5da149cfd5e892948b6eeb6e591b6a8a7d4059d19898d3dd75f6
Contents?: true
Size: 991 Bytes
Versions: 2
Compression:
Stored size: 991 Bytes
Contents
module Asposeslidesjava module ConvertingToHtml def initialize() # Converting Presentation to HTML format convert_to_html() end def convert_to_html() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Instantiate a Presentation object that represents a PPTX file pres = Rjb::import('com.aspose.slides.Presentation').new(data_dir + "Aspose.pptx") html_opt = Rjb::import('com.aspose.slides.HtmlOptions').new html_formatter = Rjb::import('com.aspose.slides.HtmlFormatter') html_opt.setHtmlFormatter(html_formatter.createDocumentFormatter("",false)) # Saving the presentation to HTML format save_format = Rjb::import('com.aspose.slides.SaveFormat') pres.save(data_dir + "Aspose.html", save_format.Html, html_opt) puts "Document has been converted, please check the output file." end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
asposeslidesjava-0.0.2 | lib/asposeslidesjava/Presentation/convertingtohtml.rb |
asposeslidesjava-0.0.1 | lib/asposeslidesjava/Presentation/convertingtohtml.rb |