SignDoc SDK enables the creation of applications which handle SignDoc documents, that is, rendering as images, signing, and verifying PDF and TIFF documents.
SignDoc SDK is comprised of these components:
The main classes of the C++ API of SignDoc SDK are: SignDocDocumentLoader, SignDocDocument, SignDocPdfDocumentHandler, and SignDocTiffDocumentHandler.
SignDoc SDK contains these directories:
Important files include:
To be able to use SPSignDoc_4.3.dll, you have to install these Microsoft Visual C++ Redistributable Packages:
This chapter describes how to use license files. Note that you should use license keys instead of license files, see License Keys. Usage of license files is deprecated. For OS X and for Windows Store apps, only license keys are supported.
Under Windows, the license for SignDoc SDK is managed by SPLM2.dll, which must reside in a directory listed in the PATH environment variable. The license file, SignDocSDK.lic, must be put into a subdirectory named LMDATA of the directory containing SPLM2.dll. Write access to the license file must be granted.
Under Linux, the license for SignDoc SDK is managed by splm2.so, which must reside in /lib or /usr/lib. Create the text file /etc/softpro/splm2.cfg containing
SignDocSDK.lic = /var/softpro/SignDocSDK.lic
and put the correct pathname of the license file after the equal sign. Write access to the license file must be granted.
Under iOS, the license for SignDoc SDK must be in the application home directory.
Under Android, the license for SignDoc SDK must be in the files directory of the application. Your application should create that directory and copy the license file from its resources to that directory.
Under Windows, the license can be displayed by typing
splm2view SignDocSDK
on the command line.
If you have a license key (rather than a license file, see License Files), just pass it as array of bytes to the de::softpro::doc::SignDocDocumentLoader::setLicenseKey() function before calling any other SignDoc SDK function.
Usually, license keys consist of multiple lines, which is a bit inconvenient for string literals. You may replace newline characters in the license key with '|' (vertical bar, 0x7c) characters to put the entire license key into a single line. If there already are any '|' characters in a multi-line license key, replace them with "\!" (backslash bang, 0x5c 0x21) before replacing newlines with '|'.
SignDoc uses two distinct coordinate systems:
The origin of the document coordinate system is in the bottom left corner of the page (as rendered, that is, taking rotation of PDF pages into account). Points having positive X coordinates are to the right of the origin, points having positive Y coordinates are above the origin.
For PDF documents, the origin is in that corner of the intersection of the CropBox and the MediaBox of the page that corresponds to the bottom left corner of the image that would be rendered for that page. The units are specified by the PDF document and are usually 1/72 inch (see SignDocDocument::getConversionFactors()).
For TIFF documents, the origin is in the bottom left corner of the page, the unit is one pixel (see SignDocDocument::getResolution()).
The origin of the canvas coordinate system is in the upper left corner of the image. Points having positive X coordinates are to the right of the origin, points having positive Y coordinates are below the origin. The unit is one pixel.
Under Linux, temporary files are stored in the directory specified by the TMPDIR environment variable. If TMPDIR is not set, /tmp will be used.
Under iOS, the application's temporary directory will be used for temporary files.
Under Android, the application's cache directory will be used for temporary files.
Under Windows, SignDoc SDK verifies certificates against trusted root certificates in the Windows Certificate Store.
Under Linux and OS X, SignDoc SDK uses OpenSSL for verifying certificates. The OpenSSL root directory is /etc/softpro/ssl. Put trusted certificates into file /etc/softpro/ssl/cert.pem or create a hashed directory of certificates in /etc/softpro/ssl/certs. You can also make /etc/softpro/ssl a symbolic link to /etc/ssl to use the certificates trusted by the operating system.
Under iOS, SignDoc SDK uses OpenSSL for verifying certificates as the certificate verification function of iOS does not provide enough information. Unfortunately, the trusted certificates of iOS (anchor certificates) cannot be exported and thus cannot be used by OpenSSL. The OpenSSL root directory is ssl in the application bundle directory. Put trusted certificates into file ssl/cert.pem of your application bundle or create a hashed directory of certificates in ssl/certs.
Under Android, SignDoc SDK uses OpenSSL for verifying certificates. The OpenSSL root directory is files/ssl in the application directory. Put trusted certificates into file files/ssl/cert.pem or create a hashed directory of certificates in files/ssl/certs.
You can change the trusted certificates file and directory used by OpenSSL by setting environment variables SSL_CERT_FILE and SSL_CERT_DIR, respectively.