module Docxi

encoding: utf-8

encoding: utf-8

encoding: utf-8

encoding: utf-8

encoding: utf-8

Constants

VERSION

Public Class Methods

test() click to toggle source
# File lib/docxi.rb, line 16
def self.test
  word = Docxi::Document.new

  word.document.break
  word.document.break
  word.document.break

  file = word.render
  File.open('test.docx', 'wb') do |f|
    f.write(file.string)
  end
end
to_xml(document) click to toggle source
# File lib/docxi.rb, line 12
def self.to_xml(document)
  document.to_xml(:save_with => Nokogiri::XML::Node::SaveOptions::AS_XML).gsub("\n", "\r\n").strip
end