docx_template 0.6
template = DocxTemplate::Docx.new "/opt/docx_template.docx" template.replace_text("##SINGLE_REPLACE_TEXT##", "ACTUAL TEXT HERE") template.replace_text("##MULTI_REPLACE_TEXT##", "ACTUAL TEXT HERE", true) template.replace_header("##HEADER_REPLACE_TEXT##", "ACTUAL TEXT HERE", true) template.replace_image("image1.jpeg", "/opt/image5.jpg") template.save('/opt/final.docx')