Sha256: e973b2e37ece265b13fff40de971c87494cb9273ff1d4680b2f579d8c8c4d9de
Contents?: true
Size: 691 Bytes
Versions: 7
Compression:
Stored size: 691 Bytes
Contents
# require "sablon" # # template = Sablon.template(File.expand_path("./template.docx")) # # context = { # # title: "Fabulous Document", # # technologies: ["Ruby", "HTML", "ODF"] # # } # # template.render_to_file File.expand_path("./output.docx"), context # # word_processing_ml = <<-XML.gsub("\n", "") # <w:p> # <w:r w:rsidRPr="00B97C39"> # <w:rPr> # <w:b /> # </w:rPr> # <w:t>this is bold text</w:t> # </w:r> # </w:p> # XML # context = { # long_description: Sablon.content(:word_ml, word_processing_ml) # } # # template.render_to_file File.expand_path("~/Desktop/output.docx"), context # # template.render_to_file File.expand_path("./output.docx"), context
Version data entries
7 entries across 7 versions & 1 rubygems