How to program a text search and replace in PDF files

后端 未结 8 803
不思量自难忘°
不思量自难忘° 2020-12-13 02:41

How would I be able to programmatically search and replace some text in a large number of PDF files? I would like to remove a URL that has been added to a set of files. I

相关标签:
8条回答
  • 2020-12-13 03:27

    I have also become desperate. After 10 PDF Editor installations which all cost money, and no success:

    pdftk + editor suffice:

    Replace Text in PDF Files

    • Use pdftk to uncompress PDF page streams

      pdftk original.pdf output original.clear.pdf uncompress

    • Replace the text (sometimes this works, sometimes it doesn't).

    • Repair the modified (and now broken) PDF

      pdftk original.clear.pdf output original.clear.fixed.pdf

    (from Joel Dare)

    0 讨论(0)
  • 2020-12-13 03:32

    Not sure I would want to do all the work to write the code to modify your 1300 files when there is a program that can do it for you. The other day, I used the Professional version of Infix to batch modify almost 100 files using its "Find and Replace in Files" feature. It works great. I have evaluated other programs in hopes finding an find and replace functionality similar to Microsoft Word. Infix was the only one I found that can do it. Check out: http://www.iceni.com/infix-pro.htm

    0 讨论(0)
提交回复
热议问题