To convert a document to HTML with embdedded images, you must use convert_to param 'html:HTML:EmbedImages'.
For example:
Libreconv.convert('document.docx', '/Users/ricn/pdf_documents/my_document_as.html', nil, 'html:HTML:EmbedImages')
But this code fail at
target_tmp_file = File.join(
target_path,
File.basename(@escaped_source_path, '.*') + '.' +
File.basename(@convert_to, ':*')
)
because generating output filename extension File.basename(@convert_to, ':*') returns 'html:HTML'.
This is incorrect filename extension.
I think code
File.basename(@convert_to, ':*')
must be replaced by something like this
@convert_to.split(':').first