Skip to main content
Participant
October 3, 2025
Question

Batch processing text amends in marked up PDFs

  • October 3, 2025
  • 1 reply
  • 213 views

I have over 10,000 pdfs with replace text comments on them (text with a strikethrough and replacement text). I don't have access to the original files. Is there any better process other than opening each one, makeing the text edit in Acrobat and then removing the comment and saving the file to achieve a simple text amend. Some changed are just a few words, and some are full paragraphys so there will be a change to line endings/layout.

 

I originally thought the best way would be to use PDF2ID or PDFMarkz to recreate them in Indesign, then write a script to import the comments, apply them and then output them as pdfs again but it looks like the layout will get a bit mangled by those plugins.

 

Is there an efficient way to edit lots of pdfs using an XML export or some kind of automation/script that I've not found while searching.

 

Thanks in advance.

1 reply

Thom Parker
Community Expert
Community Expert
October 3, 2025

Very interesting idea. The problem of course is proper text reflow. Not sure, but it might be possible to use Claude for this, which has PDF editing capabilities. You'd need to know now to write the specific prompt.

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
HybesAuthor
Participant
October 3, 2025

That's worth looking into but with that volume of files I suspect it would burn through too many tokens and become expensive. Do you know of any scripting methods that might work? The amends start life in a spreadsheet and don't have to live inside pdf markup comments if that approach works better. If you edit text within Acrobat the reflow seems to be dealt with so that seems to be the best place to start.

Thom Parker
Community Expert
Community Expert
October 3, 2025

When you manually edit the PDF, Acrobat has it's own engine for reflowing the text. Althougth it's not always very good.  

A plug-in could be written to replace the marked text. All the pieces are in there, so there is no feasibility issue. But the plug-in doesn't have access to any Acrobat services to reflow the text. You'd either have to write it yourself, or find an existing mechanism for doing it.  I have some ideas about how you could use an existing mechanism to get reflowed text, but its messy. 

 

 

  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often