Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

LiteParse Cloudflare Worker

A starter template for deploying LiteParse on Cloudflare Workers to parse PDFs at the edge using WebAssembly.

Overview

This Worker runs LiteParse's Rust/WASM parser directly on Cloudflare's edge runtime, letting you extract text from PDFs without managing servers or containers.

Prerequisites

Getting Started

# Install dependencies
npm install

# Start local dev server
npm run dev

Usage

Send a PDF as the request body:

curl -X POST --data-binary @document.pdf http://localhost:8787

Response:

{
	"text": "Extracted text content...",
	"pages": 12
}

Deploy

npm run deploy

Project Structure

FileDescription
src/index.tsWorker entrypoint — accepts PDF bytes, runs WASM parser, returns JSON
liteparse_wasm_bg.wasmCompiled LiteParse WebAssembly module
wrangler.jsoncCloudflare Workers configuration with CompiledWasm rule

How It Works

  1. The .wasm file is bundled via Wrangler's CompiledWasm rule.
  2. initSync() initializes the WASM module on the first request.
  3. LiteParse parses the PDF bytes and returns structured text.

License

MIT

关于 About

Quickstart on how to deploy LiteParse as a CloudFlare worker

语言 Languages

TypeScript100.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
3
Total Commits
峰值: 3次/周
Less
More

核心贡献者 Contributors