I have generated a file, let's call it test.pdf
. I want to integrate a watermark with a imagen.png
.
my asp file
watermark.asp:
<% Set Pdf1 = Server.CreateObject("Persits.Pdf")
Set Doc1 = Pdf1.OpenDocument( Server.MapPath("test.pdf") )
' Draw background image on all 3 remaining pages
Set Image1 = Doc1.OpenImage( Server.MapPath("imagen.png") )
For Each Page1 in Doc1.Pages
Page1.Background.DrawImage Image1, "x=0, y=0; scalex=1; scaley=1"
Next
It returns an error saying that:
Object required: 'Doc1'
My pdf file is with a password that I sent to the user earlier. How can I correctly open the file with password?
According to the AspPDF documentation , I just had to add the password as a parameter:
EX: