{
  "name": "scorpiox-pdfwatermark",
  "version": "1.0.1",
  "exports": [
    {
      "name": "pdfwatermark_init",
      "return": "int",
      "csharp_return": "int",
      "args": [],
      "note": "Initialises the library subsystem. Returns 1."
    },
    {
      "name": "pdfwatermark_cleanup",
      "return": "void",
      "csharp_return": "void",
      "args": [],
      "note": "Releases library resources and clears the error buffer."
    },
    {
      "name": "pdfwatermark_text",
      "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": "text",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str",
          "note": "Watermark text string (e.g. CONFIDENTIAL)."
        },
        {
          "name": "opacity",
          "type": "float",
          "csharp_type": "float",
          "note": "Transparency 0.0 to 1.0 (e.g. 0.3)."
        },
        {
          "name": "rotation",
          "type": "float",
          "csharp_type": "float",
          "note": "Rotation angle in degrees."
        },
        {
          "name": "font_size",
          "type": "int",
          "csharp_type": "int",
          "note": "Font size in points (e.g. 48)."
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int",
          "note": "Position: 0=center, 1=top-left, 2=top-right, 3=bottom-left, 4=bottom-right, 5=diagonal."
        },
        {
          "name": "r",
          "type": "int",
          "csharp_type": "int",
          "note": "Red color component (0-255)."
        },
        {
          "name": "g",
          "type": "int",
          "csharp_type": "int",
          "note": "Green color component (0-255)."
        },
        {
          "name": "b",
          "type": "int",
          "csharp_type": "int",
          "note": "Blue color component (0-255)."
        }
      ],
      "note": "Adds text watermark to all pages of the PDF. Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfwatermark_image",
      "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": "image_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str",
          "note": "Path to PNG image file."
        },
        {
          "name": "opacity",
          "type": "float",
          "csharp_type": "float",
          "note": "Transparency 0.0 to 1.0."
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int",
          "note": "Position: 0=center, 1=top-left, 2=top-right, 3=bottom-left, 4=bottom-right, 5=diagonal/center."
        },
        {
          "name": "scale",
          "type": "float",
          "csharp_type": "float",
          "note": "Scaling factor (e.g. 1.0 = native size in points, 0.5 = 50%)."
        }
      ],
      "note": "Adds PNG image watermark to all pages of the PDF. Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfwatermark_text_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": "text",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str",
          "note": "Watermark text string."
        },
        {
          "name": "opacity",
          "type": "float",
          "csharp_type": "float",
          "note": "Transparency 0.0 to 1.0."
        },
        {
          "name": "rotation",
          "type": "float",
          "csharp_type": "float",
          "note": "Rotation angle in degrees."
        },
        {
          "name": "font_size",
          "type": "int",
          "csharp_type": "int",
          "note": "Font size in points."
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int",
          "note": "Position: 0=center, 1=top-left, 2=top-right, 3=bottom-left, 4=bottom-right, 5=diagonal."
        },
        {
          "name": "r",
          "type": "int",
          "csharp_type": "int",
          "note": "Red color component (0-255)."
        },
        {
          "name": "g",
          "type": "int",
          "csharp_type": "int",
          "note": "Green color component (0-255)."
        },
        {
          "name": "b",
          "type": "int",
          "csharp_type": "int",
          "note": "Blue color component (0-255)."
        },
        {
          "name": "start_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based start page index."
        },
        {
          "name": "end_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based end page index (inclusive), or -1 for document end."
        }
      ],
      "note": "Adds text watermark to specific page range of the PDF. Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfwatermark_image_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": "image_path",
          "type": "const char*",
          "csharp_type": "string",
          "marshal": "UnmanagedType.LPUTF8Str",
          "note": "Path to PNG image file."
        },
        {
          "name": "opacity",
          "type": "float",
          "csharp_type": "float",
          "note": "Transparency 0.0 to 1.0."
        },
        {
          "name": "position",
          "type": "int",
          "csharp_type": "int",
          "note": "Position: 0=center, 1=top-left, 2=top-right, 3=bottom-left, 4=bottom-right, 5=diagonal/center."
        },
        {
          "name": "scale",
          "type": "float",
          "csharp_type": "float",
          "note": "Scaling factor."
        },
        {
          "name": "start_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based start page index."
        },
        {
          "name": "end_page",
          "type": "int",
          "csharp_type": "int",
          "note": "1-based end page index (inclusive), or -1 for document end."
        }
      ],
      "note": "Adds PNG image watermark to specific page range of the PDF. Returns 1 on success, 0 on failure."
    },
    {
      "name": "pdfwatermark_last_error",
      "return": "const char*",
      "csharp_return": "string",
      "csharp_custom_marshal": "IntPtr + Marshal.PtrToStringAnsi",
      "args": [],
      "note": "Returns static buffer describing the last error, or empty string on success."
    }
  ]
}
