Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Batch processing text amends in marked up PDFs

Community Beginner ,
Oct 03, 2025 Oct 03, 2025

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.

TOPICS
Create PDFs , Edit and convert PDFs , JavaScript , PDF
179
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2025 Oct 03, 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 03, 2025 Oct 03, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2025 Oct 03, 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 06, 2025 Oct 06, 2025
LATEST

I'm interested in exploring this further. What would it cost to look at developing this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines