eCom Learning Solutions / Developer toolsOpen source
Documentation/Generation/Page numbering
04 / FINISH

Number an existing PDF

Use POST /api/v1/pdfs/page-numbers for an existing file, or attach the same pageNumbers object to a merge request. You provide the complete printed format.

JSON · page numbering
{
  "pdfBase64": "BASE64_OF_YOUR_PDF",
  "fileName": "numbered.pdf",
  "pageNumbers": {
    "format": "Page {page} of {total}",
    "fontSize": 8,
    "rightMargin": 50,
    "y": 50
  }
}

{page} is the one-based output page, and {total} is the total output count. Font size, right margin, and vertical position use PDF points (72 points = 1 inch). y is measured from the bottom. Default values are 8, 50, and 50. The position must be inside every page.