This commit is contained in:
16
docs/snippets/wasm/ocr/ocr_multi_language.md
Normal file
16
docs/snippets/wasm/ocr/ocr_multi_language.md
Normal file
@@ -0,0 +1,16 @@
|
||||
```typescript title="WASM"
|
||||
import init, { extractBytes } from "kreuzberg-wasm";
|
||||
|
||||
await init();
|
||||
|
||||
const multilingualData = await fetch("multilingual.pdf").then((res) => res.arrayBuffer());
|
||||
|
||||
const result = await extractBytes(multilingualData, "application/pdf", {
|
||||
ocr: {
|
||||
backend: "tesseract",
|
||||
language: "eng+deu+fra",
|
||||
},
|
||||
});
|
||||
|
||||
console.log(result.content);
|
||||
```
|
||||
Reference in New Issue
Block a user