0

I have a large number of .pdf files with much the same headers and footers that I’d like to remove.

Is there a something that can remove everything up to a known string and everything after a different known string leaving a valid .pdf?

3
  • Do you just want the text not to appear, or do you want it removed from the pdf as well?
    – meuh
    May 1, 2020 at 17:11
  • I’m wanting to remove it - but making it invisible would work just as well. Do you have a way to do that? May 1, 2020 at 17:44
  • 1
    I've not tried it, but podofobox from tools podofo can change the crop box, which determines what is visible. Beware, some tools may not preserve things like bookmarks. Alternatively, you can use pdf2ps from ghostscript to convert to PostScript, and you may then be able to recognise the text to remove with sed etc. ps2pdf converts back to pdf.
    – meuh
    May 1, 2020 at 18:28

1 Answer 1

0

You can try pdfedit (which being open source, can be found here).

Didn't try this however, since it is only for Windows afaik.

The other way you could do this is by using OCR, and there a lots of different apps and ways to do this: Tesseract is one of them. (work on windows, mac and un*x)

You need to add more detail to your post, since it does not say what operating system it is targeted for, or ways you would want to do this (script, gui app, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.