2.0.2 • Published 5 months ago

scandoc-ai v2.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

ScanDoc-AI

We offer a pure JavaScript package for integrating ScanDoc-AI services.

To get an access token please contact: info@scandoc.ai

HTML integration

run: npm install scandoc-ai

An example HTML page integration:

<!DOCTYPE html>
<html>
	<head>
		<title>ScanDoc-AI</title>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<script src="node_modules/scandoc-ai/dist/index.js"></script>
	<body>
		<style>
			:root {
				display: flex;
				flex: 1;
				flex-direction: column;
				height: 100vh;
				width: 100vw;
			}

			html, body {
				display: flex;
				flex: 1;
				flex-direction: column;
				font-family: "Roboto", impact, condensed, sans-serif;
				background-color: #fefefe;
				box-sizing: border-box;
				font-size: 14px;
				align-items: center;
				
			}
		</style>

        <div id="test" style="width: 50%;height: auto;padding: 20px;"></div>
        <script>
			const key = "";  // Use the key provided by our team
			createScanDocAIConfig(key, "test");
            const extractionVideo = getExtractionVideo(function (data) { console.log(data)});
			//
			const html = extractionVideo.getHTML();
			document.getElementById('test').innerHTML = html;
			extractionVideo.startVideo();
        </script>
	</body>
</html>

React integration

run: npm install scandoc-ai

An example React integration:

import { useEffect, useMemo } from "react";
import "scandoc-ai/dist/index"

const key = "";  // Use the key provided by our team
window.createScanDocAIConfig(key, "test");
const extractionVideo = window.getExtractionVideo(data=>console.log(data));

function App() {
  const html = useMemo(()=>extractionVideo.getHTML(), []);
  useEffect(()=>{
    extractionVideo.startVideo();
  }, []);

  return (
    <div dangerouslySetInnerHTML={{__html: html}} />
  );
}

export default App;

Note

If you have problems integrating the solution please contact: support@scandoc.ai

2.0.2

5 months ago

2.0.1

6 months ago

2.0.0

7 months ago

1.0.0

7 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago