3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/asposewordsjavaforruby/doctohtml.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/'
doc = Rjb::import('com.aspose.words.Document').new(data_dir + "TestFile.doc")
options = Rjb::import('com.aspose.words.HtmlSaveOptions').new
options.setExportRoundtripInformation(true)
doc.save(data_dir + "ExportRoundtripInformation Out.html", options)
doc = Rjb::import('com.aspose.words.Document').new(data_dir + "ExportRoundtripInformation Out.html")
save_format = Rjb::import('com.aspose.words.SaveFormat')
doc.save(data_dir + "Out.docx", save_format.DOCX)
end
|