{
  "name": "scorpiox-pdfsign",
  "version": "1.0.2",
  "exports": [
    {
      "name": "pdfsign_init",
      "return": "int",
      "csharp_return": "int",
      "args": [],
      "note": "Initializes the PDF signing subsystem. Returns 1 on success."
    },
    {
      "name": "pdfsign_cleanup",
      "return": "void",
      "csharp_return": "void",
      "args": [],
      "note": "Cleans up resources and resets internal state."
    },
    {
      "name": "pdfsign_sign",
      "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": "pfx_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "pfx_password",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "reason",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "location",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        }
      ],
      "note": "Signs PDF with a digital certificate from a PFX/P12 file (invisible signature). Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfsign_sign_visible",
      "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": "pfx_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "pfx_password",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "page",
          "type": "int",
          "csharp_type": "int"
        },
        {
          "name": "x",
          "type": "float",
          "csharp_type": "float"
        },
        {
          "name": "y",
          "type": "float",
          "csharp_type": "float"
        },
        {
          "name": "width",
          "type": "float",
          "csharp_type": "float"
        },
        {
          "name": "height",
          "type": "float",
          "csharp_type": "float"
        },
        {
          "name": "reason",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        },
        {
          "name": "location",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        }
      ],
      "note": "Signs PDF with a visible signature box at position (x,y) on 1-based page. Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfsign_verify",
      "return": "const char*",
      "csharp_return": "IntPtr",
      "args": [
        {
          "name": "input_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        }
      ],
      "note": "Verifies all signatures in PDF and returns JSON result string in static buffer."
    },
    {
      "name": "pdfsign_is_signed",
      "return": "int",
      "csharp_return": "int",
      "args": [
        {
          "name": "input_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str"
        }
      ],
      "note": "Checks if PDF has a digital signature. Returns 1 if signed, 0 if not, -1 on read error."
    },
    {
      "name": "pdfsign_last_error",
      "return": "const char*",
      "csharp_return": "IntPtr",
      "args": [],
      "note": "Returns the last error message in static buffer."
    }
  ]
}
