79468245

Date: 2025-02-26 00:54:31
Score: 1
Natty:
Report link
  // Add page numbers
  const totalPageCount = doc.internal.pages.length;
  for (let i = 1; i <= totalPageCount; i++) {
    doc.setPage(i);
    doc.setFontSize(5);
    const pageNumber = `${i}/${totalPageCount}`;
    doc.text(
      pageNumber,
      doc.internal.pageSize.getWidth() - 10,
      doc.internal.pageSize.getHeight() - 10,
    );
  }

will give you something like this at the page bottom: enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mathew Dony