This commit is contained in:
18
docs/snippets/wasm/config/config_discover.md
Normal file
18
docs/snippets/wasm/config/config_discover.md
Normal file
@@ -0,0 +1,18 @@
|
||||
```typescript title="WASM"
|
||||
import { initWasm, extractBytes } from "@kreuzberg/wasm";
|
||||
|
||||
await initWasm();
|
||||
|
||||
const config = {
|
||||
use_cache: true,
|
||||
enable_quality_processing: true,
|
||||
ocr: {
|
||||
backend: "tesseract-wasm",
|
||||
language: "eng",
|
||||
},
|
||||
};
|
||||
|
||||
const bytes = new Uint8Array(buffer);
|
||||
const result = await extractBytes(bytes, "application/pdf", config);
|
||||
console.log(result.content);
|
||||
```
|
||||
Reference in New Issue
Block a user