Overview
SignDoc SDK enables the creation of applications which handle SignDoc documents, that is, rendering as images, signing, and verifying PDF and TIFF documents.
Main Classes
The main classes of the C API of SignDoc SDK are: SIGNDOC_Capture, SIGNDOC_Document, SIGNDOC_DocumentLoader, SIGNDOC_PdfDocumentHandler, and SIGNDOC_TiffDocumentHandler.
Usage
-
Error handling
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static const char gLicenseKey[] = "INSERT LICENSE KEY HERE";
{
if (ex != NULL)
{
if (text != NULL)
{
printf ("Exception: %u (%s)\n", type, text);
}
else
printf ("Exception: %u\n", type);
exit (2);
}
}
int main ()
{
-
This is C, we must declare all variables before the first line of code.
int page_count;
int ok, rc;
-
Initialize license management
strlen (gLicenseKey),
NULL, NULL, NULL, 0);
check_ex (ex);
if (!ok)
{
printf ("Cannot initialize license\n");
return 1;
}
Note that we use strlen() rather than sizeof() to exclude the terminating NUL character.
-
Perform application logic (example)
check_ex (ex);
check_ex (ex);
check_ex (ex);
check_ex (ex);
{
check_ex (ex);
printf ("Error loading document: %s\n", error);
return 1;
}
check_ex (ex);
printf ("Page count: %d\n", page_count);
return 0;
}