pylovepdf
pylovepdf copied to clipboard
Can't add an image watermark (Error: DamagedFile)
Hello,
watermark tool works perfectly with a text mark, but it doesn't with an image:
from pylovepdf.tools.watermark import Watermark
t = Watermark(public_key, verify_ssl=True, proxies='')
t.add_file('document.pdf')
t.debug = False
t.image = 'image.png'
t.set_output_folder('./')
t.execute()
t.download()
t.delete_current_task()
the result is:
Uploading file... File uploaded! Below file stats: Error type: ProcessingError message: This task can't be processed. Check why in the params. text: ['Text cannot be blank.'] status: 400
no file to be downloaded Task delete status: 200
I guess that you uploaded a damaged file or maybe a protected one, which led you to status 400. It's working fine for me.
For a demo, you can try running the cells in this colab.