@focusring/horn-wasm
v0.2.1
Published
WebAssembly build of the Horn PDF/UA accessibility checker
Downloads
419
Readme
Horn WASM
WebAssembly build of Horn, the open-source PDF/UA accessibility checker based on the Matterhorn Protocol.
Exposes a single validate(name, data) function that takes a filename and raw PDF bytes, returning the full Horn report as a JavaScript object.
Build
wasm-pack build horn-wasm --target webThe output is written to horn-wasm/pkg/.
Usage
import init, { validate } from './pkg/horn_wasm.js'
await init()
const buffer = await file.arrayBuffer()
const report = validate(file.name, new Uint8Array(buffer))License
MIT
