3

Ghostscript allows to generate a new PDF without text from a source one with this easy script:

gs -o output_no_text.pdf -sDEVICE=pdfwrite -dFILTERTEXT  input.pdf

My purpose is delete just one specific fixed string into the first PDF not all the text. Is there a parameter to set in order to do so?

user3492925
  • 161
  • 2
  • 14
  • Simple answer; no. Its also rather unlikely that could even be made to work in the general case. There are a lot of problems identifying text in PDF files, look at the txtwrite device in Ghostscript to see some of the ways this can be tackled. – KenS Sep 20 '16 at 10:06
  • 1
    Rather than using gs, a better alternative would be to use pdftk A detailed solution here http://stackoverflow.com/questions/9871585/how-to-find-and-replace-text-in-a-existing-pdf-file-with-pdftk-or-other-command – Jay Chakra May 18 '17 at 06:22

0 Answers0