Posted - Aug 29 2019 : 23:08:55 Sorry, I misread your requirements. You are looking to scan a multi-page document and save all pages to a separate file (not looking to scan documents individually and have them automatically saved to file).
TImageEnView cannot scan multiple pages at a time.
You need to use TImageEnMView for that.
Please open the demo:
\Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr
And add this code to the OnAcquireBitmap event:
procedure TfrmMain.ImageEnMView1AcquireBitmap(Sender: TObject; ABitmap:
TIEBitmap; DpiX, DpiY: Integer; var Handled: Boolean);
var
filename : string;
begin
filename := FormatDateTime( 'C:\Scanned Documents\Scan_yymmdd-hhnnss-zzz.jpg', Now );
ABitmap.Write( filename);
Handled := False; // Set to true if you don't want image added to ImageEnMView1
end;