“Change the hotel ceiling in this travel policy PDF” is a request people make of AI agents every day, and a PDF is built not to be changed: it is a page description, not a document. The useful answer is a conversion. With the GroupDocs.Editor MCP server running locally, Claude, Cursor or Copilot turns the PDF into editable HTML, saves it as a Word document, and then makes the change in the Word copy, with the text, paragraphs and numbered sections intact and nothing uploaded:
Turn travel-policy.pdf into an editable Word document, then change the hotel ceiling from 160 EUR to 175 EUR.
The step-by-step version is in the documentation: How to turn a PDF into an editable Word document with an AI agent.
What “edit a PDF” should mean to an agent
There are three things an agent can do when asked to edit a PDF, and only one of them is honest.
It can pretend: read the text, write a new document from its own copy, and call that “the edited PDF”. The layout, the fonts and anything the model did not read carefully are gone, and the reply does not say so.
It can patch the page: draw new text over the old. That works for a typo on a form and fails for anything that reflows, such as a longer sentence or an added line.
Or it can convert: turn the PDF into a format built for editing, make the change there, and hand back a document you can keep editing, plus a PDF again if you need one. That is what this server does, and it says so in its responses.
The calls
Captured from GroupDocs.Editor.Mcp 26.10.0 against a synthetic three-page travel policy:
-> get_document_info {"file":{"filePath":"travel-policy.pdf"}}
<- { "family": "FixedLayout", "pageCount": 3, "canEdit": true,
"canSaveTo": [ "docx", "doc", "rtf", "odt", "pdf", "md", ... ] }
-> extract_html {"file":{"filePath":"travel-policy.pdf"},"pages":"1-2"}
<- Extracted 'travel-policy.pdf' as editable HTML
Saved to: …/travel-policy_pages1-2.html
Preview (plain text): Travel Policy - Northwind Traders Version 4,
effective 1 March 2026 Scope This policy applies to every employee ...
-> save_from_html {"htmlFile":{"filePath":"travel-policy_pages1-2.html"},
"format":"docx","outputName":"travel-policy.docx"}
<- Saved 'travel-policy_pages1-2.html' as DOCX
Saved to: …/travel-policy.docx
-> replace_text {"file":{"filePath":"travel-policy.docx"},
"find":"160 EUR","replace":"175 EUR"}
<- Replaced 1 occurrence(s) of '160 EUR' in 'travel-policy.docx'
Saved to: …/travel-policy_edited.docx
Four calls: inspect, extract, save as Word, edit. The last step is the same replace_text the agent uses on any Word file, which is the point of converting first. Once the content is a document, every editing tool applies.
travel-policy.pdf (3 pages, FixedLayout)
|-- extract_html {"pages":"1-2"} ---> travel-policy_pages1-2.html
|-- save_from_html {"format":"docx"} ---> travel-policy.docx
'-- replace_text {"find":"160 EUR","replace":"175 EUR"}
---> travel-policy_edited.docx (editable Word, change made)
need a PDF again? save_from_html / replace_text with "format":"pdf"
Choosing the target
Word is the natural target because it reflows: a longer sentence pushes the next one down instead of overprinting it. get_document_info lists every format a PDF can be saved as here, including DOCX, DOC, RTF, ODT, Markdown, EPUB and PDF again. Markdown is a good choice when the “edit” is really “get this into my docs repo”; PDF is the choice when the change has to go back out in the same format, and replace_text with "format":"pdf" does the edit and the conversion in one call once the content is in Word.
pages picks a range, so a 40-page report does not have to come through the agent to fix a date on page 3. skipImages leaves images out when only the text matters, and pagination: true keeps page boundaries in the HTML when the layout per page is important.
Fidelity: what to expect
A PDF records where each glyph sits, not what a heading or a paragraph is. The conversion reconstructs the structure, and for born-digital documents such as policies, reports and contracts it does that well. In our travel policy, the title and version line came back as paragraphs and the numbered sections (“1. Scope”, “2. Booking”, “3. Allowances”) as a numbered list, all editable text. What it reconstructs is structure, not your house style: a section the PDF drew in bold 14-point type comes back as a list item or a paragraph, not as your template’s “Heading 2”, so a document destined for a styled template may need its headings re-applied. Complex layouts with multiple columns, text boxes over images or heavy design work convert less cleanly, and a scanned PDF has no text to convert at all. Look at the Word copy before you send it anywhere; the HTML preview in the extract response is the quick check.
When not to convert
If the PDF is a signed contract, a filed form or anything whose exact appearance is the point, converting it to Word and back produces a different document, however close it looks. Ask for the change to be made in the source the PDF came from instead, if you have it. The conversion is for the very common case where the PDF is the only copy anyone can find and the content, not the page, is what needs to change.
Honest limits
- This is a conversion, not in-place PDF editing. The result is a new Word (or other) document; the PDF is not modified.
- Scanned PDFs without a text layer cannot be edited this way; there is no OCR step.
- Evaluation mode converts at most two PDF pages per extraction. Asking for
"pages":"1-3"returns pages 1 and 2 without an error, and the evaluation note on every response says only the first two pages can be edited; page 3 extracted on its own works. Every output also starts with an evaluation banner line. - Layout-heavy pages lose some of their design on the way to a reflowing format.
FAQ
Can an AI agent edit a PDF directly? Not honestly. This server converts the PDF into an editable document, makes the change there, and can save a PDF again.
Is the PDF uploaded anywhere? No. The server runs locally; the conversion and the edit happen on your machine.
Can I get a PDF back after editing?
Yes. Save or edit with "format": "pdf", and the result is a new PDF alongside the Word copy.
Go deeper
- Documentation, canonical how-to: How to turn a PDF into an editable Word document with an AI agent
- Documentation hub: GroupDocs.Editor MCP Server
- Start here: Why an AI agent should not rewrite your document to change three words
- Related: Rename a party across 40 contracts without touching the formatting
- Related: Fill Word forms from a spreadsheet with an AI agent, locally
- Related: Edit one worksheet, keep the workbook: surgical edits with an HTML round-trip
- On-premise and security model: 3 architectures for AI document processing, and the one that keeps files inside your network
- Questions: GroupDocs Editor forum
- Source: GroupDocs.Editor.Mcp on GitHub · NuGet package