How to program a text search and replace in PDF files

后端 未结 8 808
不思量自难忘°
不思量自难忘° 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)

提交回复
热议问题