SignDoc SDK (C)
5.0.0
|
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_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. More... | |
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. More... | |
struct SIGNDOC_Annotation * | SIGNDOC_Document_createScribbleAnnotation (struct SIGNDOC_Exception **aEx, struct SIGNDOC_Document *aObj) |
Create a scribble annotation. More... | |
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. More... | |
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. 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... | |
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:
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[in] | aAnnot | Pointer to the new annotation. Ownership remains at the caller. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. Will also be used as filename of the attachment and must not contain slashes, backslashes, and colons. |
[in] | aDescription | The description of the attachment (can be empty). |
[in] | aType | The MIME type of the attachment (can be empty except for PDF/A-3 documents). |
[in] | aModificationTime | The 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] | aPtr | Pointer to the first octet of the attachment. |
[in] | aSize | The size (in octets) of the attachment. |
[in] | aFlags | Must be zero. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding1 | The encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. Will also be used as filename of the attachment and must not contain slashes, backslashes, and colons. |
[in] | aDescription | The description of the attachment (can be empty). |
[in] | aType | The MIME type of the attachment (can be empty except for PDF/A-3 documents). |
[in] | aEncoding2 | The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The pathname of the file to be attached. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps. |
[in] | aFlags | Must be zero. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aField | The 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] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aEncoding | The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The 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] | aZoom | Zoom 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] | aX | The X coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aY | The Y coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aWidth | Image 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] | aHeight | Image 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] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aEncoding | The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The 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] | aZoom | Zoom 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] | aX | The X coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aY | The Y coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aWidth | Image 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] | aHeight | Image 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] | aFlags | Flags 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] | aEncoding2 | The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aDescription | Alternate 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] | aLang | Language identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aPtr | Pointer 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] | aSize | Size (in octets) of the blob pointed to by aPtr. |
[in] | aZoom | Zoom 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] | aX | The X coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aY | The Y coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aWidth | Image 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] | aHeight | Image 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] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aPtr | Pointer 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] | aSize | Size (in octets) of the blob pointed to by aPtr. |
[in] | aZoom | Zoom 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] | aX | The X coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aY | The Y coordinate of the point at which the lower left corner of the image shall be placed. |
[in] | aWidth | Image 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] | aHeight | Image 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] | aFlags | Flags 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] | aEncoding | The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aDescription | Alternate 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] | aLang | Language identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page before which to insert the new page. The page will be appended if this value is 0. |
[in] | aWidth | The width of the page (in 1/72 inches for PDF documents). |
[in] | aHeight | The height of the page (in 1/72 inches for PDF documents). |
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
or
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aSignatureParameters | The signing parameters. The parameters can be used only once, for a single signature. |
[in] | aVerificationParameters | Verification 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. |
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.
This function uses document (page) coordinates, see Coordinate Systems.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aText | The text. Complex scripts are supported, see Complex Scripts. Escape sequences must not be used. |
[in] | aPage | The 1-based page number of the page. |
[in] | aX | The X coordinate of the reference point of the visually left-most character in document coordinates. |
[in] | aY | The Y coordinate of the reference point of the visually left-most character in document coordinates. |
[in] | aFontName | The 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] | aFontSize | The font size (in user space units). |
[in] | aTextColor | The text color. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aText | The text. Complex scripts are supported, see Complex Scripts. Escape sequences must not be used. |
[in] | aPage | The 1-based page number of the page. |
[in] | aX | The X coordinate of the reference point of the visually left-most character in document coordinates. |
[in] | aY | The Y coordinate of the reference point of the visually left-most character in document coordinates. |
[in] | aFontName | The 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] | aFontSize | The font size (in user space units). |
[in] | aTextColor | The text color. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0. |
[in] | aFlags | Must be 0. |
[in] | aLang | Language 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:
|
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aText | The text. The interpretation of CR and LF depends on the value of aFlags. Escape sequences must not be used. |
[in] | aPage | The 1-based page number of the page. |
[in] | aX0 | X coordinate of lower left corner. |
[in] | aY0 | Y coordinate of lower left corner. |
[in] | aX1 | X coordinate of upper right corner. |
[in] | aY1 | Y coordinate of upper right corner. |
[in] | aFontName | The 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] | aFontSize | The font size (in user space units). |
[in] | aLineSkip | The vertical distance between the baselines of successive lines (usually 1.2 * aFontSize). |
[in] | aTextColor | The text color. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0. |
[in] | aHAlignment | Horizontal alignment of the text: SIGNDOC_DOCUMENT_HALIGNMENT_LEFT, SIGNDOC_DOCUMENT_HALIGNMENT_CENTER, SIGNDOC_DOCUMENT_HALIGNMENT_RIGHT, or SIGNDOC_DOCUMENT_HALIGNMENT_AUTO. |
[in] | aVAlignment | Vertical alignment of the text: SIGNDOC_DOCUMENT_VALIGNMENT_TOP, SIGNDOC_DOCUMENT_VALIGNMENT_CENTER, or SIGNDOC_DOCUMENT_VALIGNMENT_BOTTOM. |
[in] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aText and aFontName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aText | The text. The interpretation of CR and LF depends on the value of aFlags. Escape sequences must not be used. |
[in] | aPage | The 1-based page number of the page. |
[in] | aX0 | X coordinate of lower left corner. |
[in] | aY0 | Y coordinate of lower left corner. |
[in] | aX1 | X coordinate of upper right corner. |
[in] | aY1 | Y coordinate of upper right corner. |
[in] | aFontName | The 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] | aFontSize | The font size (in user space units). |
[in] | aLineSkip | The vertical distance between the baselines of successive lines (usually 1.2 * aFontSize). |
[in] | aTextColor | The text color. |
[in] | aOpacity | The opacity, 0.0 (transparent) through 1.0 (opaque). Documents conforming to PDF/A-1 must use an opacity of 1.0. |
[in] | aHAlignment | Horizontal alignment of the text: SIGNDOC_DOCUMENT_HALIGNMENT_LEFT, SIGNDOC_DOCUMENT_HALIGNMENT_CENTER, SIGNDOC_DOCUMENT_HALIGNMENT_RIGHT, or SIGNDOC_DOCUMENT_HALIGNMENT_AUTO. |
[in] | aVAlignment | Vertical alignment of the text: SIGNDOC_DOCUMENT_VALIGNMENT_TOP, SIGNDOC_DOCUMENT_VALIGNMENT_CENTER, or SIGNDOC_DOCUMENT_VALIGNMENT_BOTTOM. |
[in] | aFlags | Flags 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] | aLang | Language 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:
|
int SIGNDOC_Document_addWatermark | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Document * | aObj, | ||
const struct SIGNDOC_Watermark * | aInput | ||
) |
Add a watermark.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aInput | An object describing the watermark. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The pathname of the FDF document. See Using SignDoc SDK in Windows Store apps for restrictions on pathnames in Windows Store apps. |
[in] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPath | The pathname of the FDF document. |
[in] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName and aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
[in] | aDescription | The new description of the attachment. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
[out] | aOutput | The result of the check will be stored here: SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_MATCH, SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_NO_CHECKSUM, o0r SIGNDOC_DOCUMENT_CHECKATTACHMENTRESULT_MISMATCH. |
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().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
int SIGNDOC_Document_clearApprovalSignatures | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Document * | aObj | ||
) |
Remove all approval signatures of the document.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
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().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | The zoom factor will be stored here. |
[in] | aParams | The parameters such as the page number and the zoom factor. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aPoint | The point to be converted. |
[in] | aParams | The parameters such as the page number and the zoom factor. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aInput | The rectangle to be converted. |
[out] | aOutput | The converted rectangle will be stored here. |
[in] | aParams | The parameters such as the page number and the zoom factor. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aPoint | The point to be converted. |
[in] | aParams | The parameters such as the page number and the zoom factor. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aInput | The rectangle to be converted. |
[out] | aOutput | The converted rectangle will be stored here. |
[in] | aParams | The parameters such as the page number and the zoom factor. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
[in,out] | aBlob | The document will be copied to this blob. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
[in] | aStream | The document will be copied to this stream. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aBlob | The document will be copied to this blob. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aStream | The document will be copied to this stream. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_COPYTOSTREAMFLAGS_UNSAVED. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aLowerLeft | coordinates of lower left corner. |
[in] | aUpperRight | coordinates of upper right corner. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aX0 | X coordinate of lower left corner. |
[in] | aY0 | Y coordinate of lower left corner. |
[in] | aX1 | X coordinate of upper right corner. |
[in] | aY1 | Y coordinate of upper right corner. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aStart | Start point. |
[in] | aEnd | End point. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aStartX | X coordinate of start point. |
[in] | aStartY | Y coordinate of start point. |
[in] | aEndX | X coordinate of end point. |
[in] | aEndY | Y coordinate of end point. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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:
Profile | Document Types | Description |
---|---|---|
"" | 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>
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field, encoded according to aEncoding. |
[in] | aProfile | The 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] | aOutput | A pointer to the new parameters object will be stored here. The caller is responsible for destroying the object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | A pointer to the new parameters object will be stored here. The caller is responsible for destroying the object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFieldName | The name of the signature field, encoded according to aEncoding. |
[in] | aProfile | The 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] | aOutput | A pointer to the new parameters object will be stored here. The caller is responsible for destroying the object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFirstPage | 1-based number of first page to be visited. |
[in] | aLastPage | 1-based number of last page to be visited or 0 for all pages to the end of the document. |
[in] | aFlags | Flags modifying the behavior of this function, must be 0. |
[out] | aOutput | A pointer to the new text iterator object will be stored here. The caller is responsible for destroying the object. |
void SIGNDOC_Document_delete | ( | struct SIGNDOC_Document * | aObj | ) |
SIGNDOC_Document destructor.
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aStream | The fields will be saved to this stream. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aOutput | The XML document will be stored here. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aCollection | The 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] | aStream | The properties will be saved to this stream. |
[in] | aFlags | Flags modifying the behavior of this function, See SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aCollection | The 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] | aBlob | The XML document will be stored here. |
[in] | aFlags | Flags modifying the behavior of this function, See SIGNDOC_DOCUMENT_EXPORTFLAGS_TOP. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aText (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFirstPage | 1-based number of first page to be searched. |
[in] | aLastPage | 1-based number of last page to be searched or 0 to search to the end of the document. |
[in] | aText | Text to be searched for. Multiple successive spaces are treated as single space (and may be ignored subject to aFlags). |
[in] | aFlags | Flags 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] | aOutput | Information about the found text. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFirstPage | 1-based number of first page. |
[in] | aLastPage | 1-based number of last page or 0 to process all pages to the end of the document. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_FLATTENANNOTATIONSFLAGS_INCLUDE_HIDDEN and SIGNDOC_DOCUMENT_FLATTENANNOTATIONSFLAGS_KEEP_STRUCTURE. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The fully-qualified name of the field. |
[in] | aWidget | The widget index to flatten only one widget or -1 to flatten all widgets. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFirstPage | 1-based number of first page. |
[in] | aLastPage | 1-based number of last page or 0 to process all pages to the end of the document. |
[in] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPage | The page number (1 for the first page). |
[in] | aName | The name of the annotation. |
[out] | aOutput | A pointer to a new SIGNDOC_Annotation object or NULL will be stored here. The caller is responsible for destroying that object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The 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] | aPage | The page number (1 for the first page). |
[in,out] | aOutput | The names of the annotations will be stored here. The order is currently unspecified, a future implementation may return the annotations in tab order. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
[out] | aOutput | Information about the attachment will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
[in,out] | aOutput | The attachment will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding to be used for the names returned in aOutput (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in,out] | aOutput | The names of the document's attachments will be stored here. Use SIGNDOC_Document_getAttachment() to get information for a single attachment. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
[out] | aOutput | A 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(). |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[out] | aBPP | The number of bits per pixel of the page (1, 8, 24, or 32) or 0 (for PDF documents) will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[out] | aValue | The value will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[out] | aFactorX | Divide 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] | aFactorY | Divide vertical coordinates by this number to convert document coordinates to inches. The value will be 0.0 if the conversion factor is not available. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding to be used for the return value (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
const wchar_t * SIGNDOC_Document_getErrorMessageW | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj | ||
) |
Get an error message for the last function call.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The fully-qualified name of the field. |
[out] | aOutput | The field will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTypes | 0 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] | aOutput | The fields will be stored here. They appear in the order in which they have been defined. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The 1-based page number. |
[in] | aTypes | 0 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] | aOutput | The 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. |
unsigned SIGNDOC_Document_getFlags | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj | ||
) |
Get the flags set by SIGNDOC_Document_setFlags().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[out] | aValue | The value will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aTime | The 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(). |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
int SIGNDOC_Document_getPageCount | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj | ||
) |
Get the number of pages.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[out] | aOutput | A pointer to a string containing the page label will be stored here. The string must be freed with SIGNDOC_free(). |
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
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[out] | aWidth | The width of the page (in document coordinates) will be stored here. |
[out] | aHeight | The height of the page (in document coordinates) will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding to be used for aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[out] | aPath | The pathname will be stored here. The string must be freed with SIGNDOC_free(). |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
[in,out] | aOutput | The names (ASCII) of all profiles supported by the signature field will be stored here, excluding the default profile "" which is always available. |
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:
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aCollection | The name of the collection, see above. |
[in,out] | aOutput | The properties will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | The 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] | aParams | Parameters such as the page number. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | The flags will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPage | The page number (1 for the first page). |
[out] | aResX | The horizontal resolution in DPI will be stored here. The value will be 0.0 if the resolution is not available. |
[out] | aResY | The vertical resolution in DPI will be stored here. The value will be 0.0 if the resolution is not available. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | The flags will be stored here. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aOutput | The flags will be stored here. |
unsigned SIGNDOC_Document_getShootInFoot | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj | ||
) |
Get the flags set by SIGNDOC_Document_setShootInFoot().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aIndex | The index of the signature, 0 for the first signature applied to the document, SIGNDOC_Document_getSignatureCount()-1 for the newest signature. |
[out] | aOutput | A pointer to a new SIGNDOC_Signature object or NULL will be stored here. The caller is responsible for destroying that object. |
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().
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
struct SPPDF_Document * SIGNDOC_Document_getSPPDFDocument | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Document * | aObj, | ||
SIGNDOC_Boolean | aDestroy | ||
) |
Get the underlying SPPDF_Document object.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aDestroy | SIGNDOC_FALSE to let the SIGNDOC_Document object pointed to by aObj live, SIGNDOC_TRUE to destroy the SIGNDOC_Document pointed to by aObj. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName and for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[out] | aValue | The value will be stored here, encoded according to aEncoding. The string must be freed with SIGNDOC_free(). |
int SIGNDOC_Document_getTextFieldAttributes | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Document * | aObj, | ||
struct SIGNDOC_TextFieldAttributes * | aOutput | ||
) |
Get the document's default text field attributes.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aOutput | This object will be updated. |
int SIGNDOC_Document_getType | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj | ||
) |
Get the type of the document.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aPtr | Pointer 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] | aSize | Size (in octets) of the blob pointed to by aPtr. |
[in] | aZoom | Zoom 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] | aWidth | Page 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] | aHeight | Page 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] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aPtr | Pointer 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] | aSize | Size (in octets) of the blob pointed to by aPtr. |
[in] | aZoom | Zoom 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] | aWidth | Page 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] | aHeight | Page 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] | aFlags | Flags 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] | aEncoding | The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aDescription | Alternate 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] | aLang | Language identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aEncoding | The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The 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] | aZoom | Zoom 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] | aWidth | Page 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] | aHeight | Page 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] | aFlags | Flags 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page. |
[in] | aEncoding | The encoding of aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The 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] | aZoom | Zoom 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] | aWidth | Page 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] | aHeight | Page 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] | aFlags | Flags 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] | aEncoding2 | The encoding of aDescription (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aDescription | Alternate 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] | aLang | Language identifier for aDescription. Unless aDescription is an empty string, this must be a string containing an RFC 3066 language tag. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aTargetPage | The 1-based number of the page before which to insert the copied pages. The pages will be appended if this value is 0. |
[in] | aSource | The document from which to copy the pages. aSource can be this. |
[in] | aSourcePage | The 1-based number of the first page (in the source document) to be copied. |
[in] | aPageCount | The number of pages to be copied. All pages of aSource starting with aSourcePage will be copied if this value is 0. |
[in] | aFlags | Must be zero. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aCollection | The 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] | aStream | The properties will be read from this stream. This function reads the input completely, it doesn't stop at the end tag. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTFLAGS_ATOMIC. |
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).
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aCollection | The 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] | aPtr | The properties will be read from the blob pointed to by this argument. |
[in] | aSize | Number of octets pointed to by aPtr. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_IMPORTFLAGS_ATOMIC. |
int SIGNDOC_Document_isModified | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_Document * | aObj, | ||
SIGNDOC_Boolean * | aModified | ||
) |
Check if the document has unsaved changes.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aModified | Will 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aTaggedPDF | Will 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPage | The page number (1 for the first page). |
[in] | aName | The name of the annotation, must not be empty. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the attachment. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The fully-qualified name of the field. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPagesPtr | Pointer to an array of one-based page numbers. The order does not matter, neither does the number of occurences of a page number. |
[in] | aPagesCount | Number of page numbers pointed to by aPagesPtr. |
[in] | aMode | Tell this function whether to keep (SIGNDOC_DOCUMENT_KEEPORREMOVE_KEEP) or to remove (SIGNDOC_DOCUMENT_KEEPORREMOVE_REMOVE) the pages specified by aPagesPtr. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | Must be 0. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aImage | The image will be stored here as a blob. |
[in,out] | aOutput | The image size will be stored here. |
[in] | aRenderParameters | Parameters such as the page number. |
[in] | aVerificationParameters | Parameters 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] | aClipRect | The rectangle to be rendered (using document coordinates, see Coordinate Systems) or NULL to render the complete page. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[out] | aImage | A 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] | aOutput | The image size will be stored here. |
[in] | aRenderParameters | Parameters such as the page number. |
[in] | aVerificationParameters | Parameters 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] | aClipRect | The rectangle to be rendered (using document coordinates, see Coordinate Systems) or NULL to render the complete page. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of the string pointed to by aPath (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aPath | The 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] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aPath | The 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] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aBlob | The document will be saved to this blob. |
[in] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aStream | The document will be saved to this stream. |
[in] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[in] | aValue | The new value of the property. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aMajor | Major version number. |
[in] | aMinor | Minor version number. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aLevel | The 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aLang (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aLang | An RFC 3066 language tag. Must not be an empty string. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aLang (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aLang | The natural language for the document (an RFC 3066 language tag). Must be neither NULL nor an empty string. Example: "en-US". |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aField | The 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] | aFlags | Set 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | A 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[in] | aValue | The new value of the property. |
int SIGNDOC_Document_setShootInFoot | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_Document * | aObj, | ||
unsigned | aFlags | ||
) |
Disable safety checks.
The default value, 0, makes operations fail which would invalidate existing signatures (signature fields) or signatures granting permissions.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFlags | A set of flags, see SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_BREAKING_SIGNATURES, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_BREAKING_PERMISSIONS, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_INVALID_CERTIFICATE, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_NON_STANDARD_EXTERNAL_FONTS. SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ASSUME_AP_NOT_SHARED, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ASSUME_AP_SHARED, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_DONT_VERIFY_AFTER_SIGNING, SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_ALL_CURVES, and SIGNDOC_DOCUMENT_SHOOTINFOOTFLAGS_ALLOW_BREAKING_TAGGED_PDF. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aName and aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aCollection | The name of the collection, see SIGNDOC_Document_getProperties(). |
[in] | aName | The name of the property. |
[in] | aValue | The new value of the property. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in,out] | aData | The new default text field attributes. The font resource name will be updated. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aParameters | A pointer to an object containing Verification parameters or NULL for default parameters. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE and SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_VRI. |
[out] | aCount | If 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. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
[in] | aParameters | A pointer to an object containing Verification parameters or NULL for default parameters. |
[in] | aFlags | Flags modifying the behavior of this function, see SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_SIMULATE and SIGNDOC_DOCUMENT_UPDATEDSSFLAGS_VRI. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aEncoding | The encoding of aFieldName (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aFieldName | The name of the signature field encoded according to aEncoding. |
[out] | aOutput | A pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object. |
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:
There is a SIGNDOC_Document_setFlags() flag modifying the behavior of this function: SIGNDOC_DOCUMENT_FLAGS_RELAX_BYTE_RANGE.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aSignature | A pointer to a SIGNDOC_Signature object for this document. |
[out] | aOutput | A pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object. |
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.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_Document object. |
[in] | aFieldName | The name of the signature field. |
[out] | aOutput | A pointer to a new SIGNDOC_VerificationResult object or NULL will be stored here. The caller is responsible for destroying that object. |