I am trying to add a table of contents with page numbers to a PDF I am generating using Freemarker -> HTML -> PDF. The HTML/CSS are below
ul.toc a::after {
content: " Page " target-counter(attr(href url), page)
}
<ul class="toc">
<li><a href="#first-section">First Section</a></li>
<li><a href="#second-section">Second Section</a></li>
</ul>
However when I ran iText7 on this I got this error:
Content property "" Page " target-counter(attr(href url), page)" is either invalid or uses unsupported function."
which comes from CssContentPropertyResolver.java
.
Are there any intentions to eventually support this CSS property?
For any documents that require a numbered table of contents, we are forced to use iText5, which does support target-counter
. It would be very beneficial if you could reimplement this functionality in iText7