You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to inject the following html paragraph to a docx file I'm getting an error when opening it:
test
What I've figure out is that sablon, apparently, is not supporting text-align: justify style injection into the file. Because if I change it to "left", "center" or "right" it works perfectly.
This is what I'm doing to inject info to the template:
I'm trying to inject the following html paragraph to a docx file I'm getting an error when opening it:
test
What I've figure out is that sablon, apparently, is not supporting text-align: justify style injection into the file. Because if I change it to "left", "center" or "right" it works perfectly.
This is what I'm doing to inject info to the template:
html_content = Sablon.content(:html, <p style="text-align: justify">test</p>)
template = Sablon.template(<template_path>)
output_docx = Tempfile.new([<project_name>, '.docx'])
context = {test_label: html_content}
template.render_to_file output_docx.path, context
output_docx.close
This is the template file:

When I try to open the generated file I get the following error:

The text was updated successfully, but these errors were encountered: