2015. július 1.

Removing text watermark from PDF

Following this guide, the solution for me was:
  1. Fix your PDF, just in case:
    pdftk original.pdf output fixed.pdf
  2. Uncompress your PDF for text manipulation:
    pdftk fixed.pdf output uncompressed.pdf uncompress
  3. Remove text watermark with SED:
    sed "s/Wow! eBook <WoweBook.Com>/ /g" uncompressed.pdf > unwatermarked.pdf
  4. Compress the edited PDF:
    pdftk unwatermarked.pdf output compressed.pdf compress
As usually, I had trouble using SED.
It turned out that sed -e "s/Wow! eBook <WoweBook.Com>/ /" did not work for me, but somehow the one without the -e option and with the /g flag did.

Nincsenek megjegyzések: