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
最後一個鏈接不是在說。我收到異常情況「價值不在預期範圍內」。在最後如果表達式。 –