Skip to content

v1.1.0 — pdfnative 1.3 alignment + AI-friendliness

Choose a tag to compare

@Nizoka Nizoka released this 17 Jun 19:12
· 6 commits to main since this release
9f7f1e2

pdfnative-mcp v1.1.0 — pdfnative 1.3 alignment + AI-friendliness

Released 2026-06-09

A minor, fully backward-compatible release that upgrades the engine to
pdfnative v1.3.0 and
makes the server markedly more robust for AI agents. It adds a 13th tool
(validate_pdf for PDF/UA structural checks), six new scripts, COLRv1 colour
emoji, and a deterministic newline sanitizer that turns common LLM formatting
habits into valid PDF/A output without manual workarounds. No breaking changes —
existing tool calls keep working unchanged.

Highlights

  • 🆕 Tool validate_pdf — read-only PDF/UA (ISO 14289-1) structural conformance check wrapping pdfnative's validatePdfUA(). Reports { standard, valid, errors[], warnings[], summary }.
  • 🆕 Six new scriptsadd_international_text now covers 24 scripts: Telugu (te), Sinhala (si), Tibetan (bo), Khmer (km), Myanmar (my), Ethiopic (am).
  • 🆕 COLRv1 colour emoji — the emoji lang code now renders native colour emoji (Noto Color Emoji), with automatic monochrome fallback.
  • 🆕 Newline sanitizer (Safe PDF/A) — embedded \n inside a paragraph is automatically split into separate paragraph blocks, eliminating .notdef tofu from LLM-style multi-line text. Applies to generate_basic_pdf and add_international_text.
  • 🆕 Automatic NFC normalisationadd_international_text normalises input to NFC for maximal glyph coverage.
  • 🛠 Survival directivesSERVER_INSTRUCTIONS, llms.txt, and docs/AI_GUIDE.md updated with PDF/A authoring guidance reflecting the engine fixes below.

Added

  • Tool validate_pdf (new, read-only): PDF/UA (ISO 14289-1) structural validation — verifies catalog /MarkInfo /Marked true, /StructTreeRoot (+ /ParentTree), /Metadata (XMP), /Lang, and per-page MCID uniqueness. Returns { standard: 'pdf-ua-1', valid, errors[], warnings[], summary }. This is a fast developer-time gate, not a substitute for a full reference validator (veraPDF).
  • add_international_text: six new scripts (te, si, bo, km, my, am) via the new bundled Noto font data modules in pdfnative v1.3; 24 scripts total.
  • add_international_text: COLRv1 colour emoji via noto-color-emoji-data.js (the emoji lang code), with automatic monochrome fallback.
  • Newline auto-split: paragraphs containing \n / \r\n / \r are split into discrete paragraph blocks (src/text.ts). Whitespace-only paragraphs are rejected with a clear VALIDATION_ERROR.

Changed

  • Dependency: pdfnative bumped ^1.2.0^1.3.0.
  • add_international_text passes normalize: 'NFC' to the document builder for maximal glyph coverage (output bytes differ from v1.0.0 for some decomposed inputs — this is intentional and improves rendering).
  • MCP _meta.apiVersion bumped 1.0.01.1.0 on every tool; SERVER_VERSION1.1.0.
  • SERVER_INSTRUCTIONS / llms.txt: refreshed decision tree (13 tools), 24-script copy, and PDF/A survival directives.
  • Tool count: 13 (was 12 in v1.0.0).

Fixed

  • Euro sign and CP-1252 symbols (€ ‚ ƒ „ … † ‡ ™ œ ž Ÿ) now render and extract correctly thanks to pdfnative v1.3's Base-14 /ToUnicode fix (pdfnative #48). The previous EUR workaround is no longer needed.
  • Duplicate MCID in wrapped table cells — pdfnative v1.3 assigns a unique MCID per line, so tagged/PDF-A tables with wrapping cells are now PDF/UA-safe.

Deferred (still blocked)

  • merge_pdfs, split_pdf, redact_pdf — pdfnative v1.3 still does not export page-tree manipulation primitives (openPdf / createModifier provide only incremental object updates). Building these on raw primitives would require production-unsafe page-tree surgery that contradicts the project's "faithful, thin wrapper" philosophy. They remain on the roadmap, blocked on an upstream page-tree export API.
  • Per-tool HTTP page-by-page streaming and encrypted-PDF round-trip fixtures — unchanged from v1.0.0; still pending upstream capabilities.

Upgrade guide

  1. Bump your dependency to ^1.1.0 — no code changes required; all v1.0.0 calls work unchanged.
  2. Stop pre-splitting multi-line text or substituting EUR for ; write naturally and let the server handle it.
  3. New: after producing a tagged/PDF-A document, call validate_pdf to assert PDF/UA structural conformance.
  4. New scripts are available immediately via add_international_text lang codes: te, si, bo, km, my, am.