-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Request Feature] Native pdf export option #23
Comments
Hey, thanks for raising this feature request and for outlining some of the options. You bring up some great points. I’m hesitant to introduce a class that specifically depends on a particular library, as that would impose additional installation requirements on the end-user. Both Instead of implementing a solution based on a specific library, I’m considering an approach that involves pre-rendering the equations as images within the HTML report. This would allow for seamless HTML-to-PDF conversion using any of the tools you mentioned. By generating a pre-rendered HTML file, users get the flexibility to choose their preferred PDF converter for their workflow, without adding external dependencies to this library. Would that be an acceptable solution for you? |
That sounds great! I would advice to leave an option to not pre-render for people which uses cases may need a high quality document or just a clean html file. I'm closing this issue but feel free to add anything else or comments your progress. A little offtopic, but I manage to create a routine which uses playwright to render math expression in html files, maybe someone else may need it
It does the job but may take some time if you want to convert files in hundreds |
Hey, thanks for that. I'll definitely make the pre-rendering configurable so that reports can be generated either way. I'm going to leave this open so I have a reminder and action item to fix this. I'll close the issue when the PR merges with this change. Thanks |
While html is fine and could be printed manually to pdf format , a different story is doing recursively . There are some python package that can help with that but there are some major drawbacks:
pdfkit / weasyprint : Simple and effective way to export html files to pdf but does not support latex expression or MathML which are key components in the html file made by efficalc
playwright/ pyppeteer: It runs a headless browser from which one can write necessary steps to print the html file to pdf. At first glance it looks a complete solution but a little overkill download an entire browser just to export an html file to pdf. Also I have issues at running with a Jupyter notebook which is my main tool to write code because of nested async loops. In resume, a little more complex and present issues that I shouldn't focus to work on.
So, I suggest to implement a class to export the html files into pdf. Or maybe just a clarification in regards of pdf printing programmatically. Thanks in regards
The text was updated successfully, but these errors were encountered: