What do you do for scanning from withing Filepro
Brian K. White
brian at aljex.com
Wed Mar 29 10:55:16 PDT 2017
On 3/23/2017 5:13 PM, Boaz Bezborodko via Filepro-list wrote:
> I'm looking to scan in files linked to specific Filepro records. This
> is the first time I'm doing any kind of work like this.
>
> What methods do you folks use to accomplish this?
> What software/hardware combinations make it easier?
>
> I was thinking of creating separate documents, saved to specific
> directories, and storing the file names and locations in the record.
> But I don't know what software to use that could trigger the scan and
> specify the file name, directory, etc.
>
> I'm working with Filepro 5.6.10R9 running on Windows7 machines.
>
> Thanks,
> Boaz
>
I feel bad, I think we have a pretty neat scanning system we've been
using for 15 years by now, but I just have not had *any* time the last
couple weeks to show it to you. We just instituted all developers using
git and not working as root. Not exactly a smooth and painless transition ;)
Anyway our scanning process is mostly a cgi that runs in the web server
on the same server with filepro, and a small client package (we have
windows and osx versions) that has a commandline scanning util, which is
run by os registry entries to recognize a custom url, and/or a terminal
emulator that has a "run-program" escape sequence feature. You don't
have to use the bundled terminal emulator, several other terminal
emulators have a similar feature, but the included one is free and open
source so no serial numbers or anything to worry about. Just click-n-go.
Images are displayed to the user via web browser, and uploaded to the
server via http-post, or by the user using a drag-n-drop area in the
browser.
In filepro you just fire off the right url which pops up the browser on
the client to either display previous scans or allow uploading new ones.
For more streamlined user process, you can also invoke the
scan-and-upload directly from filepro in the terminal without popping up
the browser.
The files are stored on the filesystem in a directory structure that
simply matches your applications natural filepro file structure. If you
have an invoice file, and one of the records in the invoice file is
invoice 236517, then the files for that invoice end up being stored in a
path like:
/pix/app-or-system-or-customer-name/invoice/23/65/17-###.pdf
where ## is 1 to 100, up to 100 files per customer-doctype-docnumber
triplex. The "docnumber" (invoice number in this case) is split up into
2-byte chunks just to keep the filesystem fast by not having a million
files in any single directory.
(in our case, we have multiple companies or customers using their own
datasets (qualifiers) in the same application. So to address a document
uniquely, you need 3 pieces of info, company, doctype (quote, invoice,
check, etc), docnumber (quote#, invoice#, check#, etc).
The worst part is the cgi ksh script that does all the work is kind of a
big ugly monster by now after 15 years or so! But, it's still ultimately
just a ksh script. There are a few other bits and pieces in total but
it's pretty simple.
You don't do much extra in filepro at all to add document imaging to any
screen in your app. You mostly just add a gosub to any input table and
edit 2 values at the top of the gosub for doctype and docnumber to
whatever makes sense for that screen in your app.
I'd say go to aljex.com and sit in on a sales demo, which will cover the
scanning, and you can actually use it in the demo system yourself, but I
don't know how much uninteresting trucking logistics stuff you'd have to
suffer through to get to the scanning.
The client-side code is not only free but open-source, except the
windows scanning util is a commercial product we purchased. There are a
few different similar utils that can be used for that. I do have a very
crude open source scanning util also, but it it is really really crude.
It only scans one page at a time, and only outputs a .bmp! There are
open source graphics libraries that could be added and used to make a
better scanner util, but I'm not a good enough c or windows developer to
manage it. The client-side code for osx is 100% open source, including
the scanning util, though the osx scanning util is simple and doesn't
work on a lot of scanners. Apparently scanner drivers on osx are not
consistent at all and many scanners come with their own scanner programs
and that is the only thing that works with the scanner. But other
scanners do support a common osx image capture api, and those work. The
server side, I guess you would have to talk to our owner. I do have a
crude proof-of-concept server-side script that is shareable which takes
in a scan and just displays it back. But from there you can modify
however you want. Even the crude script collects the file and displays
it. So just add code to that to do something else with the file like
save it in a directory structure of your choice.
--
bkw
More information about the Filepro-list
mailing list