Files
fil/docs/snippets/wasm/getting-started/extract_bytes_sync.md

13 lines
327 B
Markdown
Raw Permalink Normal View History

2026-06-01 23:40:55 +02:00
```typescript title="WASM"
import { extractBytes, initWasm } from "@kreuzberg/wasm";
await initWasm();
const response = await fetch("document.pdf");
const buffer = await response.arrayBuffer();
const data = new Uint8Array(buffer);
const result = await extractBytes(data, "application/pdf");
console.log(result.content);
```