SignDoc SDK (C)  5.0.0
SIGNDOC_Document Class Reference

An interface for SignDoc documents. More...

#include <SignDocSDK-c.h>

Public Member Functions

void SIGNDOC_Document_delete (struct SIGNDOC_Document *aObj)
 SIGNDOC_Document destructor. More...
 
int SIGNDOC_Document_getType (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the type of the document. More...
 
int SIGNDOC_Document_getPageCount (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the number of pages. More...
 
int SIGNDOC_Document_createSignatureParameters (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, const char *aProfile, struct SIGNDOC_SignatureParameters **aOutput)
 Create a SIGNDOC_SignatureParameters object for signing a signature field. More...
 
int SIGNDOC_Document_createSignatureParametersW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const wchar_t *aFieldName, const wchar_t *aProfile, struct SIGNDOC_SignatureParameters **aOutput)
 Create a SIGNDOC_SignatureParameters object for signing a signature field. More...
 
int SIGNDOC_Document_createSignatureParametersForTimeStamp (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_SignatureParameters **aOutput)
 Create a SIGNDOC_SignatureParameters object for adding a document time stamp. More...
 
int SIGNDOC_Document_getProfiles (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, struct SIGNDOC_StringArray *aOutput)
 Get a list of profiles for a signature field. More...
 
int SIGNDOC_Document_addSignature (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_SignatureParameters *aSignatureParameters, const struct SIGNDOC_VerificationParameters *aVerificationParameters)
 Sign the document. More...
 
int SIGNDOC_Document_getLastTimestamp (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, char **aTime)
 Get the timestamp used by the last successful call of SIGNDOC_Document_addSignature(). More...
 
int SIGNDOC_Document_getPathname (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, char **aPath)
 Get the current pathname of the document. More...
 
int SIGNDOC_Document_getAvailableMethods (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Get a bitset indicating which signing methods are available for this document. More...
 
int SIGNDOC_Document_getSignatureCount (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Get the number of signatures that can be retrieved with SIGNDOC_Document_getSignature(). More...
 
int SIGNDOC_Document_getSignature (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aIndex, struct SIGNDOC_Signature **aOutput)
 Get a signature of the document. More...
 
int SIGNDOC_Document_verifySignature (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, struct SIGNDOC_VerificationResult **aOutput)
 Verify a signature of the document. More...
 
int SIGNDOC_Document_verifySignatureW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const wchar_t *aFieldName, struct SIGNDOC_VerificationResult **aOutput)
 Verify a signature of the document. More...
 
int SIGNDOC_Document_verifySignature2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_Signature *aSignature, struct SIGNDOC_VerificationResult **aOutput)
 Verify a signature of the document. More...
 
int SIGNDOC_Document_clearSignature (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName)
 Remove a signature of the document. More...
 
int SIGNDOC_Document_clearAllSignatures (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Remove all signatures of the document. More...
 
int SIGNDOC_Document_clearApprovalSignatures (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Remove all approval signatures of the document. More...
 
int SIGNDOC_Document_updateDSS (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_VerificationParameters *aParameters, unsigned aFlags, int *aCount)
 Update the DSS for any eligible signatures in the document. More...
 
int SIGNDOC_Document_updateDSS2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, const struct SIGNDOC_VerificationParameters *aParameters, unsigned aFlags)
 Update the DSS for a signature in the document. More...
 
int SIGNDOC_Document_saveToStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_OutputStream *aStream, int aFlags)
 Save the document to a stream. More...
 
int SIGNDOC_Document_saveToMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_ByteArray *aBlob, int aFlags)
 Save the document to a blob. More...
 
int SIGNDOC_Document_saveToFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aPath, int aFlags)
 Save the document to a file. More...
 
int SIGNDOC_Document_saveToFileW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const wchar_t *aPath, int aFlags)
 Save the document to a file. More...
 
int SIGNDOC_Document_copyToStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_OutputStream *aStream, unsigned aFlags)
 Copy the document's current status or backing file or backing blob to a stream. More...
 
int SIGNDOC_Document_copyToMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_ByteArray *aBlob, unsigned aFlags)
 Copy the document's current status or backing file or backing blob to a blob. More...
 
int SIGNDOC_Document_copyAsSignedToStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, struct SIGNDOC_OutputStream *aStream)
 Copy the document to a stream for viewing the document "as signed". More...
 
int SIGNDOC_Document_copyAsSignedToMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aFieldName, struct SIGNDOC_ByteArray *aBlob)
 Copy the document to a blob for viewing the document "as signed". More...
 
int SIGNDOC_Document_getSaveToStreamFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int *aOutput)
 Get all flags currently valid for SIGNDOC_Document_saveToStream() and SIGNDOC_Document_saveToMemory(). More...
 
int SIGNDOC_Document_getSaveToFileFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int *aOutput)
 Get all flags currently valid for SIGNDOC_Document_saveToFile(). More...
 
int SIGNDOC_Document_getRequiredSaveToFileFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int *aOutput)
 Get all flags currently required for SIGNDOC_Document_saveToFile(). More...
 
int SIGNDOC_Document_getFields (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTypes, struct SIGNDOC_FieldArray *aOutput)
 Get all interactive fields of the specified types. More...
 
int SIGNDOC_Document_getFieldsOfPage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, int aTypes, struct SIGNDOC_FieldArray *aOutput)
 Get all interactive fields of the specified page, in tab order. More...
 
int SIGNDOC_Document_getField (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, struct SIGNDOC_Field *aOutput)
 Get an interactive field by name. More...
 
int SIGNDOC_Document_setField (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_Field *aField, unsigned aFlags)
 Change a field. More...
 
int SIGNDOC_Document_addField (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_Field *aField, unsigned aFlags)
 Add a field. More...
 
int SIGNDOC_Document_removeField (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName)
 Remove a field. More...
 
int SIGNDOC_Document_flattenField (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, int aWidget)
 Flatten a field. More...
 
int SIGNDOC_Document_flattenFields (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aFirstPage, int aLastPage, unsigned aFlags)
 Flatten all fields of the document or of a range of pages. More...
 
int SIGNDOC_Document_exportFields (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_OutputStream *aStream, int aFlags)
 Export all fields as XML to a stream. More...
 
int SIGNDOC_Document_exportFieldsToMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_ByteArray *aOutput, int aFlags)
 Export all fields as XML to a blob. More...
 
int SIGNDOC_Document_applyFdf (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aPath, unsigned aFlags)
 Apply an FDF document to a PDF document. More...
 
int SIGNDOC_Document_applyFdfW (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const wchar_t *aPath, unsigned aFlags)
 Apply an FDF document to a PDF document. More...
 
int SIGNDOC_Document_getTextFieldAttributes (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_TextFieldAttributes *aOutput)
 Get the document's default text field attributes. More...
 
int SIGNDOC_Document_setTextFieldAttributes (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_TextFieldAttributes *aData)
 Set the document's default text field attributes. More...
 
int SIGNDOC_Document_getProperties (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const char *aCollection, struct SIGNDOC_PropertyArray *aOutput)
 Get the names and types of all SignDoc properties of a certain collection of properties of the document. More...
 
int SIGNDOC_Document_getIntegerProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, int *aValue)
 Get the value of a SignDoc property (integer). More...
 
int SIGNDOC_Document_getStringProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, char **aValue)
 Get the value of a SignDoc property (string). More...
 
int SIGNDOC_Document_getBooleanProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, SIGNDOC_Boolean *aValue)
 Get the value of a SignDoc property (boolean). More...
 
int SIGNDOC_Document_setIntegerProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, int aValue)
 Set the value of a SignDoc property (integer). More...
 
int SIGNDOC_Document_setStringProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, const char *aValue)
 Set the value of a SignDoc property (string). More...
 
int SIGNDOC_Document_setBooleanProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName, SIGNDOC_Boolean aValue)
 Set the value of a SignDoc property (boolean). More...
 
int SIGNDOC_Document_removeProperty (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aCollection, const char *aName)
 Remove a SignDoc property. More...
 
int SIGNDOC_Document_exportProperties (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const char *aCollection, struct SIGNDOC_OutputStream *aStream, int aFlags)
 Export properties as XML to a blob. More...
 
int SIGNDOC_Document_exportPropertiesToMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const char *aCollection, struct SIGNDOC_ByteArray *aBlob, int aFlags)
 Export properties as XML to a stream. More...
 
int SIGNDOC_Document_importProperties (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const char *aCollection, struct SIGNDOC_InputStream *aStream, int aFlags)
 Import properties from XML (reading a stream). More...
 
int SIGNDOC_Document_importPropertiesFromMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const char *aCollection, const unsigned char *aPtr, size_t aSize, int aFlags)
 Import properties from XML (reading a blob). More...
 
int SIGNDOC_Document_getResolution (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, double *aResX, double *aResY)
 Get the resolution of a page. More...
 
int SIGNDOC_Document_getConversionFactors (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, double *aFactorX, double *aFactorY)
 Get the conversion factors for a page. More...
 
int SIGNDOC_Document_getPageSize (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, double *aWidth, double *aHeight)
 Get the size of a page. More...
 
int SIGNDOC_Document_getBitsPerPixel (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, int *aBPP)
 Get the number of bits per pixel (TIFF only). More...
 
int SIGNDOC_Document_computeZoom (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, double *aOutput, const struct SIGNDOC_RenderParameters *aParams)
 Compute the zoom factor used for rendering. More...
 
int SIGNDOC_Document_convCanvasPointToPagePoint (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_Point *aPoint, const struct SIGNDOC_RenderParameters *aParams)
 Convert a point expressed in canvas (image) coordinates to a point expressed in document coordinate system of the specified page. More...
 
int SIGNDOC_Document_convPagePointToCanvasPoint (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_Point *aPoint, const struct SIGNDOC_RenderParameters *aParams)
 Convert a point expressed in document coordinate system of the specified page to a point expressed in canvas (image) coordinates. More...
 
int SIGNDOC_Document_convImageRectToPageRect (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_ImageRect *aInput, struct SIGNDOC_Rect *aOutput, const struct SIGNDOC_RenderParameters *aParams)
 Convert a rectangle expressed in canvas (image) coordinates to a rectangle expressed in document coordinate system of the specified page. More...
 
int SIGNDOC_Document_convPageRectToImageRect (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_Rect *aInput, struct SIGNDOC_ImageRect *aOutput, const struct SIGNDOC_RenderParameters *aParams)
 Convert a rectangle expressed in document coordinate system of the specified page to a rectangle expressed in canvas (image) coordinates. More...
 
int SIGNDOC_Document_renderPageAsImage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_ByteArray *aImage, struct SIGNDOC_RenderOutput *aOutput, const struct SIGNDOC_RenderParameters *aRenderParameters, const struct SIGNDOC_VerificationParameters *aVerificationParameters, const struct SIGNDOC_Rect *aClipRect)
 Render the selected page (or pages) as image. More...
 
int SIGNDOC_Document_renderPageAsSignDocImage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_Image **aImage, struct SIGNDOC_RenderOutput *aOutput, const struct SIGNDOC_RenderParameters *aRenderParameters, const struct SIGNDOC_VerificationParameters *aVerificationParameters, const struct SIGNDOC_Rect *aClipRect)
 Render the selected page (or pages) as SIGNDOC_Image object. More...
 
int SIGNDOC_Document_getRenderedSize (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, struct SIGNDOC_RenderOutput *aOutput, const struct SIGNDOC_RenderParameters *aParams)
 Get the size of the rendered page in pixels (without actually rendering it). More...
 
struct SIGNDOC_AnnotationSIGNDOC_Document_createLineAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_Point *aStart, const struct SIGNDOC_Point *aEnd)
 Create a line annotation. More...
 
struct SIGNDOC_AnnotationSIGNDOC_Document_createLineAnnotationXY (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, double aStartX, double aStartY, double aEndX, double aEndY)
 Create a line annotation. More...
 
struct SIGNDOC_AnnotationSIGNDOC_Document_createScribbleAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Create a scribble annotation. More...
 
struct SIGNDOC_AnnotationSIGNDOC_Document_createFreeTextAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_Point *aLowerLeft, const struct SIGNDOC_Point *aUpperRight)
 Create a text annotation. More...
 
struct SIGNDOC_AnnotationSIGNDOC_Document_createFreeTextAnnotationXY (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, double aX0, double aY0, double aX1, double aY1)
 Create a text annotation. More...
 
int SIGNDOC_Document_addAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, const struct SIGNDOC_Annotation *aAnnot)
 Add an annotation to a page. More...
 
int SIGNDOC_Document_getAnnotations (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, int aPage, struct SIGNDOC_StringArray *aOutput)
 Get a list of all named annotations of a page. More...
 
int SIGNDOC_Document_getAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, int aPage, const char *aName, struct SIGNDOC_Annotation **aOutput)
 Get a named annotation of a page. More...
 
int SIGNDOC_Document_removeAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, int aPage, const char *aName)
 Remove an annotation identified by name. More...
 
int SIGNDOC_Document_flattenAnnotations (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aFirstPage, int aLastPage, unsigned aFlags)
 Flatten all annotations of the document or of a range of pages. More...
 
int SIGNDOC_Document_addText (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aText, int aPage, double aX, double aY, const char *aFontName, double aFontSize, const struct SIGNDOC_Color *aTextColor, double aOpacity, int aFlags)
 Add text to a page. More...
 
int SIGNDOC_Document_addText2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aText, int aPage, double aX, double aY, const char *aFontName, double aFontSize, const struct SIGNDOC_Color *aTextColor, double aOpacity, int aFlags, const char *aLang)
 Add text to a page (with language identifier). More...
 
int SIGNDOC_Document_addTextRect (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aText, int aPage, double aX0, double aY0, double aX1, double aY1, const char *aFontName, double aFontSize, double aLineSkip, const struct SIGNDOC_Color *aTextColor, double aOpacity, int aHAlignment, int aVAlignment, int aFlags)
 Add text in a rectangle of a page (with line breaking). More...
 
int SIGNDOC_Document_addTextRect2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aText, int aPage, double aX0, double aY0, double aX1, double aY1, const char *aFontName, double aFontSize, double aLineSkip, const struct SIGNDOC_Color *aTextColor, double aOpacity, int aHAlignment, int aVAlignment, int aFlags, const char *aLang)
 Add text in a rectangle of a page (with line breaking and language identifier). More...
 
int SIGNDOC_Document_addWatermark (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const struct SIGNDOC_Watermark *aInput)
 Add a watermark. More...
 
int SIGNDOC_Document_findText (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, int aFirstPage, int aLastPage, const char *aText, int aFlags, struct SIGNDOC_FindTextOccurrenceArray *aOutput)
 Find text. More...
 
int SIGNDOC_Document_createTextIterator (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aFirstPage, int aLastPage, int aFlags, struct SIGNDOC_TextIterator **aOutput)
 Create an iterator that visits all the text of a range of pages. More...
 
int SIGNDOC_Document_addAttachmentBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, const char *aDescription, const char *aType, const char *aModificationTime, const void *aPtr, size_t aSize, int aFlags)
 Add an attachment to the document. More...
 
int SIGNDOC_Document_addAttachmentFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding1, const char *aName, const char *aDescription, const char *aType, int aEncoding2, const char *aPath, int aFlags)
 Add an attachment (read from a file) to the document. More...
 
int SIGNDOC_Document_removeAttachment (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName)
 Remove an attachment from the document. More...
 
int SIGNDOC_Document_changeAttachmentDescription (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, const char *aDescription)
 Change the description of an attachment of the document. More...
 
int SIGNDOC_Document_getAttachments (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, struct SIGNDOC_StringArray *aOutput)
 Get a list of all attachments of the document. More...
 
int SIGNDOC_Document_getAttachment (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, struct SIGNDOC_Attachment *aOutput)
 Get information about an attachment. More...
 
int SIGNDOC_Document_checkAttachment (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, int *aOutput)
 Check the checksum of an attachment. More...
 
int SIGNDOC_Document_getAttachmentBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, struct SIGNDOC_ByteArray *aOutput)
 Get an attachment as blob. More...
 
int SIGNDOC_Document_getAttachmentStream (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aName, struct SIGNDOC_InputStream **aOutput)
 Get an InputStream for an attachment. More...
 
int SIGNDOC_Document_addPage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, double aWidth, double aHeight)
 Add an empty page to the document. More...
 
int SIGNDOC_Document_importPages (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, struct SIGNDOC_Document *aSource, int aSourcePage, int aPageCount, int aFlags)
 Import pages from another document. More...
 
int SIGNDOC_Document_importPageFromImageBlob (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, const unsigned char *aPtr, size_t aSize, double aZoom, double aWidth, double aHeight, int aFlags)
 Import a page from a blob containing an image. More...
 
int SIGNDOC_Document_importPageFromImageBlob2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, const unsigned char *aPtr, size_t aSize, double aZoom, double aWidth, double aHeight, int aFlags, int aEncoding, const char *aDescription, const char *aLang)
 Import a page from a blob containing an image (with alternate description). More...
 
int SIGNDOC_Document_importPageFromImageFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, int aEncoding, const char *aPath, double aZoom, double aWidth, double aHeight, int aFlags)
 Import a page from a file containing an image. More...
 
int SIGNDOC_Document_importPageFromImageFile2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, int aEncoding, const char *aPath, double aZoom, double aWidth, double aHeight, int aFlags, int aEncoding2, const char *aDescription, const char *aLang)
 Import a page from a file containing an image (with alternate description). More...
 
int SIGNDOC_Document_addImageFromMemory (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, const unsigned char *aPtr, size_t aSize, double aZoom, double aX, double aY, double aWidth, double aHeight, int aFlags)
 Add an image (from a blob) to a page. More...
 
int SIGNDOC_Document_addImageFromMemory2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, const unsigned char *aPtr, size_t aSize, double aZoom, double aX, double aY, double aWidth, double aHeight, int aFlags, int aEncoding, const char *aDescription, const char *aLang)
 Add an image (from a blob) to a page (with alternate description). More...
 
int SIGNDOC_Document_addImageFromFile (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, int aEncoding, const char *aPath, double aZoom, double aX, double aY, double aWidth, double aHeight, int aFlags)
 Add an image (from a file) to a page. More...
 
int SIGNDOC_Document_addImageFromFile2 (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aTargetPage, int aEncoding, const char *aPath, double aZoom, double aX, double aY, double aWidth, double aHeight, int aFlags, int aEncoding2, const char *aDescription, const char *aLang)
 Add an image (from a file) to a page (with alternate description). More...
 
int SIGNDOC_Document_removePages (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, const int *aPagesPtr, int aPagesCount, int aMode)
 Remove pages from the document. More...
 
int SIGNDOC_Document_setCompatibility (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aMajor, int aMinor)
 Request to not make changes to the document which are incompatible with an older version of this class. More...
 
int SIGNDOC_Document_isModified (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj, SIGNDOC_Boolean *aModified)
 Check if the document has unsaved changes. More...
 
int SIGNDOC_Document_isTaggedPDF (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj, SIGNDOC_Boolean *aTaggedPDF)
 Check if the document is a Tagged PDF document. More...
 
int SIGNDOC_Document_setFlags (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Set flags modifying the behavior of various functions. More...
 
unsigned SIGNDOC_Document_getFlags (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the flags set by SIGNDOC_Document_setFlags(). More...
 
int SIGNDOC_Document_setCompressionLevel (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aLevel)
 Set the FlateDecode compression level. More...
 
int SIGNDOC_Document_getDocMDP (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the DocMDP P value of the document's certification signature. More...
 
int SIGNDOC_Document_getLockMDP (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the lowest lock MDP value of the signed signature fields. More...
 
int SIGNDOC_Document_removeDocMDP (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj)
 Remove any certification signature. More...
 
int SIGNDOC_Document_removePermissions (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Remove signatures that grant permissions. More...
 
int SIGNDOC_Document_removePDFA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Remove PDF/A conformance. More...
 
int SIGNDOC_Document_removePDFUA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Remove PDF/UA conformance. More...
 
int SIGNDOC_Document_removeLogicalStructure (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Remove the logical structure. More...
 
int SIGNDOC_Document_removeXFA (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Remove XFA (XML Forms Architecture) content. More...
 
char * SIGNDOC_Document_getDocumentLanguage (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj, int aEncoding)
 Get the document's natural language. More...
 
int SIGNDOC_Document_setDocumentLanguage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aLang)
 Set the document's natural language. More...
 
int SIGNDOC_Document_setDefaultDocumentLanguage (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aEncoding, const char *aLang)
 Set the language identifier to be used if a language identifier is required but the document doesn't provide one. More...
 
int SIGNDOC_Document_setShootInFoot (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, unsigned aFlags)
 Disable safety checks. More...
 
unsigned SIGNDOC_Document_getShootInFoot (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get the flags set by SIGNDOC_Document_setShootInFoot(). More...
 
const char * SIGNDOC_Document_getErrorMessage (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj, int aEncoding)
 Get an error message for the last function call. More...
 
const wchar_t * SIGNDOC_Document_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_Document *aObj)
 Get an error message for the last function call. More...
 
struct SPPDF_Document * SIGNDOC_Document_getSPPDFDocument (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, SIGNDOC_Boolean aDestroy)
 Get the underlying SPPDF_Document object. More...
 
int SIGNDOC_Document_getPageLabel (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj, int aPage, char **aOutput)
 Get the page label for a page number. More...
 

Detailed Description

An interface for SignDoc documents.

An object of this class represents one document. Use SIGNDOC_DocumentLoader_loadFromMemory(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_createPDF(), or SIGNDOC_DocumentLoader_createPDFA() to create objects.

If the document is loaded from a file, the file may remain in use until this object is destroyed or the document is saved to a different file with SIGNDOC_Document_saveToFile(). Please do not change the file while there is a SIGNDOC_Document object for it.

Use SIGNDOC_Document_getErrorMessage() or SIGNDOC_Document_getErrorMessageW() to get more information after a function call failed.

Destructor:

Getting basic information about the document:

Saving the document:

Working with interactive fields:

Signing signature fields:

Verifying and removing signatures:

Working with properties:

Working with pages:

Working with annotations:

Adding text to a page and finding text on pages:

Adding images to a page:

Working with attachments:

Other functions:

Member Function Documentation

int SIGNDOC_Document_addAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
const struct SIGNDOC_Annotation aAnnot 
)

Add an annotation to a page.

See SIGNDOC_Annotation for details.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[in]aAnnotPointer to the new annotation. Ownership remains at the caller.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_createLineAnnotation(), SIGNDOC_Document_createScribbleAnnotation(), SIGNDOC_Document_createFreeTextAnnotation(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_addAttachmentBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
const char *  aDescription,
const char *  aType,
const char *  aModificationTime,
const void *  aPtr,
size_t  aSize,
int  aFlags 
)

Add an attachment to the document.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment. Will also be used as filename of the attachment and must not contain slashes, backslashes, and colons.
[in]aDescriptionThe description of the attachment (can be empty).
[in]aTypeThe MIME type of the attachment (can be empty except for PDF/A-3 documents).
[in]aModificationTimeThe time and date of the last modification of the file being attached to the document (can be empty). Must be in ISO 8601 extended calendar date format with optional timezone.
[in]aPtrPointer to the first octet of the attachment.
[in]aSizeThe size (in octets) of the attachment.
[in]aFlagsMust be zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAttachmentFile(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_removeAttachment()
int SIGNDOC_Document_addAttachmentFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding1,
const char *  aName,
const char *  aDescription,
const char *  aType,
int  aEncoding2,
const char *  aPath,
int  aFlags 
)

Add an attachment (read from a file) to the document.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncoding1The encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment. Will also be used as filename of the attachment and must not contain slashes, backslashes, and colons.
[in]aDescriptionThe description of the attachment (can be empty).
[in]aTypeThe MIME type of the attachment (can be empty except for PDF/A-3 documents).
[in]aEncoding2The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file to be attached. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aFlagsMust be zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAttachmentBlob(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_removeAttachment()
int SIGNDOC_Document_addField ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_Field aField,
unsigned  aFlags 
)

Add a field.

See the members of SIGNDOC_Field for details.

This function can add check boxes, radio button groups, text fields, and signature fields to PDF documents.

When adding a radio button group or a check box field, a value must be set, see SIGNDOC_Field_setValue() and SIGNDOC_Field_setValueIndex().

The SIGNDOC_FIELD_FLAGS_NOTOGGLETOOFF flag should be set for all radio button groups. Adobe products seem to ignore this flag being not set.

When adding a text field, the justification must be set with SIGNDOC_Field_setJustification().

Currently, you don't have control over the appearance of the field being inserted except for the text field attributes.

Adding a field to a PDF document that doesn't contain any fields will set the document's default text field attributes to font Helvetica, font size 0, text color black.

Only signature fields can be added to PDF documents having signed signature fields.

TIFF documents support signature fields only and all signature fields must be inserted before the first signature is added to the document (you may want to use invisible fields) unless all existing signature fields have flag SIGNDOC_FIELD_FLAGS_ENABLEADDAFTERSIGNING set.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aFieldThe new field. The font resource name of the default text field attributes may be modified. The value index and the value may be modified for radio button fields and check box fields.
[in]aFlagsSet of flags (SIGNDOC_DOCUMENT_SETFIELDFLAGS_KEEP_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_UPDATE_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FIT_HEIGHT_ONLY, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FORCE_BORDER_WIDTH, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DONT_BREAK_LINES, SIGNDOC_DOCUMENT_SETFIELDFLAGS_AUTO_ALIGNMENT, SIGNDOC_DOCUMENT_SETFIELDFLAGS_LTR, SIGNDOC_DOCUMENT_SETFIELDFLAGS_RTL, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_RTL) combined with `|' modifying the behavior of this function. Pass 0 for no flags.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getField(), SIGNDOC_Document_removeField(), SIGNDOC_Document_setField(), SIGNDOC_Document_setTextFieldAttributes(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME
int SIGNDOC_Document_addImageFromFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
int  aEncoding,
const char *  aPath,
double  aZoom,
double  aX,
double  aY,
double  aWidth,
double  aHeight,
int  aFlags 
)

Add an image (from a file) to a page.

This function behaves like SIGNDOC_Document_addImageFromFiel2() with an empty string for aDescription, that is, if the document uses Tagged PDF, a dummy alternate description for the image ("image" with language code "en") will provided to avoid breaking standard compliance. It is strongly recommended to use SIGNDOC_Document_addImageFromFiel2() with a meaningful description of the image.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aEncodingThe encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aXThe X coordinate of the point at which the lower left corner of the image shall be placed.
[in]aYThe Y coordinate of the point at which the lower left corner of the image shall be placed.
[in]aWidthImage width (document coordinates) or zero. The image will be scaled to this width. If this argument is non-zero, aZoom must be zero and either aHeight must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aHeightImage height (document coordinates) or zero. The image will be scaled to this height. If this argument is non-zero, aZoom must be zero and either aWidth must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_addImageFromMemory(), SIGNDOC_Document_addImageFromMemory2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_addImageFromFile2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
int  aEncoding,
const char *  aPath,
double  aZoom,
double  aX,
double  aY,
double  aWidth,
double  aHeight,
int  aFlags,
int  aEncoding2,
const char *  aDescription,
const char *  aLang 
)

Add an image (from a file) to a page (with alternate description).

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aEncodingThe encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aXThe X coordinate of the point at which the lower left corner of the image shall be placed.
[in]aYThe Y coordinate of the point at which the lower left corner of the image shall be placed.
[in]aWidthImage width (document coordinates) or zero. The image will be scaled to this width. If this argument is non-zero, aZoom must be zero and either aHeight must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aHeightImage height (document coordinates) or zero. The image will be scaled to this height. If this argument is non-zero, aZoom must be zero and either aWidth must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
[in]aEncoding2The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDescriptionAlternate description for the image. If this value is NULL or an empty string, aEncoding2 and aLang will be ignored. If this value is NULL or an empty string and the document uses Tagged PDF, "image" with language code "en" will be used to avoid breaking standard compliance. It is strongly recommended to use a meaningful description. Escape sequences must not be used.
[in]aLangLanguage identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_addImageFromMemory(), SIGNDOC_Document_addImageFromMemory2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_addImageFromMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
const unsigned char *  aPtr,
size_t  aSize,
double  aZoom,
double  aX,
double  aY,
double  aWidth,
double  aHeight,
int  aFlags 
)

Add an image (from a blob) to a page.

This function behaves like SIGNDOC_Document_addImageFromMemory2() with an empty string for aDescription, that is, if the document uses Tagged PDF, a dummy alternate description for the image ("image" with language code "en") will provided to avoid breaking standard compliance. It is strongly recommended to use SIGNDOC_Document_addImageFromMemory2() with a meaningful description of the image.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aPtrPointer to the first octet of the blob containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP.
[in]aSizeSize (in octets) of the blob pointed to by aPtr.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aXThe X coordinate of the point at which the lower left corner of the image shall be placed.
[in]aYThe Y coordinate of the point at which the lower left corner of the image shall be placed.
[in]aWidthImage width (document coordinates) or zero. The image will be scaled to this width. If this argument is non-zero, aZoom must be zero and either aHeight must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aHeightImage height (document coordinates) or zero. The image will be scaled to this height. If this argument is non-zero, aZoom must be zero and either aWidth must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile(), SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_addImageFromMemory2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_addImageFromMemory2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
const unsigned char *  aPtr,
size_t  aSize,
double  aZoom,
double  aX,
double  aY,
double  aWidth,
double  aHeight,
int  aFlags,
int  aEncoding,
const char *  aDescription,
const char *  aLang 
)

Add an image (from a blob) to a page (with alternate description).

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aPtrPointer to the first octet of the blob containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP.
[in]aSizeSize (in octets) of the blob pointed to by aPtr.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aXThe X coordinate of the point at which the lower left corner of the image shall be placed.
[in]aYThe Y coordinate of the point at which the lower left corner of the image shall be placed.
[in]aWidthImage width (document coordinates) or zero. The image will be scaled to this width. If this argument is non-zero, aZoom must be zero and either aHeight must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aHeightImage height (document coordinates) or zero. The image will be scaled to this height. If this argument is non-zero, aZoom must be zero and either aWidth must be non-zero or SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO must be set in aFlags.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
[in]aEncodingThe encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDescriptionAlternate description for the image. If this value is NULL or an empty string, aEncoding and aLang will be ignored. If this value is NULL or an empty string and the document uses Tagged PDF, "image" with language code "en" will be used to avoid breaking standard compliance. It is strongly recommended to use a meaningful description. Escape sequences must not be used.
[in]aLangLanguage identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile(), SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_addImageFromMemory(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_addPage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
double  aWidth,
double  aHeight 
)

Add an empty page to the document.

This function is currently implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page before which to insert the new page. The page will be appended if this value is 0.
[in]aWidthThe width of the page (in 1/72 inches for PDF documents).
[in]aHeightThe height of the page (in 1/72 inches for PDF documents).
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_addSignature ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_SignatureParameters aSignatureParameters,
const struct SIGNDOC_VerificationParameters aVerificationParameters 
)

Sign the document.

This function stores changed properties in the document before signing. If string parameter "OutputPath" is set, the signed document will be stored in a new file specified by that parameter and the original file won't be modified. If "OutputPath" is not set, the document will be written to the file from which it was loaded or to which it was most recently saved.

If the PDF document is backed by memory (most recently loaded from memory or saved to a stream) and "OutputPath" is empty, the signed document will not be saved. Use

SIGNDOC_Document_copyToStream (&ex, doc, stream, 0);

or

SIGNDOC_Document_copyToMemory (&ex, doc, blob, 0);

to save the signed document in that case.

If string parameter "OutputPath" is set to the special value "<memory>" for a PDF document, it will be saved to memory and signed in memory. You'll have to save the document as described in the preceding paragraph.

Some document types may allow adding signatures only if all signatures of the documents are valid.

For PDF documents, this function either signs or certifies the document, see integer parameter DocMDP.

If you are using RFC 3161 timestamps and get error SIGNDOC_RETURNCODE_UNEXPECTED_ERROR with a message like "Contents overflow: xxx vs. yyy", try using a bigger value for integer parameter "TimeStampSize".

This function performs a basic verification of the signature after signing a PDF document unless SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_DONT_VERIFY_AFTER_SIGNING is set. This ensures that the private key matches the certificate. If that verification fails, SIGNDOC_RETURNCODE_INVALID_SIGNATURE will be returned.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aSignatureParametersThe signing parameters. The parameters can be used only once, for a single signature.
[in]aVerificationParametersVerification parameters or NULL for default parameters. If revocation checking is enabled in aVerificationParameters, the revocation state of the certificates (subject to integer parameter "VerificationModel") in both the signing certificate's certificate chain and (if RFC 3161 time stamps are enabled) the RFC 3161 time stamp's certificate chain is checked. These verification parameters are not used for verifying the certificate chain of HTTPS connections to RFC 3161 time-stamp servers.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_Document_createSignatureParameters(), SIGNDOC_Document_createSignatureParametersForTimeStamp(), SIGNDOC_Document_createSignatureParametersW(), SIGNDOC_Document_getPathname(), SIGNDOC_Document_setStringProperty()
int SIGNDOC_Document_addText ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aText,
int  aPage,
double  aX,
double  aY,
const char *  aFontName,
double  aFontSize,
const struct SIGNDOC_Color aTextColor,
double  aOpacity,
int  aFlags 
)

Add text to a page.

This function behaves like SIGNDOC_Document_addText2() with an empty string for aLang.

Multiple lines are not supported, the text must not contain CR and LF characters.

Note
SIGNDOC_Document_addTextRect() is better than SIGNDOC_Document_addText() for RTL text.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aTextThe text. Complex scripts are supported, see Complex Scripts. Escape sequences must not be used.
[in]aPageThe 1-based page number of the page.
[in]aXThe X coordinate of the reference point of the visually left-most character in document coordinates.
[in]aYThe Y coordinate of the reference point of the visually left-most character in document coordinates.
[in]aFontNameThe font name. This can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
[in]aFontSizeThe font size (in user space units).
[in]aTextColorThe text color.
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addText2(), SIGNDOC_Document_addTextRect(), SIGNDOC_Document_addWatermark(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG, SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
int SIGNDOC_Document_addText2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aText,
int  aPage,
double  aX,
double  aY,
const char *  aFontName,
double  aFontSize,
const struct SIGNDOC_Color aTextColor,
double  aOpacity,
int  aFlags,
const char *  aLang 
)

Add text to a page (with language identifier).

Multiple lines are not supported, the text must not contain CR and LF characters.

This function uses document (page) coordinates, see Coordinate Systems.

Note
SIGNDOC_Document_addTextRect2() is better than SIGNDOC_Document_addText2() for RTL text.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aTextThe text. Complex scripts are supported, see Complex Scripts. Escape sequences must not be used.
[in]aPageThe 1-based page number of the page.
[in]aXThe X coordinate of the reference point of the visually left-most character in document coordinates.
[in]aYThe Y coordinate of the reference point of the visually left-most character in document coordinates.
[in]aFontNameThe font name. This can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
[in]aFontSizeThe font size (in user space units).
[in]aTextColorThe text color.
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0.
[in]aFlagsMust be 0.
[in]aLangLanguage identifier for aText, either an RFC 3066 language tag (example: "en-US") or an empty string or NULL. If a PDF/UA document does not specify a natural language, a language identifier is required. If a language identifier is required and aLang is an empty string or NULL, the behavior depends on flag SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG:
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addText(), SIGNDOC_Document_addTextRect2(), SIGNDOC_Document_addWatermark(), SIGNDOC_Document_setDefaultDocumentLanguage()), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG, SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
int SIGNDOC_Document_addTextRect ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aText,
int  aPage,
double  aX0,
double  aY0,
double  aX1,
double  aY1,
const char *  aFontName,
double  aFontSize,
double  aLineSkip,
const struct SIGNDOC_Color aTextColor,
double  aOpacity,
int  aHAlignment,
int  aVAlignment,
int  aFlags 
)

Add text in a rectangle of a page (with line breaking).

This function behaves like addTextRect2() with an empty string for aLang.

The interpretation of CR and LF in the text depends on the value of aFlags, see SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_COMPAT.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aTextThe text. The interpretation of CR and LF depends on the value of aFlags. Escape sequences must not be used.
[in]aPageThe 1-based page number of the page.
[in]aX0X coordinate of lower left corner.
[in]aY0Y coordinate of lower left corner.
[in]aX1X coordinate of upper right corner.
[in]aY1Y coordinate of upper right corner.
[in]aFontNameThe font name. This can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
[in]aFontSizeThe font size (in user space units).
[in]aLineSkipThe vertical distance between the baselines of successive lines (usually 1.2 * aFontSize).
[in]aTextColorThe text color.
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0.
[in]aHAlignmentHorizontal alignment of the text: SIGNDOC_DOCUMENT_HALIGNMENT_LEFT, SIGNDOC_DOCUMENT_HALIGNMENT_CENTER, SIGNDOC_DOCUMENT_HALIGNMENT_RIGHT, or SIGNDOC_DOCUMENT_HALIGNMENT_AUTO.
[in]aVAlignmentVertical alignment of the text: SIGNDOC_DOCUMENT_VALIGNMENT_TOP, SIGNDOC_DOCUMENT_VALIGNMENT_CENTER, or SIGNDOC_DOCUMENT_VALIGNMENT_BOTTOM.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_COMPAT, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_LTR, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_RTL, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_DEFAULT_RTL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addText2(), SIGNDOC_Document_addTextRect2(), SIGNDOC_Document_addWatermark(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG, SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
int SIGNDOC_Document_addTextRect2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aText,
int  aPage,
double  aX0,
double  aY0,
double  aX1,
double  aY1,
const char *  aFontName,
double  aFontSize,
double  aLineSkip,
const struct SIGNDOC_Color aTextColor,
double  aOpacity,
int  aHAlignment,
int  aVAlignment,
int  aFlags,
const char *  aLang 
)

Add text in a rectangle of a page (with line breaking and language identifier).

The interpretation of CR and LF in the text depends on the value of aFlags, see SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_COMPAT.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aTextThe text. The interpretation of CR and LF depends on the value of aFlags. Escape sequences must not be used.
[in]aPageThe 1-based page number of the page.
[in]aX0X coordinate of lower left corner.
[in]aY0Y coordinate of lower left corner.
[in]aX1X coordinate of upper right corner.
[in]aY1Y coordinate of upper right corner.
[in]aFontNameThe font name. This can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
[in]aFontSizeThe font size (in user space units).
[in]aLineSkipThe vertical distance between the baselines of successive lines (usually 1.2 * aFontSize).
[in]aTextColorThe text color.
[in]aOpacityThe opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0.
[in]aHAlignmentHorizontal alignment of the text: SIGNDOC_DOCUMENT_HALIGNMENT_LEFT, SIGNDOC_DOCUMENT_HALIGNMENT_CENTER, SIGNDOC_DOCUMENT_HALIGNMENT_RIGHT, or SIGNDOC_DOCUMENT_HALIGNMENT_AUTO.
[in]aVAlignmentVertical alignment of the text: SIGNDOC_DOCUMENT_VALIGNMENT_TOP, SIGNDOC_DOCUMENT_VALIGNMENT_CENTER, or SIGNDOC_DOCUMENT_VALIGNMENT_BOTTOM.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_COMPAT, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_LTR, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_RTL, SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_ADDTEXTRECTFLAGS_DEFAULT_RTL.
[in]aLangLanguage identifier for aText, either an RFC 3066 language tag (example: "en-US") or an empty string or NULL. If a PDF/UA document does not specify a natural language, a language identifier is required. If a language identifier is required and aLang is an empty string or NULL, the behavior depends on flag SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG:
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addText2(), SIGNDOC_Document_addTextRect(), SIGNDOC_Document_addWatermark(), SIGNDOC_Document_setDefaultDocumentLanguage()), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG, SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
int SIGNDOC_Document_addWatermark ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_Watermark aInput 
)

Add a watermark.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aInputAn object describing the watermark.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addText(), SIGNDOC_Document_addTextRect(), SIGNDOC_Document_addTextRect2(), SIGNDOC_DocumentLoader_loadFontConfigBlob(), SIGNDOC_DocumentLoader_loadFontConfigEnvironment(), SIGNDOC_DocumentLoader_loadFontConfigFile(), SIGNDOC_DocumentLoader_loadFontConfigStream()
int SIGNDOC_Document_applyFdf ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aPath,
unsigned  aFlags 
)

Apply an FDF document to a PDF document.

FDF documents can be applied to PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the FDF document. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aFlagsFlags modifying the behavior of this function, SIGNDOC_DOCUMENT_SETFIELDFLAGS_KEEP_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_UPDATE_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FIT_HEIGHT_ONLY, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FORCE_BORDER_WIDTH, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DONT_BREAK_LINES, SIGNDOC_DOCUMENT_SETFIELDFLAGS_AUTO_ALIGNMENT, SIGNDOC_DOCUMENT_SETFIELDFLAGS_LTR, SIGNDOC_DOCUMENT_SETFIELDFLAGS_RTL, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_RTL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_applyFdfW()
int SIGNDOC_Document_applyFdfW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const wchar_t *  aPath,
unsigned  aFlags 
)

Apply an FDF document to a PDF document.

FDF documents can be applied to PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPathThe pathname of the FDF document.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_SETFIELDFLAGS_KEEP_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_UPDATE_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FIT_HEIGHT_ONLY, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FORCE_BORDER_WIDTH, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DONT_BREAK_LINES, SIGNDOC_DOCUMENT_SETFIELDFLAGS_AUTO_ALIGNMENT, SIGNDOC_DOCUMENT_SETFIELDFLAGS_LTR, SIGNDOC_DOCUMENT_SETFIELDFLAGS_RTL, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_RTL.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_applyFdf()
int SIGNDOC_Document_changeAttachmentDescription ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
const char *  aDescription 
)

Change the description of an attachment of the document.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
[in]aDescriptionThe new description of the attachment.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAttachmentBlob(), SIGNDOC_Document_addAttachmentFile(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_removeAttachment()
int SIGNDOC_Document_checkAttachment ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
int *  aOutput 
)

Check the checksum of an attachment.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
[out]aOutputThe result of the check will be stored here: SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_MATCH, SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_NO_CHECKSUM, o0r SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_MISMATCH.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getAttachment(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_getAttachmentBlob(), SIGNDOC_Document_getAttachmentStream()
int SIGNDOC_Document_clearAllSignatures ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Remove all signatures of the document.

This includes any certification signature, see SIGNDOC_Document_removeDocMDP().

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_clearSignature(), SIGNDOC_Document_removeDocMDP()
int SIGNDOC_Document_clearApprovalSignatures ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Remove all approval signatures of the document.

Note
In TIFF documents, all signatures are approval signatures.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_clearAllSignatures(), SIGNDOC_Document_clearSignature(), SIGNDOC_Document_removeDocMDP()
int SIGNDOC_Document_clearSignature ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName 
)

Remove a signature of the document.

For some document formats (TIFF), signatures may only be cleared in the reverse order of signing (LIFO).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_clearAllSignatures(), SIGNDOC_Document_clearApprovalSignatures(), SIGNDOC_Document_getFields(), SIGNDOC_Field_isCurrentlyClearable(), SIGNDOC_Document_removeDocMDP()
int SIGNDOC_Document_computeZoom ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
double *  aOutput,
const struct SIGNDOC_RenderParameters aParams 
)

Compute the zoom factor used for rendering.

If integer parameter "Height" or "Width" of aParams has been set, the actual factor depends on the document's page size. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the maximum width and maximum height of all selected pages will be used.

See also "Scale" of SIGNDOC_RenderParameters_setNumber().

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputThe zoom factor will be stored here.
[in]aParamsThe parameters such as the page number and the zoom factor.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getRenderedSize(), SIGNDOC_Document_renderPageAsImage(), SIGNDOC_Document_renderPageAsSignDocImage(), SIGNDOC_RenderParameters_setInteger(), SIGNDOC_RenderParameters_setNumber()
int SIGNDOC_Document_convCanvasPointToPagePoint ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_Point aPoint,
const struct SIGNDOC_RenderParameters aParams 
)

Convert a point expressed in canvas (image) coordinates to a point expressed in document coordinate system of the specified page.

The origin is in the bottom left corner of the page. The origin is in the upper left corner of the image. See Coordinate Systems. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the first page of the range will be used.

Suppose the specified page of a PDF document is not rotated and has height PH and the rendered image has height IH. Then, point (0,0) will be converted to (0,PH) and point (0,IH-1) will be converted to (0,0).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aPointThe point to be converted.
[in]aParamsThe parameters such as the page number and the zoom factor.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_convImageRectToPageRect ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_ImageRect aInput,
struct SIGNDOC_Rect aOutput,
const struct SIGNDOC_RenderParameters aParams 
)

Convert a rectangle expressed in canvas (image) coordinates to a rectangle expressed in document coordinate system of the specified page.

The origin is in the bottom left corner of the page. The origin is in the upper left corner of the image. See Coordinate Systems. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the first page of the range will be used.

Suppose the specified page of a PDF document is not rotated and has height PH and the rendered image has height IH. Then, point (0,0) will be converted to (0,PH) and point (0,IH-1) will be converted to (0,0).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aInputThe rectangle to be converted.
[out]aOutputThe converted rectangle will be stored here.
[in]aParamsThe parameters such as the page number and the zoom factor.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_convCanvasPointToPagePoint(), SIGNDOC_Document_convPageRectToImageRect(), SIGNDOC_Rect_normalize()
int SIGNDOC_Document_convPagePointToCanvasPoint ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_Point aPoint,
const struct SIGNDOC_RenderParameters aParams 
)

Convert a point expressed in document coordinate system of the specified page to a point expressed in canvas (image) coordinates.

The origin is in the bottom left corner of the page. The origin is in the upper left corner of the image. See Coordinate Systems. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the first page of the range will be used.

Suppose the specified page page of a PDF document is not rotated and has height PH and the rendered image has height IH. Then, point (0,0) will be converted to (0,IH-1) and point (0,PH) will be converted to (0,0).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aPointThe point to be converted.
[in]aParamsThe parameters such as the page number and the zoom factor.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_convPageRectToImageRect ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_Rect aInput,
struct SIGNDOC_ImageRect aOutput,
const struct SIGNDOC_RenderParameters aParams 
)

Convert a rectangle expressed in document coordinate system of the specified page to a rectangle expressed in canvas (image) coordinates.

The origin is in the bottom left corner of the page. The origin is in the upper left corner of the image. See Coordinate Systems. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the first page of the range will be used.

Suppose the specified page page of a PDF document is not rotated and has height PH and the rendered image has height IH. Then, point (0,0) will be converted to (0,IH-1) and point (0,PH) will be converted to (0,0).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aInputThe rectangle to be converted.
[out]aOutputThe converted rectangle will be stored here.
[in]aParamsThe parameters such as the page number and the zoom factor.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_convImageRectToPageRect(), SIGNDOC_Document_convPagePointToCanvasPoint(), SIGNDOC_ImageRect_normalize()
int SIGNDOC_Document_copyAsSignedToMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
struct SIGNDOC_ByteArray aBlob 
)

Copy the document to a blob for viewing the document "as signed".

This function copies to a blob the document as it was when the specified signature field was signed. If the specified signature field contains the last signature applied to the document, this function is equivalent to SIGNDOC_Document_copyToMemory(). However, for some document formats, this function may require signatures to be valid.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
[in,out]aBlobThe document will be copied to this blob.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyAsSignedToStream(), SIGNDOC_Document_copyToMemory(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_copyAsSignedToStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
struct SIGNDOC_OutputStream aStream 
)

Copy the document to a stream for viewing the document "as signed".

This function copies to a stream the document as it was when the specified signature field was signed. If the specified signature field contains the last signature applied to the document, this function is equivalent to SIGNDOC_Document_copyToStream(). However, for some document formats, this function may require signatures to be valid.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
[in]aStreamThe document will be copied to this stream.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyAsSignedToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_copyToMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_ByteArray aBlob,
unsigned  aFlags 
)

Copy the document's current status or backing file or backing blob to a blob.

If SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is not set in aFlags, this function will copy to a blob the file or blob from which the document was loaded or to which the document was most recently saved. Changes made to the in-memory copy of the document since it was loaded or saved will not be reflected in the copy written to the blob.

If SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is set in aFlags, unsaved changes made to the in-memory copy of the document will be included (as incremental update for PDF documents) in the blob.

This function does not have side effects on the in-memory copy of the document, that is, unsaved changes remain unsaved (except for being saved to the blob if SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is set in aFlags).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aBlobThe document will be copied to this blob.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyAsSignedToStream(), SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_saveToFile(), SIGNDOC_Document_saveToMemory(), SIGNDOC_Document_saveToStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_copyToStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_OutputStream aStream,
unsigned  aFlags 
)

Copy the document's current status or backing file or backing blob to a stream.

If SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is not set in aFlags, this function will copy to a stream the file or blob from which the document was loaded or to which the document was most recently saved. Changes made to the in-memory copy of the document since it was loaded or saved will not be reflected in the copy written to the stream.

If SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is set in aFlags, unsaved changes made to the in-memory copy of the document will be included (as incremental update for PDF documents) in the stream.

This function does not have side effects on the in-memory copy of the document, that is, unsaved changes remain unsaved (except for being saved to the stream if SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED is set in aFlags).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aStreamThe document will be copied to this stream.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyAsSignedToStream(), SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_saveToFile(), SIGNDOC_Document_saveToMemory(), SIGNDOC_Document_saveToStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
struct SIGNDOC_Annotation * SIGNDOC_Document_createFreeTextAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_Point aLowerLeft,
const struct SIGNDOC_Point aUpperRight 
)

Create a text annotation.

See SIGNDOC_Annotation for details. This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aLowerLeftcoordinates of lower left corner.
[in]aUpperRightcoordinates of upper right corner.
Returns
The new annotation object. The caller is responsible for destroying the object after use.
See also
SIGNDOC_Document_addAnnotation()
struct SIGNDOC_Annotation * SIGNDOC_Document_createFreeTextAnnotationXY ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
double  aX0,
double  aY0,
double  aX1,
double  aY1 
)

Create a text annotation.

See SIGNDOC_Annotation for details. This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aX0X coordinate of lower left corner.
[in]aY0Y coordinate of lower left corner.
[in]aX1X coordinate of upper right corner.
[in]aY1Y coordinate of upper right corner.
Returns
The new annotation object. The caller is responsible for destroying the object after use.
See also
SIGNDOC_Document_addAnnotation()
struct SIGNDOC_Annotation * SIGNDOC_Document_createLineAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_Point aStart,
const struct SIGNDOC_Point aEnd 
)

Create a line annotation.

See SIGNDOC_Annotation for details.

This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aStartStart point.
[in]aEndEnd point.
Returns
The new annotation object. The caller is responsible for destroying the object after use.
See also
SIGNDOC_Document_addAnnotation()
struct SIGNDOC_Annotation * SIGNDOC_Document_createLineAnnotationXY ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
double  aStartX,
double  aStartY,
double  aEndX,
double  aEndY 
)

Create a line annotation.

See SIGNDOC_Annotation for details. This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aStartXX coordinate of start point.
[in]aStartYY coordinate of start point.
[in]aEndXX coordinate of end point.
[in]aEndYY coordinate of end point.
Returns
The new annotation object. The caller is responsible for destroying the object after use.
See also
SIGNDOC_Document_addAnnotation()
struct SIGNDOC_Annotation * SIGNDOC_Document_createScribbleAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Create a scribble annotation.

See SIGNDOC_Annotation for details. This function uses document (page) coordinates, see Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
The new annotation object. The caller is responsible for destroying the object after use.
See also
SIGNDOC_Document_addAnnotation(), SIGNDOC_Annotation_addPoint(), SIGNDOC_Annotation_newStroke()
int SIGNDOC_Document_createSignatureParameters ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
const char *  aProfile,
struct SIGNDOC_SignatureParameters **  aOutput 
)

Create a SIGNDOC_SignatureParameters object for signing a signature field.

The caller is responsible for destroying the object.

Each SIGNDOC_SignatureParameters object should be used for at most one signature.

The following profiles are available and documented:

ProfileDocument TypesDescription
"" PDF, TIFF Image above Signer and SignTime
"image" PDF, TIFF Image only

For TIFF documents, "" produces the same output as "image".

Profile "" is defined by this template:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SignatureTemplate SYSTEM "SignatureTemplate.dtd">
<SignatureTemplate
    text-halignment="center"
    text-valignment="bottom"
    image-halignment="center"
    image-valignment="top"
    image-transparency="brightest"
    text-position="below"
    font-size="0.1 h"
    text-hmargin="0.1 h"
    image-margin="1">
  <Line item="Signer"/>
  <Line item="SignTime"/>
</SignatureTemplate>

Profile "image" is defined by this template:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SignatureTemplate SYSTEM "SignatureTemplate.dtd">
<SignatureTemplate
    text-halignment="center"
    text-valignment="center"
    image-halignment="center"
    image-valignment="center"
    image-transparency="brightest"
    text-position="overlay"
    font-size="0.1 h"
    text-hmargin="0.1 h"
    image-margin="1">
</SignatureTemplate>
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field, encoded according to aEncoding.
[in]aProfileThe profile name (ASCII). Some document types and signature fields support different sets of default parameters. The default profile, "", is supported for all signature fields.
[out]aOutputA pointer to the new parameters object will be stored here. The caller is responsible for destroying the object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addSignature(), SIGNDOC_Document_createSignatureParametersForTimeStamp(), SIGNDOC_Document_createSignatureParametersW(), SIGNDOC_Document_getProfiles()
int SIGNDOC_Document_createSignatureParametersForTimeStamp ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_SignatureParameters **  aOutput 
)

Create a SIGNDOC_SignatureParameters object for adding a document time stamp.

The caller is responsible for destroying the object.

Each SIGNDOC_SignatureParameters object should be used for at most one signature.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputA pointer to the new parameters object will be stored here. The caller is responsible for destroying the object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addSignature(), SIGNDOC_Document_createSignatureParameters()
int SIGNDOC_Document_createSignatureParametersW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const wchar_t *  aFieldName,
const wchar_t *  aProfile,
struct SIGNDOC_SignatureParameters **  aOutput 
)

Create a SIGNDOC_SignatureParameters object for signing a signature field.

The caller is responsible for destroying the object.

Each SIGNDOC_SignatureParameters object should be used for at most one signature.

See SIGNDOC_Document_createSignatureParameters() for a description of the supported and documented profiles.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFieldNameThe name of the signature field, encoded according to aEncoding.
[in]aProfileThe profile name (ASCII). Some document types and signature fields support different sets of default parameters. The default profile, "", is supported for all signature fields.
[out]aOutputA pointer to the new parameters object will be stored here. The caller is responsible for destroying the object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addSignature(), SIGNDOC_Document_createSignatureParameters(), SIGNDOC_Document_createSignatureParametersForTimeStamp(), SIGNDOC_Document_getProfiles()
int SIGNDOC_Document_createTextIterator ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aFirstPage,
int  aLastPage,
int  aFlags,
struct SIGNDOC_TextIterator **  aOutput 
)

Create an iterator that visits all the text of a range of pages.

Text will be returned in the sequence encountered when reading the content streams of the document sequentially.

The caller is responsible for destroying the text iterator object.

This function is implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFirstPage1-based number of first page to be visited.
[in]aLastPage1-based number of last page to be visited or 0 for all pages to the end of the document.
[in]aFlagsFlags modifying the behavior of this function, must be 0.
[out]aOutputA pointer to the new text iterator object will be stored here. The caller is responsible for destroying the object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_findText(), SIGNDOC_TextIterator_delete()
void SIGNDOC_Document_delete ( struct SIGNDOC_Document aObj)

SIGNDOC_Document destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_Document object.
See also
SIGNDOC_Document_getSPPDFDocument()
int SIGNDOC_Document_exportFields ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_OutputStream aStream,
int  aFlags 
)

Export all fields as XML to a stream.

This function always uses UTF-8 encoding. The output conforms to schema PdfFields.xsd.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aStreamThe fields will be saved to this stream.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportFieldsToMemory(), SIGNDOC_Document_getFields(), SIGNDOC_Document_setField()
int SIGNDOC_Document_exportFieldsToMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_ByteArray aOutput,
int  aFlags 
)

Export all fields as XML to a blob.

This function always uses UTF-8 encoding. The output conforms to schema PdfFields.xsd.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aOutputThe XML document will be stored here.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportFields(), SIGNDOC_Document_getFields(), SIGNDOC_Document_setField()
int SIGNDOC_Document_exportProperties ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const char *  aCollection,
struct SIGNDOC_OutputStream aStream,
int  aFlags 
)

Export properties as XML to a blob.

This function always uses UTF-8 encoding. The output conforms to schema AllSignDocProperties.xsd (if aCollection is empty) or SignDocProperties.xsd (if aCollection is non-empty).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties(). If the string is empty, all properties of the "public" and "encrypted" collections will be exported.
[in]aStreamThe properties will be saved to this stream.
[in]aFlagsFlags modifying the behavior of this function, See SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportPropertiesToMemory(), SIGNDOC_Document_importProperties(), SIGNDOC_Document_importPropertiesFromMemory()
int SIGNDOC_Document_exportPropertiesToMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const char *  aCollection,
struct SIGNDOC_ByteArray aBlob,
int  aFlags 
)

Export properties as XML to a stream.

This function always uses UTF-8 encoding. The output conforms to schema AllSignDocProperties.xsd (if aCollection is empty) or SignDocProperties.xsd (if aCollection is non-empty).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties(). If the string is empty, all properties of the "public" and "encrypted" collections will be exported.
[in,out]aBlobThe XML document will be stored here.
[in]aFlagsFlags modifying the behavior of this function, See SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportProperties(), SIGNDOC_Document_importProperties(), SIGNDOC_Document_importPropertiesFromMemory()
int SIGNDOC_Document_findText ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
int  aFirstPage,
int  aLastPage,
const char *  aText,
int  aFlags,
struct SIGNDOC_FindTextOccurrenceArray aOutput 
)

Find text.

The text of the document will be scanned in the sequence encountered when reading the content streams of the document sequentially.

This function is implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aText (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFirstPage1-based number of first page to be searched.
[in]aLastPage1-based number of last page to be searched or 0 to search to the end of the document.
[in]aTextText to be searched for. Multiple successive spaces are treated as single space (and may be ignored subject to aFlags).
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_FINDTEXTFLAGS_IGNORE_HSPACE, SIGNDOC_DOCUMENT_FINDTEXTFLAGS_IGNORE_HYPHENATION, and SIGNDOC_DOCUMENT_FINDTEXTFLAGS_IGNORE_SEQUENCE.
[in,out]aOutputInformation about the found text.
Returns
SIGNDOC_RETURNCODE_OK on success (even if the text was not found).
See also
SIGNDOC_Document_createTextIterator()
int SIGNDOC_Document_flattenAnnotations ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aFirstPage,
int  aLastPage,
unsigned  aFlags 
)

Flatten all annotations of the document or of a range of pages.

Flattening an annotation of a PDF document makes its appearance part of the page and removes the selected annotation or all annotations. This function selects all non-widget annotations on the specified pages, ie, it does not flatten fields.

Flattening annotations breaks existing signatures. If you are flattening annotations only for printing with PDF components that don't support annotations, make a copy of the document, pass

to SIGNDOC_Document_setShootInFoot(), flatten the annotations, print the document, and throw it away.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFirstPage1-based number of first page.
[in]aLastPage1-based number of last page or 0 to process all pages to the end of the document.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_FLATTENANNOTATIONSFLAGS_INCLUDE_HIDDEN and SIGNDOC_DOCUMENT_FLATTENANNOTATIONSFLAGS_KEEP_STRUCTURE.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_flattenFields(), SIGNDOC_Document_removeAnnotation()
int SIGNDOC_Document_flattenField ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
int  aWidget 
)

Flatten a field.

Flattening a field of a PDF document makes its appearance part of the page and removes the selected widget or all widgets; the field will be removed when all its widgets have been flattened.

Flattening unsigned signature fields does not work correctly.

Flattening fields breaks existing signatures. If you are flattening fields only for printing with PDF components that don't support annotations, make a copy of the document, pass

to SIGNDOC_Document_setShootInFoot(), flatten the fields, print the document, and throw it away.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe fully-qualified name of the field.
[in]aWidgetThe widget index to flatten only one widget or -1 to flatten all widgets.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_flattenFields(), SIGNDOC_Document_removeField()
int SIGNDOC_Document_flattenFields ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aFirstPage,
int  aLastPage,
unsigned  aFlags 
)

Flatten all fields of the document or of a range of pages.

Flattening a field of a PDF document makes its appearance part of the page and removes the selected widget or all widgets; the field will be removed when all its widgets have been flattened. This function selects all widgets on the specified pages.

Flattening unsigned signature fields does not work correctly.

Flattening fields breaks existing signatures. If you are flattening fields only for printing with PDF components that don't support annotations, make a copy of the document, pass

to SIGNDOC_Document_setShootInFoot(), flatten the fields, print the document, and throw it away.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFirstPage1-based number of first page.
[in]aLastPage1-based number of last page or 0 to process all pages to the end of the document.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_FLATTENFIELDSFLAGS_INCLUDE_SIGNATURE_UNSIGNED, SIGNDOC_DOCUMENT_FLATTENFIELDSFLAGS_INCLUDE_SIGNATURE_SIGNED, SIGNDOC_DOCUMENT_FLATTENFIELDSFLAGS_INCLUDE_HIDDEN, and SIGNDOC_DOCUMENT_FLATTENFIELDSFLAGS_KEEP_STRUCTURE. If this value is 0, signature fields and hidden/invisible widgets will not be flattened.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_flattenAnnotations(), SIGNDOC_Document_flattenField(), SIGNDOC_Document_removeField()
int SIGNDOC_Document_getAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
int  aPage,
const char *  aName,
struct SIGNDOC_Annotation **  aOutput 
)

Get a named annotation of a page.

All setters will fail for the returned object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPageThe page number (1 for the first page).
[in]aNameThe name of the annotation.
[out]aOutputA pointer to a new SIGNDOC_Annotation object or NULL will be stored here. The caller is responsible for destroying that object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getAnnotations()
int SIGNDOC_Document_getAnnotations ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
int  aPage,
struct SIGNDOC_StringArray aOutput 
)

Get a list of all named annotations of a page.

Unnamed annotations are ignored by this function.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding to be used for the names of the annotations returned in aOutput (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPageThe page number (1 for the first page).
[in,out]aOutputThe names of the annotations will be stored here. The order is currently unspecified, a future implementation may return the annotations in tab order.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAnnotation(), SIGNDOC_Document_getAnnotation(), SIGNDOC_Document_removeAnnotation(), SIGNDOC_Annotation_setName()
int SIGNDOC_Document_getAttachment ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
struct SIGNDOC_Attachment aOutput 
)

Get information about an attachment.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
[out]aOutputInformation about the attachment will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_checkAttachment(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_getAttachmentBlob(), SIGNDOC_Document_getAttachmentStream()
int SIGNDOC_Document_getAttachmentBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
struct SIGNDOC_ByteArray aOutput 
)

Get an attachment as blob.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
[in,out]aOutputThe attachment will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_checkAttachment(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_getAttachmentStream()
int SIGNDOC_Document_getAttachments ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
struct SIGNDOC_StringArray aOutput 
)

Get a list of all attachments of the document.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding to be used for the names returned in aOutput (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in,out]aOutputThe names of the document's attachments will be stored here. Use SIGNDOC_Document_getAttachment() to get information for a single attachment.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_checkAttachment(), SIGNDOC_Document_getAttachment(), SIGNDOC_Document_getAttachmentBlob(), SIGNDOC_Document_getAttachmentStream()
int SIGNDOC_Document_getAttachmentStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
struct SIGNDOC_InputStream **  aOutput 
)

Get an InputStream for an attachment.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
[out]aOutputA pointer to a new SIGNDOC_InputStream object will be stored here; the caller is responsible for deleting that object after use. The SIGNDOC_InputStream object does not support SIGNDOC_InputStream_seek(), SIGNDOC_InputStream_tell(), and SIGNDOC_InputStream_avail().
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_checkAttachment(), SIGNDOC_Document_getAttachments(), SIGNDOC_Document_getAttachmentBlob()
int SIGNDOC_Document_getAvailableMethods ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Get a bitset indicating which signing methods are available for this document.

This document's signature fields offer a subset of the signing methods returned by this function.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
1<<SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS1 etc.
See also
SIGNDOC_SignatureParameters_getAvailableMethods()
int SIGNDOC_Document_getBitsPerPixel ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
int *  aBPP 
)

Get the number of bits per pixel (TIFF only).

Different pages of the document may have different numbers of bits per pixel.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[out]aBPPThe number of bits per pixel of the page (1, 8, 24, or 32) or 0 (for PDF documents) will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful, SIGNDOC_RETURNCODE_INVALID_ARGUMENT if aPage is out of range.
int SIGNDOC_Document_getBooleanProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
SIGNDOC_Boolean aValue 
)

Get the value of a SignDoc property (boolean).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[out]aValueThe value will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getIntegerProperty(), SIGNDOC_Document_getProperties(), SIGNDOC_Document_getStringProperty()
int SIGNDOC_Document_getConversionFactors ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
double *  aFactorX,
double *  aFactorY 
)

Get the conversion factors for a page.

Different pages of the document may have different conversion factors. For TIFF documents, this function yields the same values as SIGNDOC_Document_getResolution(). For PDF documents, this function now always stores 72 to the objects pointed to by aFactorX and aFactorY as UserUnit is taken into account automatically. See Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[out]aFactorXDivide horizontal coordinates by this number to convert document coordinates to inches. The value will be 0.0 if the conversion factor is not available.
[out]aFactorYDivide vertical coordinates by this number to convert document coordinates to inches. The value will be 0.0 if the conversion factor is not available.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getPageSize(), SIGNDOC_Document_getResolution()
int SIGNDOC_Document_getDocMDP ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get the DocMDP P value of the document's certification signature.

The DocMDP p value of the certification signature specifies what modifications to the document are allowed.

This function does not verify the certification signature.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
-1 if there is no certification signature, 1 if no modifications are allowed, 2 if only filling in forms, instantiating page templates, and signing are permitted, 3 if only filling in forms, instantiating page templates, signing, creating annotations, deleting annotations, and modifying annotations are permitted. For TIFF documents, this function always returns -1.

SIGNDOC_Document_getLockMDP()

char * SIGNDOC_Document_getDocumentLanguage ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj,
int  aEncoding 
)

Get the document's natural language.

That language applies to all text unless overridden locally.

This function throws an exception of type SIGNDOC_EXCEPTION_TYPE_SPOOC_ENCODING_ERROR if the default language cannot be represented using the specified encoding (which can happen for invalid documents only).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
The natural language of the document as RFC 3066 language tag. Example: "en-US". If the document does not specify a default language, an empty string will be returned. The string must be freed with SIGNDOC_free().
See also
SIGNDOC_Document_setDocumentLanguage(), SIGNDOC_free(), SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG
const char * SIGNDOC_Document_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj,
int  aEncoding 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_Document_getErrorMessageW()
const wchar_t * SIGNDOC_Document_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_Document_getErrorMessage()
int SIGNDOC_Document_getField ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName,
struct SIGNDOC_Field aOutput 
)

Get an interactive field by name.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe fully-qualified name of the field.
[out]aOutputThe field will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getFields(), SIGNDOC_Document_setField()
int SIGNDOC_Document_getFields ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTypes,
struct SIGNDOC_FieldArray aOutput 
)

Get all interactive fields of the specified types.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTypes0 to get fields of all types. Otherwise, a bitset selecting the field types to be included. To include a field of type t, add 1<<t, where t is SIGNDOC_FIELD_TYPE_PUSHBUTTON, SIGNDOC_FIELD_TYPE_CHECK_BOX, SIGNDOC_FIELD_TYPE_RADIO_BUTTON, SIGNDOC_FIELD_TYPE_TEXT, SIGNDOC_FIELD_TYPE_LIST_BOX, SIGNDOC_FIELD_TYPE_SIGNATURE_DIGSIG, SIGNDOC_FIELD_TYPE_SIGNATURE_SIGNDOC, or SIGNDOC_FIELD_TYPE_COMBO_BOX.
[in,out]aOutputThe fields will be stored here. They appear in the order in which they have been defined.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportFields(), SIGNDOC_Document_exportFieldsToMemory(), SIGNDOC_Document_getField(), SIGNDOC_Document_getFieldsOfPage()
int SIGNDOC_Document_getFieldsOfPage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
int  aTypes,
struct SIGNDOC_FieldArray aOutput 
)

Get all interactive fields of the specified page, in tab order.

If the document does not specify a tab order, the fields will be returned in widget order.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY.

Note
Structure order (S) is not yet supported. If the page specifies structure order, the fields will be returned in widget order.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe 1-based page number.
[in]aTypes0 to get fields of all types. Otherwise, a bitset selecting the field types to be included. To include a field of type t, add 1<<t, where t is SIGNDOC_FIELD_TYPE_PUSHBUTTON, SIGNDOC_FIELD_TYPE_CHECK_BOX, SIGNDOC_FIELD_TYPE_RADIO_BUTTON, SIGNDOC_FIELD_TYPE_TEXT, SIGNDOC_FIELD_TYPE_LIST_BOX, SIGNDOC_FIELD_TYPE_SIGNATURE_DIGSIG, SIGNDOC_FIELD_TYPE_SIGNATURE_SIGNDOC, or SIGNDOC_FIELD_TYPE_COMBO_BOX.
[in,out]aOutputThe fields will be stored here in tab order. There will be one element per widget (rather than per field); use SIGNDOC_Field_getWidget() to find out which widget of the field is referenced.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportFields(), SIGNDOC_Document_exportFieldsToMemory(), SIGNDOC_Document_getField(), SIGNDOC_Document_getFields()
int SIGNDOC_Document_getIntegerProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
int *  aValue 
)

Get the value of a SignDoc property (integer).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[out]aValueThe value will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getBooleanProperty(), SIGNDOC_Document_getProperties(), SIGNDOC_Document_getStringProperty()
int SIGNDOC_Document_getLastTimestamp ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
char **  aTime 
)

Get the timestamp used by the last successful call of SIGNDOC_Document_addSignature().

This function may return a timestamp even if the last call of SIGNDOC_Document_addSignature() was not successful. See also string parameters "Timestamp" and "TimeStampServerURL" of SIGNDOC_SignatureParameters.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aTimeThe timestamp in ISO 8601 format (yyyy-mm-ddThh:mm:ss without milliseconds, with optional timezone (or an empty string if there is no timestamp available) will be stored here. The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addSignature(), SIGNDOC_Document_getSignatureString(), SIGNDOC_SignatureParameters_setString()
int SIGNDOC_Document_getLockMDP ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get the lowest lock MDP value of the signed signature fields.

The lock MDP value specifies what modifications to the document are allowed.

This function does not verify any signature.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
-1 if there is no signature field with lock MDP value, 1 if no modifications are allowed, 2 if only filling in forms, instantiating page templates, and signing are permitted, 3 if only filling in forms, instantiating page templates, signing, creating annotations, deleting annotations, and modifying annotations are permitted. For TIFF documents, this function always returns -1.
See also
SIGNDOC_Document_getDocMDP()
int SIGNDOC_Document_getPageCount ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get the number of pages.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
The number of pages.
See also
SIGNDOC_Document_getPageLabel()
int SIGNDOC_Document_getPageLabel ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
char **  aOutput 
)

Get the page label for a page number.

For TIFF documents, aPage will be converted to a decimal number.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[out]aOutputA pointer to a string containing the page label will be stored here. The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_free(), SIGNDOC_Document_getPageCount()
int SIGNDOC_Document_getPageSize ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
double *  aWidth,
double *  aHeight 
)

Get the size of a page.

Different pages of the document may have different sizes. Use

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[out]aWidthThe width of the page (in document coordinates) will be stored here.
[out]aHeightThe height of the page (in document coordinates) will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getConversionFactors()
int SIGNDOC_Document_getPathname ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
char **  aPath 
)

Get the current pathname of the document.

The pathname will be empty if the document is stored in memory (ie, if it has been loaded from memory or saved to a stream).

If a FDF document has been opened, this function will return the pathname of the referenced PDF file.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding to be used for aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[out]aPathThe pathname will be stored here. The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_getProfiles ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
struct SIGNDOC_StringArray aOutput 
)

Get a list of profiles for a signature field.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
[in,out]aOutputThe names (ASCII) of all profiles supported by the signature field will be stored here, excluding the default profile "" which is always available.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_createSignatureParameters(), SIGNDOC_Document_createSignatureParametersW()
int SIGNDOC_Document_getProperties ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const char *  aCollection,
struct SIGNDOC_PropertyArray aOutput 
)

Get the names and types of all SignDoc properties of a certain collection of properties of the document.

Use SIGNDOC_Document_getBooleanProperty(), SIGNDOC_Document_getIntegerProperty(), or SIGNDOC_Document_getStringProperty() to get the values of the properties.

There are three collections of SignDoc document properties:

  • "encrypted" Encrypted properties. Names and values are symmetrically encrypted.
  • "public" Public properties. Document viewer applications may be able to display or let the user modify these properties.
  • "pdfa" PDF/A properties (PDF documents only):
    • part (PDF/A version identifier: 1, 2, or 3)
    • amd (optional PDF/A amendment identifier)
    • conformance (PDF/A conformance level: A, B, or U)
    All properties in this collection have string values, the property names are case-sensitive. If the "part" property is present, the document claims to be conforming to PDF/A. Your application may change its behavior when dealing with PDF/A documents. For instance, it might want to avoid transparency.
  • "pdfua" PDF/UA properties (PDF documents only):
    • part (PDF/UA version identifier: 1)
    • amd (optional PDF/UA amendment identifier)
    • corr (optional PDF/UA corrigenda identifier)
    All properties in this collection have string values, the property names are case-sensitive. If the "part" property is present, the document claims to be conforming to PDF/UA. Your application may change its behavior when dealing with PDF/UA documents.

Using the same property name in the "encrypted" and "public" collections is not possible. Attempts to get, set, or remove a property in the wrong collection will fail with error code SIGNDOC_RETURNCODE_WRONG_COLLECTION. To move a property from one collection to another collection, first remove it from the source collection, then add it to the target collection.

The "pdfa" and "pdfua" collections are read-only and a property name existing in those collections does not prevent that property name from appearing in one of the other collections.

The syntax of property names depends on the document type and the collection containing the property.

"public" properties of PDF documents are stored according to XMP in namespace "http://www.softpro.de/pdfa/signdoc/public/", therefore property names must be valid unqualified XML names, see the syntax of "Name" in the XML 1.1 specification at http://www.w3.org/TR/2004/REC-xml11-20040204/#sec-common-syn (section 2.3 Common Syntactic Constructs).

For "encrypted" properties and any properties in TIFF documents, property names can contain arbitrary Unicode characters except for NUL.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aCollectionThe name of the collection, see above.
[in,out]aOutputThe properties will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_removeProperty(), SIGNDOC_Document_getStringProperty()
int SIGNDOC_Document_getRenderedSize ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_RenderOutput aOutput,
const struct SIGNDOC_RenderParameters aParams 
)

Get the size of the rendered page in pixels (without actually rendering it).

The returned values may be approximations for some document formats. If multiple pages are selected (integer parameters "FirstPage" and "LastPage" of aParams), the maximum width and maximum height of all selected pages will be used.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputThe width and height of the image that would be computed by SIGNDOC_Document_renderPageAsImage() and SIGNDOC_Document_renderPageAsSignDocImage() with aClipRect being NULL will be stored here.
[in]aParamsParameters such as the page number.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_renderPageAsImage(), SIGNDOC_Document_renderPageAsSignDocImage()
int SIGNDOC_Document_getRequiredSaveToFileFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int *  aOutput 
)

Get all flags currently required for SIGNDOC_Document_saveToFile().

This function currently stores #SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL (saving the document non-incrementally would destroy existing signatures) or 0 (the document may be saved non-incrementally) to aOutput.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputThe flags will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSaveToFileFlags(), SIGNDOC_Document_getSaveToStreamFlags(), SIGNDOC_Document_saveToFile()
int SIGNDOC_Document_getResolution ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aPage,
double *  aResX,
double *  aResY 
)

Get the resolution of a page.

Different pages of the document may have different resolutions. Use SIGNDOC_Document_getConversionFactors() to get factors for converting document coordinates to real world coordinates. See Coordinate Systems.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPageThe page number (1 for the first page).
[out]aResXThe horizontal resolution in DPI will be stored here. The value will be 0.0 if the resolution is not available.
[out]aResYThe vertical resolution in DPI will be stored here. The value will be 0.0 if the resolution is not available.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getConversionFactors()
int SIGNDOC_Document_getSaveToFileFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int *  aOutput 
)

Get all flags currently valid for SIGNDOC_Document_saveToFile().

Note that SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL cannot be used together with SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED even if all these flags are returned by this function. SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS is returned only if the document claims PDF/A-1 conformance.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputThe flags will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getRequiredSaveToFileFlags(), SIGNDOC_Document_getSaveToStreamFlags(), SIGNDOC_Document_saveToFile()
int SIGNDOC_Document_getSaveToStreamFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int *  aOutput 
)

Get all flags currently valid for SIGNDOC_Document_saveToStream() and SIGNDOC_Document_saveToMemory().

Note that SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL cannot be used together with SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED even if all these flags are returned by this function. SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS is returned only if the document claims PDF/A-1 conformance.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aOutputThe flags will be stored here.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSaveToFileFlags(), SIGNDOC_Document_saveToMemory(), SIGNDOC_Document_saveToStream()
unsigned SIGNDOC_Document_getShootInFoot ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get the flags set by SIGNDOC_Document_setShootInFoot().

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
The flags currently in force.
See also
SIGNDOC_Document_setShootInFoot()
int SIGNDOC_Document_getSignature ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aIndex,
struct SIGNDOC_Signature **  aOutput 
)

Get a signature of the document.

By passing values for aIndex from 0 up to SIGNDOC_Document_getSignatureCount()-1, the history of changes to the document can be obtained.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aIndexThe index of the signature, 0 for the first signature applied to the document, SIGNDOC_Document_getSignatureCount()-1 for the newest signature.
[out]aOutputA pointer to a new SIGNDOC_Signature object or NULL will be stored here. The caller is responsible for destroying that object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSignatureCount(), SIGNDOC_Document_verifySignature(), SIGNDOC_Document_verifySignature2()
int SIGNDOC_Document_getSignatureCount ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Get the number of signatures that can be retrieved with SIGNDOC_Document_getSignature().

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
The number of signatures, possibly including removed signatures.
See also
SIGNDOC_Document_getSignature()
struct SPPDF_Document * SIGNDOC_Document_getSPPDFDocument ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
SIGNDOC_Boolean  aDestroy 
)

Get the underlying SPPDF_Document object.

Note
Please be careful to not interfere with SignDoc SDK operation.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aDestroySIGNDOC_FALSE to let the SIGNDOC_Document object pointed to by aObj live, SIGNDOC_TRUE to destroy the SIGNDOC_Document pointed to by aObj.
Returns
A pointer to the underlying SPPDF_Document object or NULL if the document is not a PDF document. If aDestroy is SIGNDOC_FALSE, do not destroy the SPPDF_Document object; the SPPDF_Document object is valid until the SIGNDOC_Document object pointed to by aObj is destroyed. If aDestroy is SIGNDOC_TRUE and the return value is not NULL, you must no longer use the SIGNDOC_Document object pointed to by aObj and you must destroy the SPPDF_Document object after use.
See also
SIGNDOC_Document_delete()
int SIGNDOC_Document_getStringProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
char **  aValue 
)

Get the value of a SignDoc property (string).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName and for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[out]aValueThe value will be stored here, encoded according to aEncoding. The string must be freed with SIGNDOC_free().
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getBooleanPropery(), SIGNDOC_Document_getIntegerProperty(), SIGNDOC_Document_getProperties()
int SIGNDOC_Document_getTextFieldAttributes ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_TextFieldAttributes aOutput 
)

Get the document's default text field attributes.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aOutputThis object will be updated.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getField(), SIGNDOC_Document_setTextFieldAttributes(), SIGNDOC_Field_getTextFieldAttributes()
int SIGNDOC_Document_getType ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj 
)

Get the type of the document.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
The document type: SIGNDOC_DOCUMENT_DOCUMENTTYPE_PDF or SIGNDOC_DOCUMENT_DOCUMENTTYPE_TIFF.
int SIGNDOC_Document_importPageFromImageBlob ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
const unsigned char *  aPtr,
size_t  aSize,
double  aZoom,
double  aWidth,
double  aHeight,
int  aFlags 
)

Import a page from a blob containing an image.

This function behaves like SIGNDOC_Document_importPageFromImageBlob2() with an empty string for aDescription, that is, if the document uses Tagged PDF, a dummy alternate description for the image ("image" with language code "en") will provided to avoid breaking standard compliance. It is strongly recommended to use SIGNDOC_Document_importPageFromImageBlob2() with a meaningful description of the image.

This function is currently implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aPtrPointer to the first octet of the blob containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP.
[in]aSizeSize (in octets) of the blob pointed to by aPtr.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aWidthPage width (document coordinates) or zero. If this argument is non-zero, aHeight must also be non-zero and aZoom must be zero. The image will be scaled to this width.
[in]aHeightPage height (document coordinates) or zero. If this argument is non-zero, aWidth must also be non-zero and aZoom must be zero. The image will be scaled to this height.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromMemory(), SIGNDOC_Document_addImageFromMemory2(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_importPageFromImageFile(), SIGNDOC_Document_importPageFromImageFile2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_importPageFromImageBlob2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
const unsigned char *  aPtr,
size_t  aSize,
double  aZoom,
double  aWidth,
double  aHeight,
int  aFlags,
int  aEncoding,
const char *  aDescription,
const char *  aLang 
)

Import a page from a blob containing an image (with alternate description).

This function is currently implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aPtrPointer to the first octet of the blob containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP.
[in]aSizeSize (in octets) of the blob pointed to by aPtr.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aWidthPage width (document coordinates) or zero. If this argument is non-zero, aHeight must also be non-zero and aZoom must be zero. The image will be scaled to this width.
[in]aHeightPage height (document coordinates) or zero. If this argument is non-zero, aWidth must also be non-zero and aZoom must be zero. The image will be scaled to this height.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
[in]aEncodingThe encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDescriptionAlternate description for the image. If this value is NULL or an empty string, aEncoding and aLang will be ignored. If this value is NULL or an empty string and the document uses Tagged PDF, "image" with language code "en" will be used to avoid breaking standard compliance. It is strongly recommended to use a meaningful description. Escape sequences must not be used.
[in]aLangLanguage identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromMemory(), SIGNDOC_Document_addImageFromMemory2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageFile(), SIGNDOC_Document_importPageFromImageFile2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_importPageFromImageFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
int  aEncoding,
const char *  aPath,
double  aZoom,
double  aWidth,
double  aHeight,
int  aFlags 
)

Import a page from a file containing an image.

This function behaves like SIGNDOC_Document_importPageFromImageFile2() with an empty string for aDescription, that is, if the document uses Tagged PDF, a dummy alternate description for the image ("image" with language code "en") will provided to avoid breaking standard compliance. It is strongly recommended to use SIGNDOC_Document_importPageFromImageFile2() with a meaningful description of the image.

This function is currently implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aEncodingThe encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aWidthPage width (document coordinates) or zero. If this argument is non-zero, aHeight must also be non-zero and aZoom must be zero. The image will be scaled to this width.
[in]aHeightPage height (document coordinates) or zero. If this argument is non-zero, aWidth must also be non-zero and aZoom must be zero. The image will be scaled to this height.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile(), SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_importPageFromImageFile2(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_importPageFromImageFile2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
int  aEncoding,
const char *  aPath,
double  aZoom,
double  aWidth,
double  aHeight,
int  aFlags,
int  aEncoding2,
const char *  aDescription,
const char *  aLang 
)

Import a page from a file containing an image (with alternate description).

This function is currently implemented for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page.
[in]aEncodingThe encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file containing the image. Supported formats for inserting into PDF documents are: JPEG, PNG, GIF, TIFF, and BMP. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aZoomZoom factor or zero. If this argument is non-zero, aWidth and aHeight must be zero. The size of the page is computed from the image size and resolution, multiplied by aZoom.
[in]aWidthPage width (document coordinates) or zero. If this argument is non-zero, aHeight must also be non-zero and aZoom must be zero. The image will be scaled to this width.
[in]aHeightPage height (document coordinates) or zero. If this argument is non-zero, aWidth must also be non-zero and aZoom must be zero. The image will be scaled to this height.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO and SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_BRIGHTEST_TRANSPARENT. Flag SIGNDOC_DOCUMENT_IMPORTIMAGEFLAGS_KEEP_ASPECT_RATIO is not needed if aZoom is non-zero.
[in]aEncoding2The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aDescriptionAlternate description for the image. If this value is NULL or an empty string, aEncoding2 and aLang will be ignored. If this value is NULL or an empty string and the document uses Tagged PDF, "image" with language code "en" will be used to avoid breaking standard compliance. It is strongly recommended to use a meaningful description. Escape sequences must not be used.
[in]aLangLanguage identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addImageFromFile(), SIGNDOC_Document_addImageFromFile2(), SIGNDOC_Document_importPageFromImageBlob(), SIGNDOC_Document_importPageFromImageBlob2(), SIGNDOC_Document_importPageFromImageFile(), SIGNDOC_Document_isTaggedPDF(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE
int SIGNDOC_Document_importPages ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aTargetPage,
struct SIGNDOC_Document aSource,
int  aSourcePage,
int  aPageCount,
int  aFlags 
)

Import pages from another document.

This function is currently implemented for PDF documents only. The pages to be imported must not contain any interactive fields having names that are already used for intercative fields in the target document.

Page labels are currently ignored, that is, they will probably be messed up in the target document.

Unless flag SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_BREAKING_TAGGED_PDF is set, this function may fail for some values of aTargetPage as the target structure may not be suitable for insertion of pages between certain pages. Appending pages after the last page should always work.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aTargetPageThe 1-based number of the page before which to insert the copied pages. The pages will be appended if this value is 0.
[in]aSourceThe document from which to copy the pages. aSource can be this.
[in]aSourcePageThe 1-based number of the first page (in the source document) to be copied.
[in]aPageCountThe number of pages to be copied. All pages of aSource starting with aSourcePage will be copied if this value is 0.
[in]aFlagsMust be zero.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_isTaggedPDF(), SIGNDOC_Document_setFlags(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_BREAKING_TAGGED_PDF
int SIGNDOC_Document_importProperties ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const char *  aCollection,
struct SIGNDOC_InputStream aStream,
int  aFlags 
)

Import properties from XML (reading a stream).

The input must conform to schema AllSignDocProperties.xsd (if aCollection is empty) or SignDocProperties.xsd (if aCollection is non-empty).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties(). If the string is empty, properties will be imported into all collections, otherwise properties will be imported into the specified collection.
[in]aStreamThe properties will be read from this stream. This function reads the input completely, it doesn't stop at the end tag.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTFLAGS_ATOMIC.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportProperties(), SIGNDOC_Document_exportPropertiesToMemory(), SIGNDOC_Document_importPropertiesFromMemory()
int SIGNDOC_Document_importPropertiesFromMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const char *  aCollection,
const unsigned char *  aPtr,
size_t  aSize,
int  aFlags 
)

Import properties from XML (reading a blob).

The input must conform to schema AllSignDocProperties.xsd (if aCollection is empty) or SignDocProperties.xsd (if aCollection is non-empty).

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties(). If the string is empty, properties will be imported into all collections, otherwise properties will be imported into the specified collection.
[in]aPtrThe properties will be read from the blob pointed to by this argument.
[in]aSizeNumber of octets pointed to by aPtr.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTFLAGS_ATOMIC.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_exportProperties(), SIGNDOC_Document_exportPropertiesToMemory(), SIGNDOC_Document_importProperties()
int SIGNDOC_Document_isModified ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj,
SIGNDOC_Boolean aModified 
)

Check if the document has unsaved changes.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aModifiedWill be set to SIGNDOC_TRUE if the document has unsaved changes, will be set to SIGNDOC_FALSE if the document does not have unsaved changes.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_isTaggedPDF ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_Document aObj,
SIGNDOC_Boolean aTaggedPDF 
)

Check if the document is a Tagged PDF document.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aTaggedPDFWill be set to SIGNDOC_TRUE if the document is a Tagged PDF document, will be set to SIGNDOC_FALSE if the document is not a Tagged PDF document.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_removeAnnotation ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
int  aPage,
const char *  aName 
)

Remove an annotation identified by name.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPageThe page number (1 for the first page).
[in]aNameThe name of the annotation, must not be empty.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAnnotation(), SIGNDOC_Document_flattenAnnotations(), SIGNDOC_Document_getAnnotations(), SIGNDOC_Annotation_setName()
int SIGNDOC_Document_removeAttachment ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName 
)

Remove an attachment from the document.

Attachments are supported for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe name of the attachment.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addAttachmentBlob(), SIGNDOC_Document_addAttachmentFile(), SIGNDOC_Document_getAttachments()
int SIGNDOC_Document_removeDocMDP ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj 
)

Remove any certification signature.

This function does nothing for TIFF documents as TIFF documents do not have certification signatures.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getDocMDP(), SIGNDOC_Document_removePDFA(), SIGNDOC_Document_removePDFUA(), SIGNDOC_Document_removePermissions(), SIGNDOC_Document_setShootInFoot()
int SIGNDOC_Document_removeField ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aName 
)

Remove a field.

Removing a field of a TIFF document will invalidate all signatures.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aNameThe fully-qualified name of the field.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addField(), SIGNDOC_Document_flattenField(), SIGNDOC_Document_getFields()
int SIGNDOC_Document_removeLogicalStructure ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Remove the logical structure.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_removePages ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const int *  aPagesPtr,
int  aPagesCount,
int  aMode 
)

Remove pages from the document.

A document must have at least page. This function will fail if you attempt to remove all pages.

Fields will be removed if all their widgets are on removed pages.

Only signatures in signature fields having the SIGNDOC_FIELD_FLAGS_SINGLEPAGE flag set can survive removal of pages.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPagesPtrPointer to an array of one-based page numbers. The order does not matter, neither does the number of occurences of a page number.
[in]aPagesCountNumber of page numbers pointed to by aPagesPtr.
[in]aModeTell this function whether to keep (SIGNDOC_DOCUMENT_KEEPORREMOVE_KEEP) or to remove (SIGNDOC_DOCUMENT_KEEPORREMOVE_REMOVE) the pages specified by aPagesPtr.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_removePDFA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Remove PDF/A conformance.

Some operations on PDF documents (such as using standard fonts) are not allowed in PDF/A documents. This function turns a PDF/A document into a plain document, enabling those operations.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_removeDocMDP(), SIGNDOC_Document_removePDFUA(), SIGNDOC_Document_removePermissions()
int SIGNDOC_Document_removePDFUA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Remove PDF/UA conformance.

Some operations on PDF documents (such as using standard fonts) are not allowed in PDF/UA documents. This function turns a PDF/UA document into a plain document, enabling those operations.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_removeDocMDP(), SIGNDOC_Document_removePDFA(), SIGNDOC_Document_removePermissions()
int SIGNDOC_Document_removePermissions ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Remove signatures that grant permissions.

If you want to modify (beyond adding signature fields, signing signature fields, and filling in form fields) a PDF document that has permissions granted to Adobe Reader by digital signatures, you have to remove those signatures first by calling this function. That action will remove the permissions for Adobe Reader but enable modifying the document without breaking those signatures.

Permissions granted via encryption are not altered by this function.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_removeDocMDP(), SIGNDOC_Document_removePDFA(), SIGNDOC_Document_removePDFUA(), SIGNDOC_Document_setShootInFoot()
int SIGNDOC_Document_removeProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName 
)

Remove a SignDoc property.

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getProperties(), SIGNDOC_Document_setStringProperty()
int SIGNDOC_Document_removeXFA ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Remove XFA (XML Forms Architecture) content.

SignDoc SDK does not support XFA (XML Forms Architecture) and therefore SIGNDOC_Document_addSignature(), SIGNDOC_Document_addField(), SIGNDOC_Document_applyFdf(), and SIGNDOC_Document_setField() remove XFA from the document to avoid descrepancies between "classic" form fields and XFA. This function is available for PDF documents only.

You can also remove XFA content by calling this function. It will fail if the document prohibits removal of XFA (removing XFA from signed documents breaks signatures).

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsMust be 0.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_renderPageAsImage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_ByteArray aImage,
struct SIGNDOC_RenderOutput aOutput,
const struct SIGNDOC_RenderParameters aRenderParameters,
const struct SIGNDOC_VerificationParameters aVerificationParameters,
const struct SIGNDOC_Rect aClipRect 
)

Render the selected page (or pages) as image.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aImageThe image will be stored here as a blob.
[in,out]aOutputThe image size will be stored here.
[in]aRenderParametersParameters such as the page number.
[in]aVerificationParametersParameters for verification of signatures. Used only if boolean parameter "AddDecorations" of aRenderParameters has been set to SIGNDOC_TRUE. Currently, signatures are verified one after another and the "Timeout" integer parameter applies to each verification. Pass NULL for default parameters.
[in]aClipRectThe rectangle to be rendered (using document coordinates, see Coordinate Systems) or NULL to render the complete page.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_computeZoom(), SIGNDOC_Document_getRenderedSize(), SIGNDOC_Document_renderPageAsSignDocImage()
int SIGNDOC_Document_renderPageAsSignDocImage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_Image **  aImage,
struct SIGNDOC_RenderOutput aOutput,
const struct SIGNDOC_RenderParameters aRenderParameters,
const struct SIGNDOC_VerificationParameters aVerificationParameters,
const struct SIGNDOC_Rect aClipRect 
)

Render the selected page (or pages) as SIGNDOC_Image object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[out]aImageA pointer to the new SIGNDOC_Image object containing the rendered page will be stored here. The caller is responsible for destroying that object.
[in,out]aOutputThe image size will be stored here.
[in]aRenderParametersParameters such as the page number.
[in]aVerificationParametersParameters for verification of signatures. Used only if boolean parameter "AddDecorations" of aRenderParameters has been set to SIGNDOC_TRUE. Currently, signatures are verified one after another and the "Timeout" integer parameter applies to each verification. Pass NULL for default parameters.
[in]aClipRectThe rectangle to be rendered (using document coordinates, see Coordinate Systems) or NULL to render the complete page.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_computeZoom(), SIGNDOC_Document_getRenderedSize(), SIGNDOC_Document_renderPageAsImage(), SIGNDOC_Image_delete()
int SIGNDOC_Document_saveToFile ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aPath,
int  aFlags 
)

Save the document to a file.

After a successful call to this function, the document behaves as if it had been loaded from the specified file.

Saving a signed PDF document without SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL will fail unless SIGNDOC_DOCUMENT_SAVEFLAGS_AUTO_INCREMENTAL is also set. See also SIGNDOC_Document_getRequiredSaveToFileFlags().

The file will remain open until the document is saved again or the SIGNDOC_Document object is closed or destroyed.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aPathThe pathname of the file to be created or overwritten. Pass NULL to save to the file from which the document was loaded or most recently saved (which will fail if the documment was loaded from memory or saved to a stream). See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps.
[in]aFlagsSet of flags modifying the behavior of this function (SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL, SIGNDOC_DOCUMENT_SAVEFLAGS_REMOVE_UNUSED, SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED, SIGNDOC_DOCUMENT_SAVEFLAGS_PDF_1_4, SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS, and SIGNDOC_DOCUMENT_SAVEFLAGS_AUTO_INCREMENTAL, combined with `|'.) Which flags are available depends on the document type. Which flags are required depends on the document state. Call SIGNDOC_Document_getRequiredSaveToFileFlags() to get the flags that are required.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_Document_getRequiredSaveToFileFlags(), SIGNDOC_Document_getSaveToFileFlags(), SIGNDOC_Document_saveToMemory(), SIGNDOC_Document_saveToStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_saveToFileW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const wchar_t *  aPath,
int  aFlags 
)

Save the document to a file.

After a successful call to this function, the document behaves as if it had been loaded from the specified file.

Saving a signed PDF document without SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL will fail unless SIGNDOC_DOCUMENT_SAVEFLAGS_AUTO_INCREMENTAL is also set. See also SIGNDOC_Document_getRequiredSaveToFileFlags().

The file will remain open until the document is saved again or the SIGNDOC_Document object is closed or destroyed.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aPathThe pathname of the file to be created or overwritten. Pass NULL to save to the file from which the document was loaded or most recently saved (which will fail if the documment was loaded from memory or saved to a stream).
[in]aFlagsSet of flags modifying the behavior of this function (SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL, SIGNDOC_DOCUMENT_SAVEFLAGS_REMOVE_UNUSED, SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED, SIGNDOC_DOCUMENT_SAVEFLAGS_PDF_1_4, SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS, and SIGNDOC_DOCUMENT_SAVEFLAGS_AUTO_INCREMENTAL, combined with `|'.) Pass 0 for no flags. Which flags are available depends on the document type.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_Document_getSaveToFileFlags(), SIGNDOC_Document_saveToMemory(), SIGNDOC_Document_saveToStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_saveToMemory ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_ByteArray aBlob,
int  aFlags 
)

Save the document to a blob.

This function may have side effects on the document such as marking it as not modified which may render SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL useless for the next SIGNDOC_Document_saveToFile() call unless the document is changed between those two calls.

After calling this function successfully, the document will be backed by memory.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aBlobThe document will be saved to this blob.
[in]aFlagsSet of flags modifying the behavior of this function (SIGNDOC_DOCUMENT_SAVEFLAGS_REMOVE_UNUSED, SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED, SIGNDOC_DOCUMENT_SAVEFLAGS_PDF_1_4, SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS, combined with `|'.) Pass 0 for no flags. Which flags are available depends on the document type.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_Document_getSaveToStreamFlags(), SIGNDOC_Document_saveToFile(), SIGNDOC_Document_saveToStream(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_saveToStream ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_OutputStream aStream,
int  aFlags 
)

Save the document to a stream.

This function may have side effects on the document such as marking it as not modified which may render SIGNDOC_DOCUMENT_SAVEFLAGS_INCREMENTAL useless for the next SIGNDOC_Document_saveToFile() call unless the document is changed between those two calls.

After calling this function successfully, the document will be backed by memory.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aStreamThe document will be saved to this stream.
[in]aFlagsSet of flags modifying the behavior of this function (SIGNDOC_DOCUMENT_SAVEFLAGS_REMOVE_UNUSED, SIGNDOC_DOCUMENT_SAVEFLAGS_LINEARIZED, SIGNDOC_DOCUMENT_SAVEFLAGS_PDF_1_4, SIGNDOC_DOCUMENT_SAVEFLAGS_PDFA_BUTTONS, combined with `|'.) Pass 0 for no flags. Which flags are available depends on the document type.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_copyToMemory(), SIGNDOC_Document_copyToStream(), SIGNDOC_Document_getSaveToStreamFlags(), SIGNDOC_Document_saveToFile(), SIGNDOC_Document_saveToMemory(), SIGNDOC_DocumentLoader_loadFromFile(), SIGNDOC_DocumentLoader_loadFromMemory()
int SIGNDOC_Document_setBooleanProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
SIGNDOC_Boolean  aValue 
)

Set the value of a SignDoc property (boolean).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

It's not possible to change the type of a property.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[in]aValueThe new value of the property.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getProperties(), SIGNDOC_Document_removeProperty(), SIGNDOC_Document_setIntegerProperty(), SIGNDOC_Document_setStringProperty(), SIGNDOC_Document_addSignature()
int SIGNDOC_Document_setCompatibility ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aMajor,
int  aMinor 
)

Request to not make changes to the document which are incompatible with an older version of this class.

No features introduced after aMajor.aMinor will be used.

Passing a version number before 1.11 or after the current version will fail.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aMajorMajor version number.
[in]aMinorMinor version number.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_setCompressionLevel ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aLevel 
)

Set the FlateDecode compression level.

Calling this function has an effect for PDF documents only. You might want to use a low compression level on slow machines such as mobile devices. That will speed up operations such as embedding fonts, adding attachments, and adding images.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aLevelThe new compression level for encoding data with the FlateDecode filter. Allowed values are 0 (fastest, do not use FlateDecode), and 1 (fast, least compression) through 9 (slowest, best compression). The default value is 6.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
int SIGNDOC_Document_setDefaultDocumentLanguage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aLang 
)

Set the language identifier to be used if a language identifier is required but the document doesn't provide one.

If this function is not called, "en" will be used.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aLang (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aLangAn RFC 3066 language tag. Must not be an empty string. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getDocumentLanguage(), SIGNDOC_Document_setDocumentLanguage(), SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG
int SIGNDOC_Document_setDocumentLanguage ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aLang 
)

Set the document's natural language.

That language applies to all text unless overridden locally.

This function is available for PDF documents only.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aLang (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aLangThe natural language for the document (an RFC 3066 language tag). Must be neither NULL nor an empty string. Example: "en-US".
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getDocumentLanguage(), SIGNDOC_Document_setDefaultDocumentLanguage(), SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG
int SIGNDOC_Document_setField ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_Field aField,
unsigned  aFlags 
)

Change a field.

This function changes a field in the document using attributes from a SIGNDOC_Field object. Everything except for the name and the type of the field can be changed. See the member functions of SIGNDOC_Field for details.

Always get a SIGNDOC_Field object for a field by calling SIGNDOC_Document_getField(), SIGNDOC_Document_getFields(), or SIGNDOC_Document_getFields(), then apply your modifications to that object, then call SIGNDOC_Document_setField().

Applications should not call SIGNDOC_Document_setField() for fields that are locked, ie, have SIGNDOC_FIELD_FLAGS_READONLY set in the return value of SIGNDOC_Field_getFlags(). However, SIGNDOC_Document_setField() does not fail in that case.

The coordinates of the field are not changed unless SIGNDOC_DOCUMENT_SETFIELDFLAGS_MOVE is set in aFlags.

Do not try to build a SIGNDOC_Field object from scratch for changing a field as future versions of the SIGNDOC_Field class may have additional attributes.

This function is implemented for PDF documents only.

This function always fails for PDF documents that have signed signature fields.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aFieldThe field to be changed. The font resource name of the default text field attributes may be modified. The value index and the value may be modified for radio button fields and check box fields.
[in]aFlagsSet of flags (SIGNDOC_DOCUMENT_SETFIELDFLAGS_MOVE, SIGNDOC_DOCUMENT_SETFIELDFLAGS_KEEP_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_UPDATE_AP, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FIT_HEIGHT_ONLY, SIGNDOC_DOCUMENT_SETFIELDFLAGS_FORCE_BORDER_WIDTH, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DONT_BREAK_LINES, SIGNDOC_DOCUMENT_SETFIELDFLAGS_AUTO_ALIGNMENT, SIGNDOC_DOCUMENT_SETFIELDFLAGS_LTR, SIGNDOC_DOCUMENT_SETFIELDFLAGS_RTL, SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_LTR, and SIGNDOC_DOCUMENT_SETFIELDFLAGS_DEFAULT_RTL) combined with `|' modifying the behavior of this function. Pass 0 for no flags.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addField(), SIGNDOC_Document_getFields(), SIGNDOC_Document_removeField(), SIGNDOC_DOCUMENT_FLAGS_FAIL_FOR_BROKEN_TARGET_STRUCTURE, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME
int SIGNDOC_Document_setFlags ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)

Set flags modifying the behavior of various functions.

The default is value is 0.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFlagsA set of flags, see SIGNDOC_DOCUMENT_FLAGS_RELAX_BYTE_RANGE, SIGNDOC_DOCUMENT_FLAGS_AMBIGUOUS_BUTTON_VALUE_EMPTY, SIGNDOC_DOCUMENT_FLAGS_USE_DSS_ONLY, SIGNDOC_DOCUMENT_FLAGS_NO_KERNING_FOR_STANDARD_FONTS, SIGNDOC_DOCUMENT_FLAGS_KEEP_ESCAPE_SEQUENCES, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_ALTERNATE_FIELD_NAME, SIGNDOC_DOCUMENT_FLAGS_REQUIRE_LANG, and SIGNDOC_DOCUMENT_FLAGS_INSERT_AT_END.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getFlags(), SIGNDOC_Document_setShootInFoot()
int SIGNDOC_Document_setIntegerProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
int  aValue 
)

Set the value of a SignDoc property (integer).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

It's not possible to change the type of a property.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[in]aValueThe new value of the property.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getProperties(), SIGNDOC_Document_removeProperty(), SIGNDOC_Document_setBooleanProperty(), SIGNDOC_Document_setStringProperty(), SIGNDOC_Document_addSignature()
int SIGNDOC_Document_setShootInFoot ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
unsigned  aFlags 
)
int SIGNDOC_Document_setStringProperty ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aCollection,
const char *  aName,
const char *  aValue 
)

Set the value of a SignDoc property (string).

In the "public" and "encrypted" collections, property names are compared under Unicode simple case folding, that is, lower case and upper case is not distinguished.

It's not possible to change the type of a property. Embedded NUL characters are not supported.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aName and aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aCollectionThe name of the collection, see SIGNDOC_Document_getProperties().
[in]aNameThe name of the property.
[in]aValueThe new value of the property.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getProperties(), SIGNDOC_Document_removeProperty(), SIGNDOC_Document_setBooleanProperty(), SIGNDOC_Document_setIntegerProperty(), SIGNDOC_Document_addSignature()
int SIGNDOC_Document_setTextFieldAttributes ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
struct SIGNDOC_TextFieldAttributes aData 
)

Set the document's default text field attributes.

Font name, font size, and text color must be specified. This function fails if aData has any but not all attributes set or if any of the attributes are invalid.

This function fails for signed PDF document.

This function always fails for TIFF documents.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in,out]aDataThe new default text field attributes. The font resource name will be updated.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_addField(), SIGNDOC_Document_getTextFieldAttributes(), SIGNDOC_Field_setTextFieldAttributes()
int SIGNDOC_Document_updateDSS ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_VerificationParameters aParameters,
unsigned  aFlags,
int *  aCount 
)

Update the DSS for any eligible signatures in the document.

This function is available for PDF documents only.

To extend the validity of the signatures in a PDF document (long term validity LTV), call this function, save the document incrementally, and add a document time stamp.

If the document already has a document time stamp, this function adds information for the latest document time stamp to the DSS. If the document does not have a document time stamp, this function adds information for all eligible signature fields to the DSS.

This function fails if verification fails for any of the signatures.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aParametersA pointer to an object containing Verification parameters or NULL for default parameters.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE and SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_VRI.
[out]aCountIf SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE is not set in aFlags, the number of signature fields for which information has been added to the DSS will be stored in the object pointed to by this argument. If SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE is set in aFlags, the number of eligible signature fields will be stored in the object pointed to by this argument.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_updateDSS2()
int SIGNDOC_Document_updateDSS2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
const struct SIGNDOC_VerificationParameters aParameters,
unsigned  aFlags 
)

Update the DSS for a signature in the document.

The main purpose of this function is testing SignDoc SDK, please use SIGNDOC_Document_updateDSS() instead.

This function is available for PDF documents only.

Call this function (possibly a long time) after signing field aFieldName, then save the document incrementally and add a document time stamp. Before applying the first document time stamp, this function should be called for all eligable signature fields. If any document time stamp has already been added, this function should be called for the last document time stamp.

The signature field must have been signed with one of these methods: SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS7_DETACHED, SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_PKCS7_SHA1, SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_CADES_DETACHED, or SIGNDOC_SIGNATUREPARAMETERS_METHOD_DIGSIG_CADES_RFC3161.

This function fails if verification fails.

This function does nothing if the signature field is not signed.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
[in]aParametersA pointer to an object containing Verification parameters or NULL for default parameters.
[in]aFlagsFlags modifying the behavior of this function, see SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE and SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_VRI.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_updateDSS(), SIGNDOC_Document_getFields(), SIGNDOC_Field_isCurrentlyClearable()
int SIGNDOC_Document_verifySignature ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
int  aEncoding,
const char *  aFieldName,
struct SIGNDOC_VerificationResult **  aOutput 
)

Verify a signature of the document.

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_RELAX_BYTE_RANGE.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aEncodingThe encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
[in]aFieldNameThe name of the signature field encoded according to aEncoding.
[out]aOutputA pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSignature(), SIGNDOC_Document_setFlags(), SIGNDOC_Document_verifySignatureW(), SIGNDOC_Document_verifySignature2(), SIGNDOC_Field_getSignatureType(), SIGNDOC_Field_isSigned()
int SIGNDOC_Document_verifySignature2 ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const struct SIGNDOC_Signature aSignature,
struct SIGNDOC_VerificationResult **  aOutput 
)

Verify a signature of the document.

These are the differences between calling this function and calling SIGNDOC_Document_verifySignature() with the field name obtained from aSignature:

  • This function fails unless SIGNDOC_Signature_getClearedIndex() returns -1 for aSignature.
  • PDF only: This function uses the DSS of the first document time stamp following the signature described by aSignature. If there is no such document time stamp, the latest DSS will be used. This behavior is required for verifying signatures with LTV (long term validity).

There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_RELAX_BYTE_RANGE.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aSignatureA pointer to a SIGNDOC_Signature object for this document.
[out]aOutputA pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSignature(), SIGNDOC_Document_setFlags(), SIGNDOC_Document_verifySignatureW(), SIGNDOC_Field_getSignatureType(), SIGNDOC_Field_isSigned()
int SIGNDOC_Document_verifySignatureW ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_Document aObj,
const wchar_t *  aFieldName,
struct SIGNDOC_VerificationResult **  aOutput 
)

Verify a signature of the document.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_Document object.
[in]aFieldNameThe name of the signature field.
[out]aOutputA pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_Document_getSignature(), SIGNDOC_Document_setFlags(), SIGNDOC_Document_verifySignature(), SIGNDOC_Document_verifySignature2(), SIGNDOC_Field_getSignatureType(), SIGNDOC_Field_isSigned()

The documentation for this class was generated from the following file: