Page 1 of 1

Data exchange betwen Webview and CSEntry Item

Posted: August 3rd, 2021, 2:00 pm
by htuser
Dear CSPro Development Team,
Thanks a lot for allowing CSProusers to use cutting edge technologies in CSPro, for example, webview. This allow us to use lot of existing Javascripts libraries and asking less to you.
For example, the same vision technologies you use for barcode reader can also allow us OCR. Months ago, i asked you to implement it natively in CSPro.
It's important for example, to read name and age from a photo of any ID documents. This will results in less errors in name and age during census and survey. Since this is not yet implemented natively, i'm thinking about using best in class existing Javascript librairy: Tesseract.js, a Webassembly port of an advanced C/C++ OCR engine library.

Right now, the problem is :
a) Where does CSentry-webview store persistent data in Windows and Android OS?
b) Does a user can change the location of the webview data folder?
c) Do we have a more direct way to transfer data collected from webview to CSEntry item?

Please let me know.
Best,

Re: Data exchange betwen Webview and CSEntry Item

Posted: August 9th, 2021, 4:35 pm
by Gregory Martin
In CSPro 7.7, a local web server will be created when using the view function to display HTML, so you can use relative paths from the location of your HTML file. For example, if you do:
view("C:/Test/Test.html");
You can link to libraries in that file:

Code: Select all

<script src="JS/Tesseract.js"></script>
That would look for the file in C:/Test/JS/Tesseract.js.

Re: Data exchange betwen Webview and CSEntry Item

Posted: August 10th, 2021, 12:33 pm
by htuser
Thanks a lot Greg.
This improvement will allow us to design Javascript enriched CSEntry Applications. A world is open for us. CSProusers will ask less native functions to you. When CAWI is implemented, CSPro will re-take the first place.

But, after CAPI text, we would like to have HTML/CSS/Javascript part be displayed in popup windows. For example, when i display autocomplete for a specific field with Javascript, it will better to have it displayed in a small popup windows (such as the prompt function do it ) rather than an entire webview page.

Thanks in advance!
Best