>
Linux

Your PDFs Are Breaking Your AI (And Nobody Talks About It)

Your PDFs Are Breaking Your AI (And Nobody Talks About It)

If you have ever fed a PDF into an AI tool and watched it hallucinate tables, mix up column order, or treat a chart as plain text, you already know the problem. The document formats we use every day were built for human eyes, not machine brains. PDF, DOCX, JPEG, these standards date back to an era when the whole point was making something look right on paper or on screen. They were never designed to preserve the underlying structure that an AI needs to actually understand what is in the document, and the gap shows up the moment you try to scale any document-processing workflow beyond a handful of files.

I have hit this wall myself, and so has basically every team I have talked to in the last year. Last quarter I tried to use a hosted AI service to extract structured data from a stack of vendor invoices. The service was a perfectly good model. The PDFs were perfectly normal PDFs. And the output was a mess. Tables collapsed into comma-separated strings. Page headers repeated three times. A signature block got treated as the main author name. I spent more time cleaning up the output than I would have spent reading the PDFs myself, and I had to write a custom post-processing script to recover the column structure that the parser had thrown away.

That gap is exactly why a new open standard called DocLang exists, and why a consortium of IBM, NVIDIA, Red Hat, ABBYY, and HumanSignal just launched a working group under the LF AI & Data Foundation (the Linux Foundation’s umbrella for AI and data projects) to push it forward.

The real problem is not the AI, it is the file format

Here is the uncomfortable truth most people miss: your language model is probably not the bottleneck. The bottleneck is the garbage you are feeding it. When a PDF goes through a typical parsing pipeline, the tool has to infer structure from visual cues. It guesses where a table starts and ends. It assumes reading order based on horizontal position. It treats a figure caption as part of the main body or ignores it completely. Every parser in the wild handles these inferences differently, which is why the same PDF produces different output from every tool you try.

These are not edge cases. They are the default experience for anyone processing real-world documents at scale. A research paper with a two-column layout loses its column structure. A financial report with nested tables flattens into garbage. Even a clean resume with a skills sidebar confuses parsers that do not know the difference between a sidebar and the main content.

DocLang flips that model. Instead of asking an AI to reverse-engineer structure from a visual layout, the format stores the structure natively. A table is a table, with rows and columns explicitly defined. A chart carries its data representation alongside its visual rendering. A code block preserves syntax and indentation as structured data, not as monospaced text styling. The same input always produces the same output across different tools, which is the property you actually need for any kind of reliable document pipeline.

The big names behind it make this hard to ignore

This is not a startup pitch. The founding members of the DocLang Specification Working Group are IBM, NVIDIA, Red Hat, ABBYY, and HumanSignal, operating under the Joint Development Foundation (a Linux Foundation project that hosts vendor-neutral standards work). At version 0.6 already, and licensed under Apache 2.0, the spec is past the “sketch on a napkin” phase.

The technical scope is ambitious. DocLang encodes not just the text, but the structure, semantics, layout geometry, and pagination. It handles complex elements like tables, charts, formulas, and code blocks as first-class objects. It also embeds audio, image, and video content directly, plus governance metadata like privacy flags and model training constraints, all inside the same file.

The governance piece is the part I find most interesting. The format includes explicit metadata for “this document is not for training” or “this document contains personal data.” That is the kind of thing a PDF or DOCX simply cannot express. If you have ever tried to enforce a “do not train on customer data” policy across a fleet of document-processing tools, you know why this matters.

What the workflow actually looks like

The current tooling around DocLang is still thin, but the working group has shipped reference parsers in Python and Rust, plus a converter that takes existing PDFs and DOCX files and produces a DocLang representation. The conversion is not lossless yet, but it is better than anything else I have tried for documents with complex layouts.

A few realistic workflows that are already possible:

  • Automated invoice processing. DocLang preserves table structure natively, so extracting line items, totals, and tax breakdowns becomes a straightforward query instead of a guess-the-columns problem.
  • Contract analysis. The semantic structure makes it possible to ask “what is the termination clause” without the AI hallucinating a paragraph that does not exist.
  • Compliance review. The governance metadata makes it possible to enforce retention and training policies at the document level, not at the pipeline level.
  • Multi-language document handling. DocLang separates the content from the language tags, which is the kind of thing that should have been true for every document format from the start.

Trade-offs

DocLang is at version 0.6. The spec is moving, the tooling is thin, and the converter from PDF and DOCX is not lossless. If you are evaluating this for a production pipeline, plan for some manual cleanup on edge cases. The spec is also not yet a formal ISO or W3C standard, which means some procurement teams will not touch it until it has that rubber stamp.

The consortium is impressive, but vendor-neutral governance under the Linux Foundation is not the same as a community-driven project. Most of the contributors are employees of the founding members, and the roadmap reflects their priorities. If your use case is not on that roadmap, your options are to wait, fork, or contribute upstream.

The performance overhead is also worth flagging. DocLang files are larger than the equivalent PDFs because they carry the structure as data, not just visual layout. For a 100-page document, you can expect the DocLang version to be two to three times the size of the PDF. Storage is cheap, but if you are processing millions of documents, the math starts to matter.

If you are building any kind of document AI pipeline in 2026, this is the standard to watch. The big names behind it mean it is not going to disappear, and the governance piece alone is worth paying attention to. If you are just feeding a few PDFs to ChatGPT and copy-pasting the output, this is overkill, and your existing workflow is fine.

If you only do one thing from this article, read the DocLang spec’s section on governance metadata. The fact that a document format can carry “do not train on this” as a first-class property is the most interesting thing to happen to document tooling in years, and it is worth understanding even if you never use the rest of the spec.

Leave a comment