Jul-15-2021, 12:23 AM
(This post was last modified: Jul-15-2021, 12:23 AM by Pedroski55.)
Chack out this stackoverflow thread, may solve your problem.
I never had that trouble. But like I said, I'm no expert!
My watermark is a .png with text running diagonally.
The rest of the .png is transparent. It is a bit smaller than an A4 page
Do you have your pictures as .png or as a .pdf?
How big is your picture?
I have a smiley1.png in my watermarks folder. I tried it, It is positioned correctly.
myApp() is just the code I posted above made into a single function. I often test little programmes that way.
From the Idle shell:
I never had that trouble. But like I said, I'm no expert!
My watermark is a .png with text running diagonally.
The rest of the .png is transparent. It is a bit smaller than an A4 page
Do you have your pictures as .png or as a .pdf?
How big is your picture?
I have a smiley1.png in my watermarks folder. I tried it, It is positioned correctly.
myApp() is just the code I posted above made into a single function. I often test little programmes that way.
From the Idle shell:
Quote:>>> myApp()
Where do you want the watermark on the pdf?
0,0 seems to be the bottom left corner of the page.
the values x = 120, y = 680 works for the first pdf
For full page watermark set x = 10, y = 10 something like that
enter the x value ...
50
enter the y value, bottom of the page is zero
enter the y value, top of the page is 720+
For full page watermark set x = 10, y = 10 something like that
enter the y value
50
Tell me the name of the watermark file.
enter something like purplerectangle.png or whiterectangle.png
this should be a .png
smiley1.png
What pdf file do you want to watermark?
Just enter a name like test2.pdf
examsBatch1_1.pdf
Watermarking page 0 of 4
Watermarking page 1 of 4
Watermarking page 2 of 4
Watermarking page 3 of 4
All done!
>>>