Sha256: ba28ca07d398140bea93abfe74623d525475727f427cfec263fc654000812de6

Contents?: true

Size: 958 Bytes

Versions: 1

Compression:

Stored size: 958 Bytes

Contents

module Asposewordsjavaforruby
  module Nodes
    def initialize()
        # get nodes
        get_nodes()
    end
        
    def get_nodes()
        # The path to the documents directory.
        data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/quickstart/'

        # Create a new document.
        doc = Rjb::import('com.aspose.words.Document').new()

        # Creates and adds a paragraph node to the document.
        para = Rjb::import("com.aspose.words.Paragraph").new(doc)

        # Typed access to the last section of the document.
        section = doc.getLastSection()
        section.getBody().appendChild(para)
        
        # Next print the node type of one of the nodes in the document.
        node_type = doc.getFirstSection().getBody().getNodeType()
        node = Rjb::import("com.aspose.words.Node")
        puts "NodeType: " + node.nodeTypeToString(node_type)
    end 

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposewordsjavaforruby-0.0.5 lib/asposewordsjavaforruby/nodes.rb