agarden / remove-pdf-watermark

Short script for removing watermarks from PDF files. Requires pdftk.
57 stars 21 forks source link

AttributeError: 'bool' object has no attribute 'append' #1

Closed peterjschroeder closed 8 years ago

peterjschroeder commented 8 years ago

When run with parameters, the program errors out on line 33.

agarden commented 8 years ago

Just pushed a fix for the code around line 33. I do not know that it will solve your problem. If it doesn't, post a screenshot of the error. Thanks!

peterjschroeder commented 8 years ago

Thank you. Error is gone. Although new problem, doesn't seem to remove anything. Maybe a problem with watermark text having spaces? I put in in " and '

agarden commented 8 years ago

Could be. Use pdftk to uncompress the file and then open it in a text editor and search.

pdftk output temp.pdf uncompress

I have only tested this script on a few PDFs that I needed to remove a watermark on. There are probably a myriad of other ways that the watermark might be inserted in the PDF which the script would fail to remove. If each letter were a separate PDF object, for example, instead of the whole string being a single object, then it wouldn't find it. You could try running the program removing just a single letter at a time and see if that works.

On Fri, Jan 1, 2016 at 6:13 PM, peterjschroeder notifications@github.com wrote:

Thank you. Error is gone. Although new problem, doesn't seem to remove anything. Maybe a problem with watermark text having spaces? I put in in " and '

— Reply to this email directly or view it on GitHub https://github.com/agarden/remove-pdf-watermark/issues/1#issuecomment-168349702 .