-
Notifications
You must be signed in to change notification settings - Fork 44
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
Docx report issues #51
Comments
Hi @EmiliaChovancova thanks for reporting this issue I will take it a look and I will let you know :) Thank you |
Hi @EmiliaChovancova I found the issue it's a known bug on a library used to convert the html code to openxml format I did a downgrade of the library until it's fixed in the nexts days :) I created a dev image if you want to test it before to commit the changes git clone https://github.com/CervantesSec/docker.git
docker-compose -p cervantes -f docker-compose-dev.yml up -d Thank you :) |
Hi @mesquidar, It looks like the functionality is still not working. The library that is used to convert the html to xml declares that it supports “margin”, but even after you downgraded the library the image is still not exactly, where it is supposed to be. I would create an issue with the library as it is not a cervantes bug but the html2openxml library, wdyt? |
Hi @mesquidar, wdyt about my proposal? |
Hi @EmiliaChovancova sorry I didn't saw your message. Yes sure you can open an issue if you want I updated the library to new version that dev released and I am making some tests I created a new dev image if you want to test i too Thank you :) |
Hi @mesquidar, thank you, it looks like the updated version is struggling with images in headers and footers. If the template contains an image in header or a footer the docx report cannot be generated and downloaded.
I'll go ahead and create an issue with the library. Thank you :) |
Hi @EmiliaChovancova I built a new dev image with new version of html2openxml 3.1.1 that @onizet released If you want to test it :) Best regards |
Hi @mesquidar, thank you for the update. I just tested the latest release and it is not crashing. Unfortunately, the images in the header and footer of the HTML are not being displayed in the DOCX report. |
Hi @jstangle thanks for the feedback. Can you comment the issue in onizet/html2openxml#159 so in this case @onizet can manage it Thank you :) |
Hi @jstangle @EmiliaChovancova to give some updates I added now the possibility to add your own CSS in the report components so this makes possible to create more customized reports if you want to test it's already available in the dev image (Keep in mind that some css will not be exported correctly to docx due how openxml styling works) Thank you :) |
Hi @mesquidar, I would suggest that you use PreMailer to inline the CSS on the html elements. More would be considered during the conversion. |
Hi @onizet yes I am using it to inline the CSS I saw it that you comment it in your documentation Thank you :) |
Hi @jstangle @EmiliaChovancova I upgraded the library to the last versions if you want to make some tests it's already a new image available Thank you @onizet :) Best regards |
Hi @mesquidar, thank you for the update, we will take a look at it:) Thank you:) |
Reports generated in docx format are not reflecting original formatting. These are the issues found in tables and images.
Tables
HTML downloaded report (working):
Docx format report - not working :(
Steps to reproduce
Images
Preview in Cervantes, downloaded HTML report or external HTML editors are working correctly:
But again, the docx report is not working :( image is on the left side of the page even though the parameters were set to the right side:
Steps to reproduce
The text was updated successfully, but these errors were encountered: