Forum Feature requests

Add in-tool paragraph numbering


We use Prince to convert HTML documents to PDF. We request a feature in the software that would add paragraph numbering to the output PDF file created.
I understand HTML does not lend itself to line numbers due to its structure, but perhaps paragraph numbering would be an lower-lift option and would certainly help our document editing processes.

Thank you!
I think you could do this relatively easily using CSS counters and generated content, something like this:
body { counter-reset: para }

p::before {
  content: counter(para) ". ";
  counter-increment: para

Or you could use JavaScript if you need more flexibility.