Call for Scan Input

Brian K. White brian at aljex.com
Tue Apr 8 13:14:57 PDT 2008


----- Original Message ----- 
From: "Joe Chasan" <joe at magnatechonline.com>
To: "filePro Mailing List" <filepro-list at lists.celestial.com>
Sent: Tuesday, April 08, 2008 1:28 PM
Subject: Call for Scan Input


>
> Have Unix server w/facetwin so can call windows programs pretty easily
> from within fp - i want to force there to be a specifically named file
> (with name based on certain fp fields, some hardwiring, and .pdf 
> extension)
> on a network drive that is populated via scanner - i can test for 
> existance
> of file pretty easily - any suggestions on how would i force windows to 
> open
> up whatever scanner program is setup on PC for input should file either be
> missing or need update?  (and possibly name it as i require)?  If i leave 
> it
> up to users, they'll never get the directory/naming conventions I need to
> force integrity, and I'm not comfortable throwing it in a blob file just
> yet.
>
> I'd hate to have to replace all existing facetwin licenses with anzio,
> but so far that's what i've come up as a possibility.
>
> Suggestions?

Thats a pretty large topic.

We scan from windows to unix via facetwin and have been for years.
But we have to supply the scanner program to the user which supports 
specific command line operation and then from filepro we winstart an exact 
command line that works with that specific program.

Originally I built a very simple program using an off the shelf twain 
scanning library which had a hello-world VB code example in it's 
documentation, but later I found a different twain scanning library that 
included a far more useful command line tool which was a sort of stand alone 
executable wrapper for the library.

Now I use that program plus a bundle of other little things like zsh.exe, 
wget.exe, psftp.exe all bundled up in a little self-extracting rar that 
unpacks to a simple C:\Aljex directory, autoruns a little install.bat to 
register a the scanning library dll. And I include a menu choice in a few 
strategic places to winstart an http url to the installer. Then from filepro 
I winstart explicit exact commands using the full exact path to a couple of 
.lnk files in the aljex directory, which run a couple of shell scripts 
minimized, and the shell scripts use the scanning util to scan (with command 
line args to preset all scan resolution and color depth settings, input from 
feeder or flatbed, output file type, and to NOT display the twain UI), use 
wget.exe to talk back to the server to acknowledge scans, storing the scans 
on the pc in a directory structure that matches what's on the server. At 
some later point the user uses a different menu choice to winstart a 
different shell script which runs psftp to upload all scans (since the last 
upload), then move the local scans to archive directories by date. (another 
menu choice allows the user to re-upload all scans within any date range) 
The uploaded scans overwite empty placeholder files of the same names which 
are how fp and various cgi scripts know that page number 3 of invoice 100 in 
company foo is occupied so that some other user scanning into the same 
invoice doesn't clobber the first users scans.
I'm currently working on an improvement that gets rid of the psftp upload 
step and just uses wget to upload the file on the spot using http post.

Optionally that is. Some peoples net connections are slow enough that doing 
a batch upload later or in the background while continueing to scan new 
documents will still be wanted some times.
Securing all this without inconveniencing the user is the tricky part.

I used to use facetwin/samba shared directories to store the files directly 
as they were scanned, but not being able to work over the internet, or 
needing a vpn to do it, got to be too limiting. This way works anywhere.
Plus no more permissions problems or user pc windows networking problems, 
lost network drive mappings, inability to resolve the netbios name etc... 
http requires no passwords, doesn't require network neighborhood, doesn't 
care about lan vs wan and is passed through most firewalls, etc. I can 
handle security comppletely within fp and cgi. I encrypt something in fp on 
the server, hand it to the pc as part of the winstart to scan or upload, the 
pc hands it to the cgi, and only the cgi knows how to decrypt it.
so the cgi is safe and the only password the user dealt with was when he 
logged in to the system.

>From the users point of view it's pretty simple. A hot key pops up a 
scanning menu almost anywhere in the app. (another hot key skips the 
scanning menu and pretends you selected "scan" from it)
one of the menu choices is Admin, which has various odd tasks you only 
occasionally do. One of the choices is "Install scanning support..." which 
just winstarts the installer. Then hit OK a few times and immediately they 
can scan using the other choices on the scanning menu. scan, or scan from 
flatbed, or view, fax, print, email, admin. "view" winstarts a cgi that 
displays a thumbnail view and includes an upload form for uploading 
arbitrary files into the same invoice. the server collects the file and 
renames it appropriately, the user just picks the file from their computer 
and it doesn't matter what it's name is, except in the cgi I reject any file 
that isn't one of about a dozen file types the rest of the filepro and cgi 
code is prepared to deal with. But that includes, a few common office 
documents not just images. so they can upload an email, a word doc, a 
spreadsheet, a pdf, etc... the view cgi also includes a print button that 
assembles all the images into a special temporary html document where the 
img tags have width=100% which causes them to print correctly, and includes 
css page breaks between images, and includes the javascript command to pop 
up the print dialog.
"admin" includes a choice for deleting images, which just winstarts the view 
cgi in a mode that includes a delete button for each thumbnail.

There is a lot of stuff to attend to surrounding the actual act of scanning 
itself and storing on the server.
The scanning util I found was http://www.informatik.com/scandll.html
And the license allowed using it this way.

I think there must be at least a few other such utils out there by now. 
Maybe even some open source ones. I probably got this more than 5 years ago.
...Yep, I know it had lzw compression disabled in it's tiff/gif code when I 
got it, and then a year or two later the patent ran out and they published a 
procedure for altering your license key to enable lzw compression. Wikipedia 
says the patent expired in 2003.

-- 
Brian K. White    brian at aljex.com    http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list