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.93k stars 360 forks source link

Renderer supports counter-reset but not counter-set #983

Open radagasus opened 1 month ago

radagasus commented 1 month ago

You can test this in the sandbox :

<html>
<head>
<style>

li {
    list-style-type: none;
}

li::before {
    counter-increment: item;
    content: counters(item, ".") ". ";
}
</style>
</head>
<body dir="auto">

<ol style="counter-set: item 4">
<li>test</li>
<li>test</li>
<li>test</li>
<li>test</li>
</ol>

</body>
</html>

The styling does not work, but counter-reset: item 4 does.