Hi Christophe,
Sorry I overlooked your question. I'm afraid I would have missed it entirely except for a reminder from another FS user.
We realized that we didn't need the full generality of a CSS/HTML implementation. The PDFs that we generate are all pretty unexciting (think tax forms -- tables/grids, borders, basic text formatting, occasional solid color backgrounds). I ended up writing a small library on top of PDFBox that provides just the layout functionality we need. The layout model is basically consistent with CSS, but greatly simplified (normal flow only, no floats or positioning, much simpler inline layout model, fixed layout tables only, etc.). Total line count is 4.6 kloc with another 2.6 kloc of tests. It's written in functionally pure Scala using ZIO (currently) for effect management. Input is a data structure constructed in Scala. Conceptually it's sort of a functional Scala version of iText where the programming API is a little like the VDOM construction APIs in something like Elm or PureScript.
It's been working great for us, but it's also very, very specific to our specific needs and our overall programming environment (which, in turn, is also something we're very happy with, but is undeniably a bit out of the ordinary).
My employers are quite open source friendly though so I've underestimated the interest in a library like this, I think this is something we could talk about internally. I have to admit I figured it was "weird" enough that there wouldn't be any interest.
Peter