News for hackers. Stuff that matters.
Re:Show HN: PDFs from HTML by buovjaga on Sunday April 04, 2021 @03:45PM (#26692274)
I tried out paged.js recently for a genealogical report exported from Gramps, but I had to use PrinceXML because counter-reset to start at a page does not work: https://gitlab.pagedmedia.org/tools/pagedjs/issues/91

Apart from this feature everything worked fine.

Re:Show HN: PDFs from HTML by abhinav22 on Sunday April 04, 2021 @03:53PM (#26692342)
Do you have a repo I could play around with? I had the same issue, but for my use case I figured a work around - primarily by using classes. I could spend a few minutes and see if I can get it working for you.

But yes, it’s a deficiency in the system currently

Re:Show HN: PDFs from HTML by julientaq on Monday April 05, 2021 @02:51AM (#26696045)
I would be happy to see it too.

Reset page number using counter is working: https://codepen.io/julientaq/details/MWammZV

The property needs to be set to the element, and not to the @page.

But we may have missed a bug though, so i’ll be happy to check your code.

Re:Show HN: PDFs from HTML by buovjaga on Thursday April 08, 2021 @01:50PM (#26741706)
Sorry, I forgot to check replies! This is the CSS:

  #grampstextdoc {
      counter-reset: page 7;
  }
  @page {
      margin: 2cm 3cm;
      @bottom-center {
          content: counter(page);
      }
  }