Hi all,
As I wrote before in the thread we tried storing scanned files into a multiple page TIFF, but failed with storing the TIFF file to server via SaveImageToHttp since the outcome file was too big for the transmission to server. We have implemented the following solution (kindly recommended by Alex):
- each scanned page is stored to the server as JPEG file,
- after all necessary pages are stored, we compile them into one PDF file using Apache FOP XSL formatter.
Of course this only helps when you need to get multipage document and does not solve other issues, but another advantage is that size of PDF file is significantly less than size of TIFF with same scanned pages - from 2 to 4 times (as of now we can observe).
By the way, we also found one little trick of the ActiveX - it seems that it breaks process(es) initiated by SaveImageToHttp when firing PostScan event since file sent to server is not saved. We found that delaying of StopDevice call in the PostScan event handler helps, here is a solution for JS:
window.setTimeout('VSTwain1.StopDevice()',3000);
As for the period (3000 ms = 3 sec), I believe it can depend on the file size and connection speed, but it work for us. Hope this can be helpful for others.
Best regards,
Maxim
P.S. I suggest to the development team to provide event processing schemes to the World since this can significantly help your customers in understanding of the ActiveX behaviour. For instance, the short-spoken phrase about PostScan event - "Fired after a scan or transfer ends.", does not let to understand that the event interrupts saving process(es) initiated by Save* functions.