I've got some workaround idea. It's not using NPAPI plugin so it will be compatible with modern browsers.
User must download and run installer. This installer contains some scanner software (compatible with most scanners) with support for command line and software to uploading files by FTP
I use NASP2 (support most modern scanners) to scan and WINSCP to upload by ftp (we need only winscp.exe amd winscp.com files).
I put WINSCP files to NASP2 folder.
Our installer create bat file ScanToMyWebsite.bat in NASP2 folder, something like:
@echo off
echo Scanning, please wait...
"C:\Program Files\NAPS2\NAPS2.Console" -f -o "%appdata%/NAPS2/temp/my_scan.pdf"
echo Uploading scan...
winscp.com /command "open ftp://login:password@our_ftp_server.pl" "put ""%appdata%\NAPS2\temp\my_scan.pdf""" "exit"
echo Done!
This bat file just scan document and upload it to ftp server.
Then our installer register new protocol in system - for example "scan-to-my-website:" (it's like http:, ftp: etc.) by exec .reg file (our installer do this):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\scan-to-my-website]
@="URL:scan-to-my-website Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\scan-to-my-website\DefaultIcon]
@="C:\\Program Files (x86)\\NAPS2\\NAPS2.exe"
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell]
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell\Open]
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell\Open\command]
@="\"C:\\Program Files\\NAPS2\\ScanToMyWebsite.cmd\""
Now we can create in our website
<a href="scan-to-my-website:">Scan!</a>
After click on this link it just run bat file which we created and upload scan to ftp server.
By AJAX or any other method website can check is file has been uploaded.
That's it :)