danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.92k stars 357 forks source link

HTML5 css unrecognized property "flex" #69

Open Jo3McCarthy opened 7 years ago

Jo3McCarthy commented 7 years ago

I get these:

com.openhtmltopdf.css-parse WARNING:: (file:///test.html#inline_style_1) Value flex is not a recognized identifier at line 2. Skipping declaration. com.openhtmltopdf.css-parse WARNING:: (file:///test.html#inline_style_1) flex is an unrecognized CSS property at line 6. Ignoring declaration.

The document does not render completely. Could somebody please help with HTML5 parsing?

Thanks

danfickle commented 7 years ago

Hi @Jo3McCarthy Flex box layout is not supported. The current goal of the project is to implement enough of html for template authors to create functional and well designed documents. It is not realistic to expect any arbitrary html page or CSS framework to render perfectly, unfortunately.

Daniel.

ablyeom commented 5 years ago

Any updates?

RAlfoeldi commented 3 years ago

It would be cool...supporting flex. Usecase: centered div with background color and variable content. Easy to do with flex. Not sure how to do this otherwise.

image

Having said that: Thanx for a great tool. We've evaluated / tested almost everything we could find and yours is the only one that can handle (almost) everything we throw at it.

yvermabp commented 3 weeks ago

@danfickle Thanks for the great library! We've explored it for various use cases but have run into an issue with unsupported CSS properties like 'flex'. Do you have any updates on whether support for this will be added in the future?