Is it possible to set the Scanning Default Properties via SDK, like the Template, Pages per document, and some of the fields pertaining to the template. If so can you point me where to look or small sample of code?
We currently have program that creates an image object in laserfiche and updates the metadata, then launches the laserfiche scan program that will then scan the image into the object that was created. The problem we face is, the user will sometimes launch the Scan program but not finish/store the image, so we have the image object created with no image file.
What we want to do now is change the program to launch the scan program, set the template, set the folder where they will be scan to, and some of the fields.
Below is the code we are using.
- Thank you
using (ClientManager lfclient = new ClientManager())
{
LaunchOptions myLaunchOptions = new LaunchOptions();
myLaunchOptions.HiddenWindow = false;
myLaunchOptions.ShowSplashScreen = false;
myLaunchOptions.ServerName = strServerName;
myLaunchOptions.RepositoryName = strRepositoryName;
myLaunchOptions.UserName = strUserName;
myLaunchOptions.Password = strPassword;
ScanOptions myScanOption = new ScanOptions();
myScanOption.ScanMode = ScanMode.Standard;
myScanOption.ConnectionString = strLaserficheConnection;
myScanOption.IsDocument = true;
myScanOption.EntryId = docId;
myScanOption.InsertPagesAt = (int)InsertAt.End;
myScanOption.WaitForExit = true;
myScanOption.CloseAfterStoring = true;
lfclient.LaunchScanning(myScanOption);
globalClient.LaunchClient(myLaunchOptions);
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.CreateNoWindow = true;
startInfo.FileName = "cmd";
startInfo.Arguments = @"/C c: && cd \Program Files (x86)\Laserfiche\Client\Scanning\ && LFScan -b -d " + docId.ToString();
process1 = Process.Start(startInfo);
Thread.Sleep(1500);
process1.Kill();
}