
Engineering at Nutrient is where we share insights into how we’re building the @nutrientdocs SDKs, Document Web Services APIs, and AI capabilities in documents.
Raleigh, NC USA
Joined June 2025
- Tweets298
- Following18
- Followers33
- Likes111
Engineering at Nutrient retweeted
PDF.js area annotations need pointer tracking, PageViewport coordinate conversion, canvas capture (derive DPI from canvas.width over canvas.clientWidth, not devicePixelRatio), and react-rnd for drag-resize. Five parts, all fragile at zoom/rotation.
Engineering at Nutrient retweeted
Text highlighting on PDF.js: track pointerup, walk startContainer and endContainer for page boundaries, pull getClientRects, convert to PDF space, render via portals. Multi-line and multi-page selections add edge cases. Full pipeline in the post.
Engineering at Nutrient retweeted
PDF space is bottom-left origin in points; screen space is top-left in CSS pixels. convertToPdfPoint and convertToViewportRectangle bridge them — normalize with Math.min/Math.max after rotation. Full reference in the post.
Engineering at Nutrient retweeted
PDF.js rerenders page DOM on zoom, orphaning any container you injected. createPortal into each .page div after textlayerrendered fires, then check isConnected before reusing containers on the next render. Full pattern in the post.
Engineering at Nutrient retweeted
New: Nutrient Data Extraction API. Parse to Markdown or spatial JSON, or Extract specific fields via schema. Four processing modes (fast text, structure, understand, agentic) trade off depth, speed, and cost. SDKs in JavaScript, Python, Java, and PHP.
Engineering at Nutrient retweeted
viewer.currentScaleValue takes strings, even for numeric zoom levels — pass a number and it silently fails. Full PDFViewer navigation, zoom, and rotation walkthrough with EventBus listeners and a complete React toolbar component in the post.
Engineering at Nutrient retweeted
Nutrient open sourced agentic-usability: generates coding challenges from your SDK source, runs Claude Code, Codex, or Gemini CLI in sandboxed microVMs, scores output with an LLM judge. Apache 2.0, on GitHub.
Engineering at Nutrient retweeted
Document Authoring AI adds structured read/write tools, a transaction-API validation boundary, and tracked-changes review to Document Authoring SDK. Vercel AI SDK and LangChain adapters ship in the package; JSON export covers the rest.
Engineering at Nutrient retweeted
Most VLMs return handwriting as ungrounded text — no coordinates, no confidence, non-deterministic at temperature zero. Nutrient Vision API adds OCR, ICR, and VLM-enhanced ICR with word-level bounding boxes and per-word confidence.
Engineering at Nutrient retweeted
EventBus is PDF.js's pub/sub channel: subscribe with on, clean up with off in useEffect returns, dispatch custom events like annotationcolorchange to bridge vanilla JS classes and React state. Forget to clean up and the handler leaks for the bus's lifetime.
Engineering at Nutrient retweeted
PDFFindController runs entirely through EventBus dispatch — five find event types, two listeners, zero direct method calls. Complete React search toolbar in the guide. Nutrient's twp.ai/4huNHj() skips all of it.
Engineering at Nutrient retweeted
3,157 documents, 22 rendering scenarios, veraPDF validation on every output. Nutrient: 97.2 percent PDF/A pass rate, 96.5 percent PDF/UA, zero critical failures, 9.3 times faster OCR than Apryse. Apryse timed out on medium-complexity OCR docs entirely.
Engineering at Nutrient retweeted
goToPage('iii') fails because most APIs take indices, not labels. Page labels, page indices, and printed page numbers can all disagree in the same file. Here's how the PDF spec models labels and the pitfalls that trip up every implementation.
Engineering at Nutrient retweeted
Document Engine handles rendering, streaming, conversion, OCR, and real-time collaboration server-side, with REST for sync operations and WebSockets for collaboration, so your frontend stops choking on 300-page PDFs.
Engineering at Nutrient retweeted
Every viewer capability now sits on the public API, annotations, ink, text markup, page editing, signatures, navigation, no private methods left. Slot names and parameter shapes are a versioned contract. One config flag strips all chrome to a bare canvas.
Engineering at Nutrient retweeted
OCR is deterministic and cheap; LLM extraction is stochastic, slow, and hallucinates values that never existed in the source. Picking one for every document type is a mistake. Here's the three-tier OCR/ICR/VLM architecture and where each tier fails.
Engineering at Nutrient retweeted
Nine steps to a working pdfjs-dist viewer in React: worker config, cMap/font URLs, EventBus/LinkService/FindController/PDFViewer wiring, pagesinit scale, useRef over useState, the CSS import everyone forgets, and cleanup on unmount.
Engineering at Nutrient retweeted
Super proud of the team for shipping the windows builds of our pdf-to-markdown cli this week. We're working on making the commercial licensing for the vision tier available.
The whole point of the CLI is that the file never leaves the machine and you can parse and query digital born PDFs the fastest, cheapest, and phenomenal accuracy whether converting to .md or extracting spatial text.
We've gotten requests for a windows build since we released it and now it's available. Let us know what you all think!
Engineering at Nutrient retweeted
We're making steady progress climbing the ParseBench leaderboard. Latest changes made Nutrient jump from 45th to 12th, ahead of most dedicated parsing products and LLMs, just behind Fable. At a fraction of the cost of running a frontier model over every page.




