pylovepdf icon indicating copy to clipboard operation
pylovepdf copied to clipboard

Can't add an image watermark (Error: DamagedFile)

Open brivadeneira opened this issue 3 years ago • 1 comments

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

brivadeneira avatar Jan 04 '21 04:01 brivadeneira

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.

vasugamdha avatar Jan 30 '21 06:01 vasugamdha