我想扫描多个文档。而且我已经编写了扫描代码,但我不知道如何在 c# 中扫描多个文档。
private void BtnScan_Click(object sender, EventArgs e)
{
// Scanner selected?
var device = Devices.SelectedItem as Scanner;
if (device == null)
{
MessageBox.Show("Please select a device.", "Warning",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
Devices.SelectedIndex = 0;
var image = device.Scan();
// Scan
var image = device.Scan();
// Save the image
var path = @"c:\scan.jpeg";
if (File.Exists(path))
{
File.Delete(path);
}
image.SaveFile(path);
}