CheckDoc

Declaration

Delphi

function CheckDoc: Integer; stdcall;

ActiveX

HRESULT _stdcall CheckDoc([out, retval] long* Value);

 

Description

Function to check a signed PDF document, in order to see if the document was not changed after signing.

 

Return value

This function returns 0, 1, 2 or 3.

0No document loaded or error opening doc.
1No Biodata found. Document has not been signed or Biodata is erased from the document.
2Biodata found in document and document has not been manipulated.
3Biodata or document has been manipulated.
4the document is extended with additional data, it is manipulated

Important:

If CheckDoc returns 3 or 4 you can not add new signatures to it, because the document has already been signed and was manipulated afterwards. The document is now invalid.

 

Sample

C#
// check status of a signed document
 
int check = SignAPIv4.CheckDoc();
 
switch(check)
{ 
	case 0: MessageBox.Show("No document loaded or error opening doc");
	break;
                
	case 1: MessageBox.Show("No Biodata found. Document has not been signed or Biodata is erased from the document.");
	break;
                
	case 2: MessageBox.Show("Biodata found in document and document has not been manipulated.");
	break;
                
	case 3: MessageBox.Show("Biodata or document has been manipulated.");  
	break;
   
    case 4: MessageBox.Show("The document has been manipulated.");  
	break;
                
	default: MessageBox.Show("Unkown Error");          
	break;
}