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
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')
Ah, thanks for letting me know about that! Would you have some time to add a new test case for a doc with embedded images? The test could ensure that the HTML contains some expected test, and the the images are embedded properly. It would be great if you could please submit a PR to fix this issue. Thanks!
yhirano55
added a commit
to yhirano55/libreconv
that referenced
this issue
Apr 13, 2023
fixDocSpring#27
When the target format was 'html:HTML:EmbededImages', the current implementation of
the extension extraction logic generated an incorrect file extension of 'html:HTML'.
To address this issue, we have revised the extension extraction logic to correctly
identify and generate the appropriate file extension for the target format.
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
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
The text was updated successfully, but these errors were encountered: