0
我正在使用WIA扫描文档。所有的作品都很好,但扫描页面结果不是A4格式。 How to say WIA扫描整个文件?当我扫描时,页面结果被裁剪为Letter格式。 这里是代码:WIA设置文档大小以扫描C#
WIA.Item Item = _scannerDevice.Items[1] as WIA.Item;
WIA.ImageFile wiaImage = null;
Item.Properties["6147"].set_Value(dpi);
Item.Properties["6148"].set_Value(dpi);
//start from x=0; y=0;
Item.Properties["6149"].set_Value(0);
Item.Properties["6150"].set_Value(0);
Item.Properties["6151"].set_Value(width);
Item.Properties["6152"].set_Value(height);
wiaImage = (ImageFile)_scannDialog.ShowTransfer(Item, wiaFormatJPEG, false);
if (wiaImage.FileData != null)
{
WIA.Vector vector = wiaImage.FileData;
_image = Image.FromStream(new MemoryStream((byte[])vector.get_BinaryData()));
OnScannComplete(_image);
}
我试图让这个Item.Properties [ “3097”] SET_VALUE(0)。但它不起作用。你能告诉我如何做到这一点? –
目前没有在我的开发机器上...你有什么价值的宽度和高度?也读esp。我发布的最后一个链接。 – Yahia
最后一个链接不是在说。我收到异常情况“价值不在预期范围内”。在最后如果表达式。 –