Skip to content

Correct a PDF from a list of changes

What it does

The assistant can correct text in a PDF that has a text layer, following a list of changes that you provide as a file. You get one corrected PDF as a file card, under the next free name (for example report-2.pdf); the original stays unchanged next to it. The assistant reports every change on its own line, so you see what was done and what was not. It does not redraw the page or change charts, table layout or page order: those items stay on your list for you to do by hand.

How to ask

Attach the PDF and the list of changes to the conversation, or keep both in a project. Then ask the assistant to apply the list. The prompt below was run on the three Myra-hosted models, ten runs each, against a prepared five-page report and a list of nine changes. A run counts as passed when the corrected PDF holds exactly the expected text changes, the changes that cannot be done are not forced, and every change is reported in the requested form; the table shows how many of the ten runs passed. Open the corrected PDF before you send it on.

Correct a PDF from a list

You have two documents: a PDF to improve and a markdown with instructions. Produce a corrected document.

Tested on: qwen3.8-27b, gemma-4-31b-it

Not recommended for: mistral-small-4

Gives one corrected PDF. In this test the instructions were a Markdown file named corrections.md; any attached file or project file with a list works.

mistral-small-4 usually applies the changes, but in most runs it reports them in its own format instead of the requested status lines (in at least 12 of 20 runs), and in 6 of 20 runs it sends the whole list of changes a second time. Counted over the English and German lists together (20 runs), only 1 run passed.

Prompt Test case qwen3.8-27b gemma-4-31b-it mistral-small-4
Correct a PDF from a list Five-page report corrected from a list of nine changes 9/10 10/10 1/10

The shape of the list matters more than the wording of the request. The list in the test gave, for every change, a label (E01, E02, ...), the page, the exact text to find and the text that replaces it. It named one change as MANUAL (moving a page) and said that this change is only to be listed. It also asked the assistant to report every change on its own line in a fixed form: E01: done, E05: not applied – <reason>, E08: not found, E09: manual. Write your own list the same way.

Tips

  • Give every change a label, the page and the exact text as it is printed in the PDF. A text that appears on several pages needs its page; a short text that is part of a longer one needs more of its surroundings.
  • Put one change on one line of the PDF. A change that spans two lines becomes two changes in the list.
  • Mark everything that is not a text change as MANUAL (a chart, the layout of a table, the order of pages). The assistant lists it and does not touch it.
  • Ask for the status of each change on its own line, with the labels of your list. Then you can check the result against the list in a minute.
  • A change whose text is not in the PDF is reported as not found; the assistant does not change a similar text instead. Check the text in the PDF and correct the list.

Limits

  • Only text can be changed, and only in a PDF with a text layer. A scanned PDF has no text to edit; the assistant says so and changes nothing.
  • One change is one line. A longer new text must fit the room the line has; if it does not fit, the change is reported as not applied and the PDF keeps the old text.
  • A character that the font of the PDF does not contain is drawn in a substitute font. The status of that change says so: look at the line in the result.
  • Copying and pasting an edited line out of the corrected PDF can give the words in a different order than they appear on the page.
  • Charts, images, table layout and page order are not changed. Items marked MANUAL are listed only.
  • Changes are independent: a change that is not applied does not stop the others. The status of each change is one of: done, done with a substitute font, or not applied with the reason (text not found, found more than once, does not fit, not supported). If no change can be applied, no PDF is made.
  • Password-protected PDFs and PDFs with forms, scripts, attachments or unusual image encodings are not edited. The details are in the API reference.
  • Only the prompt above was checked, with a prepared report. Which files you can attach to a chat message is listed under Chat: Importing a file.

When something goes wrong

  • A change is reported as not applied. The reason is on its line. Correct the list (the exact text, the page, a shorter text) or make the change in the source file, and ask again. Nothing is forced and nothing similar is changed instead.
  • A change is reported as not found. The text is not on that page as you wrote it. Copy it from the PDF, including spaces and signs, and name the page.
  • A change is reported as found more than once. Name the page or use a longer piece of text.
  • The assistant says the PDF has no text layer. It is a scan. Ask for the content to be recreated as a new document instead.
  • The assistant says it made the file, but there is no card. The notice No file was created. appears with a Create it now button. Use it.
  • The PDF was refused. The message names the reason, for example a password or a form. Save a copy without it and ask again.
  • A line of the corrected PDF looks different. Look at the status of that change: a substitute font is named there. Make the change in the source file if the font matters.