Replace the internal CSS logic in openpdf-html with ph-css or htmlunit-css to improve reliability and support for modern web standards.
CSS Library:
https://github.com/phax/ph-css
Alternative CSS Library:
https://github.com/HtmlUnit/htmlunit-cssparser
Relevant files:
https://github.com/LibrePDF/OpenPDF/tree/master/openpdf-html/src/main/java/org/openpdf/css/parser
https://github.com/LibrePDF/OpenPDF/blob/master/openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java
Lexer.java is generated by JFlex from Lexer.flex.
Key Benefits:
Compliance: Full support for CSS3/4 selectors and inheritance.
Stability: Robust handling of malformed or complex stylesheets.
Efficiency: Reduces maintenance by leveraging a mature, dedicated CSS engine.
Consistency: Ensures PDF output matches modern browser rendering logic.
Replace the internal CSS logic in openpdf-html with ph-css or htmlunit-css to improve reliability and support for modern web standards.
CSS Library:
https://github.com/phax/ph-css
Alternative CSS Library:
https://github.com/HtmlUnit/htmlunit-cssparser
Relevant files:
https://github.com/LibrePDF/OpenPDF/tree/master/openpdf-html/src/main/java/org/openpdf/css/parser
https://github.com/LibrePDF/OpenPDF/blob/master/openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java
Lexer.java is generated by JFlex from Lexer.flex.
Key Benefits:
Compliance: Full support for CSS3/4 selectors and inheritance.
Stability: Robust handling of malformed or complex stylesheets.
Efficiency: Reduces maintenance by leveraging a mature, dedicated CSS engine.
Consistency: Ensures PDF output matches modern browser rendering logic.