Forum Bugs

Using a custom js function to format the footnote-call in css cuases footnote calls to disapear

When using a custom JavaScript function to format the footnote-call, the footnot calls are dispeared. It seems the no matter what that the custome function returns, it gets replaced with empty string.

I have attached a html page that can be used to duplicate the bug. Also there are two images attached, when is showing the bug and the another one showing the expected result.

I'm using Prince version 13.6 on MacOS Catalina 10.15.7. And I use this command to produce the pdf file:
prince  --javascript  demo.html -o output.pdf

Just for reference here is the code for html:

      .fn {
        float: footnote;

      *::footnote-call {
        content: prince-script(formatFootnoteCall, counter(footnote));
        font-size: 83%;
        vertical-align: super;

      One morning<span class="fn">First Footnote</span>,
      when Gregor Samsa<span class="fn">Second Footnote</span> 
      woke from troubled dreams, he found himself
      transformed in his bed into a horrible vermin.
      Prince.addScriptFunc('formatFootnoteCall', function (num) {
        return num //I'm just returning the pageNumber to display the bug

  1. bug.png38.2 kB
    The buggy behavior of the Prince
  2. demo.html0.7 kB
  3. expected.png44.4 kB
    The expected behavior of the Prince
This issue has been fixed in the latest build, thanks for letting us know. :D

Edited by mikeday