Skip to main content
Daniel Morgan

PDF to InDesign: converting a PDF back into an editable layout

Anyone who has worked in a design shop knows the email: “We lost the InDesign file, but we have the PDF. Can you just make a few changes?” A PDF is the end of the road. It’s a picture of a layout that happens to have text in it, and getting it back into something you can edit is a pain.

So I built pdf2indd.danielwmorgan.town. You upload a PDF and get back a zip with an editable InDesign file (.idml) and all of its images. Open the .idml in InDesign, save it as .indd, and you’re back in business. The files also open in DesignCraft if you don’t have InDesign.

Why not just open the PDF in InDesign?

You can! InDesign has a Convert PDF feature now. But it does the conversion in Adobe’s cloud, so your PDF leaves your machine, and it has limits: up to 200 pages, under 150 MB, and only up to 80 paragraph and character styles. When I looked around in November 2026, the other options were paid closed-source plug-ins, scripts that drive an installed copy of InDesign on Windows, or open projects that were text-only proofs of concept. I wanted an open converter that reads the PDF itself and writes IDML, so that’s what this is.

How it’s built

A conversion runs as a pipeline of stages that pass plain data from one to the next, and only the last one writes XML:

  1. Read the fonts and work out each one’s family and style.
  2. Normalise the page geometry, split wide pages into spreads, decide on facing pages, and set up parent pages.
  3. Find the main text column.
  4. Turn detected lines of text into usable layers with font, size, colour and tracking, and repair ligatures and broken glyphs along the way.
  5. Group lines into columns and paragraphs, and work out indents, alignment, leading, tab stops, lists and drop caps.
  6. Pull out images and vector paths in paint order.
  7. Assign paragraph and character styles, and estimate page margins.
  8. Rebuild the embedded fonts as installable OpenType files.
  9. Write the IDML parts and zip them up.

InDesign will refuse a whole IDML file over one bad element. So every element and attribute name comes from IDML files that InDesign itself wrote, and anything I wasn’t sure InDesign would accept is left out, with a warning.

Testing it without InDesign in the loop took a few layers. There are 300+ tests that each build a tiny PDF in memory. A checker confirms every package is well formed and compares the words in the IDML against the words in the PDF. And an independent open source renderer, paged, turns the IDML back into a PDF so it can be compared with the original pixel by pixel. I ran a corpus of 137 public PDFs (3,080 pages, with CJK, right-to-left, Type 1, Type 3 and CID fonts in the mix) through all of that. Every package was structurally valid, the median file converted in 0.3 seconds, and median text recall was 99.99%.

The website wraps the converter in a small FastAPI service that runs in Docker.

Features

On the site

In the converted file

What it isn’t

The result is a reconstruction. A PDF carries a lot less information than a layout file, so the converter has to guess at things like where a paragraph ends or which columns belong to the same story, and it tells you what it guessed. Soft-mask effects, some gradients and fonts that aren’t embedded are the usual trouble spots. Check the result before you send it to the printer. But for the “we only have the PDF” email, it gets you most of the way there in a few seconds.

Give it a try at pdf2indd.danielwmorgan.town, and if you hit any issues or have suggestions for improvement, get in touch.