---
summary: PdfParser.extractText now accepts raw bytes directly, skipping the pdf-lib round-trip for text-only callers (unpdf-only path)
breaking: false
---

# 0.6.13 — 2026-04-23

Small ergonomics fix to `PdfParser.extractText`. Scholarly/API pipelines that only need text (e.g. PDFs → LLM) can now skip `pdf-lib` entirely.

## Changed

- **`PdfParser.extractText`** now accepts `Uint8Array | ArrayBuffer` in addition to a loaded `PDFDocument`. When raw bytes are passed, `pdf-lib` is never loaded — only `unpdf` — eliminating a wasted `pdf-lib.load` → `doc.save()` → `unpdf.parse` round-trip on the text-extraction hot path. `PDFDocument` callers are unaffected (behavior preserved). Debug logs gain an `inputKind: 'bytes' | 'document'` field so callers can see which path ran.

Resolves [#47](https://github.com/cyanheads/mcp-ts-core/issues/47).
