{
  "name": "scorpiox-pdfpagenumber",
  "version": "1.0.4",
  "exports": [
    {
      "name": "pdfpagenumber_init",
      "return": "int",
      "csharp_return": "int",
      "args": [],
      "note": "Returns 1."
    },
    {
      "name": "pdfpagenumber_cleanup",
      "return": "void",
      "csharp_return": "void",
      "args": [],
      "note": "Clears the error buffer."
    },
    {
      "name": "pdfpagenumber_add",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {
          "name": "input_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "output_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int",
          "note": "0=bottom-center 1=bottom-left 2=bottom-right 3=top-center 4=top-left 5=top-right"
        },
        {
          "name": "format",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str",
          "note": "template with {n} and {total}; NULL/empty means {n}"
        },
        {
          "name": "font_size",
          "type": "int",
          "csharp_type": "int",
          "note": "points; <=0 clamps to 12, >300 clamps to 300"
        },
        {
          "name": "start_number",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "r",
          "type": "int",
          "csharp_type": "int",
          "note": "0..255"
        },
        {
          "name": "g",
          "type": "int",
          "csharp_type": "int",
          "note": "0..255"
        },
        {
          "name": "b",
          "type": "int",
          "csharp_type": "int",
          "note": "0..255"
        }
      ],
      "note": "Adds page numbers to every page. 1 success / 0 failure."
    },
    {
      "name": "pdfpagenumber_range",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {
          "name": "input_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "output_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "format",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "font_size",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "start_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based"
        },
        {
          "name": "end_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based, inclusive"
        },
        {
          "name": "start_number",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "r",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "g",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "b",
          "type": "int",
          "csharp_type": "int"
        }
      ],
      "note": "Numbers only pages in [start_page..end_page]. 1 success / 0 failure."
    },
    {
      "name": "pdfpagenumber_skip",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {
          "name": "input_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "output_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "format",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "font_size",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "skip_pages",
          "type": "int",
          "csharp_type": "int",
          "note": "skip first N pages; numbering starts at 1"
        },
        {
          "name": "r",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "g",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "b",
          "type": "int",
          "csharp_type": "int"
        }
      ],
      "note": "Skips the first N pages (cover), numbers the rest from 1. 1 success / 0 failure."
    },
    {
      "name": "pdfpagenumber_last_error",
      "return": "const char*",
      "csharp_return": "string (IntPtr + PtrToStringAnsi — see console Interop)",
      "args": [],
      "note": "Static buffer; empty string when no error."
    }
  ]
}
