-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail convert if "convert_to" consists of three parts #27
Comments
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! |
fix DocSpring#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.
@ndbroadbent Pull request #35 has resolved this issue. Could you please review the changes and confirm that they have addressed the problem? |
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: