← All work← Alle Arbeiten

PDF Layer Explorer

Free to tryKostenlos ausprobieren

When an AI reads a PDF, it can see something different from what you see. This tool shows you the difference. Inside, a PDF is a list of instructions for drawing the page.Wenn eine KI ein PDF liest, sieht sie unter Umständen etwas anderes als man selbst. Dieses Werkzeug zeigt den Unterschied. Innen ist ein PDF eine Liste von Anweisungen, die die Seite zeichnen.

Try it in your browserIm Browser ausprobierenYour file stays on your computer. Nothing is uploaded.Die Datei bleibt auf dem eigenen Rechner. Es wird nichts hochgeladen.

What you’re looking at: the free tool, open on the first page of the German constitution. On the right, the page as it looks. On the left and in the middle, what the file holds inside. Click the picture to see it larger.Zu sehen ist das kostenlose Werkzeug, geöffnet auf der ersten Seite des deutschen Grundgesetzes. Rechts die Seite, wie sie aussieht. Links und in der Mitte das, was die Datei im Inneren enthält. Auf das Bild klicken, um es größer zu sehen.

  1. The page as a person sees it: the first page of Germany’s constitution (the Grundgesetz).Die Seite, wie ein Mensch sie sieht: die erste Seite des deutschen Grundgesetzes.
  2. How the file lists the text of its pages: the words run together, with no spaces between them.So listet die Datei den Text ihrer Seiten auf: Die Wörter laufen ineinander, ohne Leerzeichen.

A computer that reads a PDF can get something different from what the page shows. That’s why I built a way to look.Ein Computer, der ein PDF liest, kann etwas anderes bekommen, als die Seite zeigt. Deshalb habe ich einen Weg gebaut, hineinzuschauen.

Kurz auf Deutsch. Ein Browser-Werkzeug, das zeigt, was in einem PDF steckt: die Anweisungen, mit denen die Seite gezeichnet wird, und die Ebenen. Die Datei wird lokal im Browser verarbeitet und nirgendwohin hochgeladen. Technische Details stehen unten, ausklappbar und auf Englisch. Dazu gibt es den Artikel „What does an LLM actually see in a PDF?“ (LLM heißt: das KI-Modell hinter Chatbots). Die Details unten sind auf Englisch.

The problem

A PDF looks like a page, but inside it is a list of drawing instructions and text fragments. An AI model that reads a PDF gets whatever comes out of that list, which is often not what the page shows.

The approach

Drop a PDF into the browser and look inside it:

Your file stays in your browser. Nothing is uploaded.

Technical details (for programmers)Technische Details (für alle, die programmieren)
  • the structure tree: tags, marked-content IDs and nested elements;
  • in the screenshot, the word is stored as glyph IDs: numbers that point to letter shapes in the font, which the tool decodes back into text;
  • the operator stream: the raw drawing commands, such as BT, Tj, m, l and S, with a syntax-highlighted raw view;
  • layers: show or hide a PDF’s optional content groups, and search across commands and the structure tree.

It’s plain JavaScript, HTML and CSS, with PDF.js doing the rendering.

The essay

Read the article: What does an LLM actually see in a PDF? (on Medium, a blogging site) (LLM means the AI behind chatbots). A debugging story about what a model really receives when you hand it a document, and why the file format matters.

Stand. Eine öffentliche Demo im Browser, quelloffen unter der MIT-Lizenz.

Status. A public demo you can try in the browser, open source under the MIT licence.