function LoadDoc(const Filename: PAnsiChar): LongBool; stdcall;
HRESULT _stdcall LoadDoc([in] BSTR FileName, [out, retval] VARIANT_BOOL* Value);
Call this to load a TIFF or PDF document (see 8. Supported Documents). LoadDoc will make a copy of your document into the given temp path. All other functions of the API will only access this copy. LoadDoc will call CloseDoc before it loads a new file. So make sure that you have saved the previously loaded file before loading a new one!
If there is, for some reason, already a file with the same name in the temp path, LoadDoc will rename the new copy to "filenameX" (X = 1 to N). This is important for you to know, if you want to access the temporary copy of the file (e.g. for display reasons while you add one or more signatures). Please use the function GetLoadedDocName to get the name of the temporary file, if you want to access it.
If you call LoadDoc for the first time, the registration engine will be shown. In the registration window you can register the API with your product code or you can choose to use the API in demo mode (see 9. Product Registration). The function will return True if the file was loaded successfully. If there was a problem loading the file (e.g. not enough memory in the temp path or file not found) it will return False.
Make sure you have called SetTempPath before you call LoadDoc the first time!