Sha256: 75a580176cc9173877a33fdd19147f8753602487b3441e3d66c472315b0a65b7
Contents?: true
Size: 961 Bytes
Versions: 1
Compression:
Stored size: 961 Bytes
Contents
module Asposewordsjavaforruby module HelloWorld def initialize() # Create document. print_hello_world() end def print_hello_world() data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/quickstart/' #Create a blank document. document = Rjb::import('com.aspose.words.Document').new() #DocumentBuilder provides members to easily add content to a document. builder = Rjb::import('com.aspose.words.DocumentBuilder').new(document) #Write a new paragraph in the document with the text "Hello World!" builder.writeln("Hello World!") # Save the document in DOCX format. The format to save as is inferred from the extension of the file name. # Aspose.Words supports saving any document in many more formats. document.save(data_dir + "HelloWorld.docx") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asposewordsjavaforruby-0.0.5 | lib/asposewordsjavaforruby/helloworld.rb |