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:
- Read the fonts and work out each one’s family and style.
- Normalise the page geometry, split wide pages into spreads, decide on facing pages, and set up parent pages.
- Find the main text column.
- Turn detected lines of text into usable layers with font, size, colour and tracking, and repair ligatures and broken glyphs along the way.
- Group lines into columns and paragraphs, and work out indents, alignment, leading, tab stops, lists and drop caps.
- Pull out images and vector paths in paint order.
- Assign paragraph and character styles, and estimate page margins.
- Rebuild the embedded fonts as installable OpenType files.
- 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
- Drag and drop one PDF or a whole batch, and download everything as one zip, with a numbered folder per PDF
- A free check on every file as soon as you add it: page count, fonts that aren’t embedded, and what will be approximated or lost
- Pick a page range per file (like
2-5), and only the pages you convert count against your code - Up to 500 pages and 95 MB per PDF
- 2 free files a day with no account; access codes for more, and failed conversions don’t count
- Optionally include the PDF’s embedded fonts, rebuilt as installable OpenType files (you confirm you have the right to use them)
- Replace missing fonts by typing a replacement family; the style is kept, though line wrapping may change
- Spreads: auto-detect two-page spreads, always split wide pages, or never split
- Facing pages: auto, or single pages
- Invisible text, like the OCR layer under a scan: keep it on a hidden layer, discard it, or treat it as normal text
- A reference layer with the original pages on a hidden, locked layer (experimental)
- Optional InCopy output, one
.icmlfile per story
In the converted file
- Real text in real paragraphs, not one frame per line
- Paragraph styles named by role (Body, Heading 1, Caption), plus character styles for bold and italic, with no 80-style cap
- Columns of one article threaded into a single story, so an edit reflows through all of them, where the layout is clear
- Ruled grids become real InDesign tables; other tables stay as tabbed text
- Hyphenated words at line ends rejoined, ligatures expanded, doubled spaces and stray line breaks removed
- Repeated headers, footers and page numbers moved to parent pages, with automatic page numbers
- Images saved as separate files in a Links folder, named by page (like
p03-img01.jpg), with the original JPEG bytes where the PDF has them - Vector art kept as editable paths
- Near-duplicate colours merged into named swatches, with optional RGB to CMYK conversion
- A
NEXT_STEPS.txtchecklist of fonts to install and pages to check - An InDesign helper script,
PDFtoINDD-Tools.jsx, that relinks images, threads selected frames, cleans up text, and turns tabbed text into tables
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.