The first and only full-fledged on-device document scanning technology that works in any popular browser.
Extract editable text from images, video streams, screenshots, and files in real time — right inside a webpage. No installation required, no data leaves the device, full control stays on your side.
We can bring any of our recognition modules to web environments through the WebAssembly technology — for example, reference numbers, tax IDs, shipment labels, structured text, loyalty cards, access badges, and other industry-specific recognition tasks.
Tell us about your requirements, and we will develop a tailored technology solution for you.
Request Custom Solution
// JavaScript
importScripts("ocrstudiosdk_wasm.js")
const OCRSTUDIOSDK = await OCRStudioSDK(module)
instance = new OCRSTUDIOSDK.OCRStudioSDKInstance(
"{ \"enable_lazy_initialization\": false, \"enable_delayed_initialization\": true, \"initialization_num_threads\": 1}"
)
const spawnedSession = instance.CreateSession(
<SIGNATURE>, "{\"session_type\": \"document_recognition\", \"target_group_type\": \"default\", \"target_masks\": \"are.id.*\"}")
// <input type="file" id="file-selector"> must exist in HTML
fileSelector = document.querySelector("#file-selector")
fileSelector.addEventListener('change', async (event) => {
const file = event.target.files[0];
const { buffer, width, height } = await getImageBuffer(file);
const rawData = new Uint8Array(buffer);
let fileBufPtr = 0;
const cap = Math.max(rawData.byteLength * 1.5, 8 * 1024 * 1024);
fileBufPtr = OCRSTUDIOSDK._malloc(cap);
OCRSTUDIOSDK.HEAPU8.set(rawData, fileBufPtr);
const channels = rawData.byteLength / (height * width);
const image = OCRSTUDIOSDK.CreateFromRawBuffer(fileBufPtr, rawData.byteLength, width, height, channels >= 3 ? rawData.byteLength / height : width, channels);
spawnedSession.ProcessImage(image);
const result = spawnedSession.CurrentResult();
});
For comprehensive details about our complete
range of solutions and services.
Or contact our sales team: