# Edit text in a PDF when you don't have the original

> Markdown version of https://stella.sh/how/pdf-excel/edit-text-in-pdf for agents and LLMs.
> Change a date or phone number in a PDF in the free LibreOffice Draw, or let Stella (stella.sh) replace the old text everywhere in the same font and size, not cover it up.

Preview and most free viewers can't change existing PDF text. The free LibreOffice Draw opens a PDF as editable text boxes: double-click, retype, then export as PDF, checking that fonts and spacing held. Many online editors only paint a white box over the old words and type on top, so the old text is still in the file. Stella (stella.sh) replaces it properly, in the same font, size and colour.

- Checked: 14 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 14 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: Fixed in about 1½ minutes. Checked afterwards against an answer key written before the run: “21 March” three times and the new number twice, as real text; the old date and number gone from the file (not covered up); each correction where the old one was at the same size; every other line unchanged; no white patches or squeezed text. The school fair, its letter and phone number are fictitious, made for this run as a text PDF. The work is sped up 3×. Stella's question about the weekday is real: the poster says Saturday, and 21 March 2027 is a Sunday.

Video (46 s): https://stella.sh/media/proofs/pdf-excel/edit-text-in-pdf/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer. A two-page Spring Fair PDF in Documents has the wrong date and phone number.
- 0:01 The prompt: fix them everywhere and keep it looking exactly the same, with no original file to edit.
- 0:15 Stella replies that it will keep an untouched copy, compare pages before and after, and check the weekday.
- 0:20 Replacing the text in place, sped up 3×.
- 0:32 Done: five corrections, nothing else changed, and a question about whether the fair is Saturday 20 or Sunday 21 March.

What Stella does:

1. Finds “Spring Fair 2027.pdf” in Documents: a cream poster with the date in large green bold, and a letter to parents
2. Finds every place the wrong date and phone number appear: five in total, two on the poster and three in the letter
3. Removes the old words from the page's text and writes the new ones in the same font, size and colour, without a white patch on the cream background
4. Compares each page before and after to confirm only those digits changed
5. Keeps an untouched copy as “Spring Fair 2027 (original).pdf” and saves the fix under the original name
6. Points out that 21 March 2027 is a Sunday (as was the old date, 14 March), and asks which day the fair is instead of guessing

## The prompt to paste

```text
The Spring Fair PDF in my Documents has the wrong date and phone number. It should say Saturday 21 March, not 14 March, and the phone number should end 181, not 118. Fix them everywhere in the PDF and keep it looking exactly the same. I don't have the original file it was made from.
```

## Edit it yourself

1. **Free: LibreOffice Draw.** Install LibreOffice (free, Mac, Windows and Linux) and open the PDF with Draw. Each line becomes a text box: double-click, retype, and repeat for every place the mistake appears. Then File, Export as PDF under a new name.
2. **Check the look afterwards.** Draw swaps in a similar font when the PDF doesn't carry the whole one, and a longer word can push past its box. Compare the export with the original side by side before you send it.
3. **Online editors and PDF24.** PDF24's Edit PDF and most web editors add new text on top. Cover the old word with a box matching the background, then type: it looks right printed, but the old text stays in the file and shows up in search and copy-paste.
4. **Paid editors.** Adobe Acrobat (paid) and similar editors change existing text in place and match the font when it's available. Worth it if you edit PDFs every week.

## Where Stella stops

- This works on PDFs that hold real text. On a scan (a picture of a page) Stella can only paint over the old words and letter the new ones to match, and it says so.
- When a PDF carries only some letters of a font, a new digit or letter may need a close match; Stella compares the pages afterwards and tells you if anything looks different.
- The PDF's text goes to the AI model you use in Stella; the edit happens on your computer.
- Recorded on Linux with free Python PDF tools. On a Mac or Windows PC Stella uses the same kind of tool.

## Questions

**Can I edit a PDF in Preview on a Mac?**
You can add text, shapes and signatures, but not change words already there. LibreOffice Draw (free) or a paid editor can.

**Is putting a white box over the text good enough?**
For a printout, maybe. In the file, the old text is still there underneath. If it's something private, see [redact a PDF](https://stella.sh/how/pdf-excel/redact-pdf), which removes the text for real.

**Should I convert the PDF to Word instead?**
For bigger rewrites, yes: [convert a PDF to Word](https://stella.sh/how/documents/convert-pdf-to-word), edit it, then save it back as a PDF. For a few words, editing the PDF keeps the layout exactly.

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [LibreOffice Draw (free, opens and edits PDFs)](https://www.libreoffice.org/discover/draw/), [PDF24: edit PDF](https://tools.pdf24.org/en/edit-pdf).

## Related problems

- [How to redact a PDF so the text is really gone](https://stella.sh/how/pdf-excel/redact-pdf.md)
- [Convert a PDF to a Word document you can actually edit](https://stella.sh/how/documents/convert-pdf-to-word.md)
- [Add your signature to a PDF, from a photo of it](https://stella.sh/how/pdf-excel/add-signature-to-pdf.md)
- [Extract text from PDFs, including scanned ones](https://stella.sh/how/pdf-excel/extract-text-from-pdf.md)
- [Convert bank statement PDFs to Excel](https://stella.sh/how/pdf-excel/bank-statement-pdf-to-excel.md)
- [Reduce PDF file size when it's too large to email](https://stella.sh/how/pdf-excel/compress-pdf-too-large-to-email.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
