I'm trying to scan with the Control, but somehow I don't succeed. I always get the message
Here is my code snippet. The Scanner has the Name "PROG-SCANNER OKI".Error [PXVLib]: Scanner is not selected
Code: Select all
// https://sdkhelp.pdf-xchange.com/view/PXV:op_scanToImages_Options#ImagesToPDFOptions
string operationName = "op.scanToImages";
PDFXEdit.IOperation op = null;
int id = pdfCtl.Inst.Str2ID(operationName);
op = pdfCtl.Inst.CreateOp(id);
PDFXEdit.ICabNode opts = op.Params.Root["Options"];
opts["ScannerName"].v = "PROG-SCANNER OKI";
opts["ShowNativeUI"].v = true;
opts["DataTransferMethod"].v = 0;
if (op == null)
{
return -1;
}
try
{
op.Do();
return 1;
}
catch (Exception ex)
{
int hr = Marshal.GetHRForException(ex);
ShowErrMsg(hr);
return -1;
}
Many thanks for the help in advance
Alex