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
Hi, I'm trying to get Word generation working with v0.7.0 but the docx file generated always seems to be corrupt. I get the same error every time when trying to open the document in Word:
Xml parsing error
Location: Part: /word/document.xml, Line: 14, Column 6
I've unpacked the docx and examined the file and it seems fine to my uneducated eye. This is line 14:
I've tried opening in Word on both Mac and Windows with the same result.
I was initially trying this with an existing rails 5.1 app but when I hit this error I tried on clean installations of rails 5.1 and 4.2 with the same result. I based my controller action on the most basic examples from the docs too but still no joy:
respond_to :docx
def show
respond_to do |format|
format.docx do
render docx: 'my_file.docx', content: '<html><body>some html</body></html>'
end
end
end
Any ideas?
The text was updated successfully, but these errors were encountered:
Looks like this was due to invalid HTML in the documented example. I fixed it by changing the HTML in the Rails example to match that of the straight Ruby example, i.e. change:
Hi, I'm trying to get Word generation working with v0.7.0 but the docx file generated always seems to be corrupt. I get the same error every time when trying to open the document in Word:
I've unpacked the docx and examined the file and it seems fine to my uneducated eye. This is line 14:
I've tried opening in Word on both Mac and Windows with the same result.
I was initially trying this with an existing rails 5.1 app but when I hit this error I tried on clean installations of rails 5.1 and 4.2 with the same result. I based my controller action on the most basic examples from the docs too but still no joy:
Any ideas?
The text was updated successfully, but these errors were encountered: