feat(labs): PDF upload, text extraction, LLM draft pipeline

This commit is contained in:
marcuspaico
2026-08-17 15:41:02 -07:00
parent 89394732fd
commit 8e9f3d5894
12 changed files with 237 additions and 5 deletions

7
server/src/lib/pdf.ts Normal file
View File

@@ -0,0 +1,7 @@
import { extractText, getDocumentProxy } from "unpdf";
export async function pdfToText(data: Uint8Array): Promise<string> {
const doc = await getDocumentProxy(data);
const { text } = await extractText(doc, { mergePages: true });
return text;
}