[Feature Request]: Web based HTML rendering for HTML to PDF conversion
Feature Description
Description : When using Stirling-PDF’s HTML-to-PDF converter, CSS is not applied correctly to the output PDF.
Expected behavior : The generated PDF should faithfully render styles defined in external stylesheets and inline
Actual behavior : Some or all CSS rules are ignored or inconsistently applied in the resulting PDF.
Why is this feature valuable?
Stirling-PDF currently relies on WeasyPrint for HTML-to-PDF conversion, but WeasyPrint does not reliably apply CSS in many cases. A browser-based rendering approach would provide more accurate output, as it can fully interpret modern CSS.
If this enhancement is not already in progress, I’d be interested in contributing to it. I’d also appreciate any guidance or suggestions from the maintainers or community.
Suggested Implementation
The first idea is to add three panes: one for HTML, one for CSS, and a third showing the rendered result. The user can edit HTML and CSS directly, and the preview will update. Then the browser’s built-in print function can be used to export the result as a PDF.
Another option is using Chromium for rendering, but I need to explore this further. Open to suggestions.
Additional Information
No response
No Duplicate of the Feature
- [x] I have verified that there are no existing features requests similar to my request.