https://github.com/LibrePDF/OpenPDF/tree/master/openpdf-html
π‘ Ideas to Improve openpdf-html
-
Improve @media query handling
- β
Partial support exists β expand support for more media types (e.g.,
screen, all, min-width, max-width)
- π Benefit: Enables more responsive PDF rendering based on CSS print rules.
-
Add support for display: flex (basic Flexbox)
- β Currently unsupported
- π Benefit: Allows rendering of modern layouts commonly used in HTML/CSS today.
-
Enhance <table> rendering
- π Improve support for
thead, tfoot, colspan, rowspan, and automatic header repetition across pages.
- π Benefit: Enables more professional and structured reports.
-
Implement position: fixed for headers/footers
- β Not currently rendered as fixed
- π Benefit: Allows sticky headers or footers for printed documents, great for page numbers and branding.
-
Improve font fallback and international character support
- π Improve behavior when specified fonts are missing; better default to system or bundled fonts.
- π Benefit: Better support for multilingual PDFs and consistent rendering.
-
Add support for <svg> elements
- β Not supported
- π Benefit: Enables vector graphics, icons, and charts to be rendered natively.
-
Improve image rendering (e.g. <picture>, srcset)
- π Support HTML
<picture> tag and srcset attributes to choose optimal image resolution.
- π Benefit: Better image quality and optimization in PDF output.
-
Support @font-face for embedded custom fonts
- β Not yet supported
- π Benefit: Allows authors to use brand fonts directly from CSS in the final PDF.
-
Render CSS box-shadow and text-shadow
- β Shadows are currently ignored
- π Benefit: Improves fidelity of modern UI and design-heavy HTML.
-
Expose a debug/render tree output for PDF generation
- π§ͺ Provide a debug mode that outputs the parsed render tree or layout model.
- π Benefit: Makes debugging layout issues much easier for developers.
See: https://github.com/flyingsaucerproject/flyingsaucer/issues
https://github.com/LibrePDF/OpenPDF/tree/master/openpdf-html
π‘ Ideas to Improve
openpdf-htmlImprove HTML5 and CSS support!
Consider using Jsoup for HTML parsing. https://jsoup.org/
Improve @media query handling
screen,all,min-width,max-width)Add support for
display: flex(basic Flexbox)Enhance
<table>renderingthead,tfoot,colspan,rowspan, and automatic header repetition across pages.Implement
position: fixedfor headers/footersImprove font fallback and international character support
Add support for
<svg>elementsImprove image rendering (e.g.
<picture>,srcset)<picture>tag andsrcsetattributes to choose optimal image resolution.Support
@font-facefor embedded custom fontsRender CSS
box-shadowandtext-shadowExpose a debug/render tree output for PDF generation
See: https://github.com/flyingsaucerproject/flyingsaucer/issues