MultiPage Scanning for fun again!

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
Justin Shafer
Posts: 596
Joined: Sat Jul 28, 2007 7:34 pm
Location: Fort Worth, TX.

MultiPage Scanning for fun again!

Post by Justin Shafer » Sat Jan 05, 2008 11:19 am

Ive asked these guys for some help as well...

http://www.codeguru.com/forum/showthread.php?t=442814

Hi.. Im a newb, but I was wondering if anyone would like to help me...

Im using this code to acquire a pdf image from a scanner, then an open file dialog box asks for the file. I would like to change this to automatically use the file image.pdf everytime..

Can anyone help me please please... I guess I need to read some more... but I dont really plan on programming my whole life.. All I want is this one thing.
------------------------------------------------------------------
TWAIN_SelectFeeder(1);
TWAIN_EnableDuplex(1);
TWAIN_SetPixelType(2);
TWAIN_SetLightPath(1);
TWAIN_SetXferCount(-1);
TWAIN_SetAutoScan(1);
TWAIN_SetMultiTransfer(1);
TWAIN_BeginMultipageFile("image.pdf");
OpenFileDialog openFileDialog=new OpenFileDialog();
openFileDialog.Multiselect=true;
if(openFileDialog.ShowDialog()!=DialogResult.OK) {
return;
}
string[] fileNames=openFileDialog.FileNames;
if(fileNames.Length<1){
return;
}
---------------------------------------------------
I know I need to use something like...
FileStream fs = File.Open("C:\\image.pdf",FileMode.Open);
return;

And I dont know what to do with fileNames=openFileDialog.FileNames;

Post Reply