Rank: Newbie Groups: Member
Joined: 6/24/2016 Posts: 2
|
How would one get the position and size of a PdfField to place an image over this field? I'm attempting to place a signature gif on top of a PdfField.
Dim doc As New PdfDocument(pdfFileName)
'Load the image Dim image As System.Drawing.Image = System.Drawing.Image.FromFile("c:\signature.gif")
'Create a new PdfImage object Dim pdfImage As New EO.Pdf.Drawing.PdfImage(image) 'Create a new PdfImageContent object Dim content As New EO.Pdf.Contents.PdfImageContent(pdfImage)
'Get the signature field Dim field As PdfField = doc.Fields("signature")
'Can set the field value field.Value = "John Smith"
'but how do you get its position and size so one can place the signature image over this field?
'Move the image on top of the pdf form signature text field content.GfxMatrix.Translate(?, ?)
'Scale the image (is this necessary?) content.AutoScale()
'Get the first page Dim FirstPage As PdfPage = doc.Pages(0)
'Place the image on the page firstpage.Contents.Add(content)
'Save it to a new file doc.Save(newFileName)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Currently there is no way to get the position of a PdfField. You can only change its value. Sorry about it!
Thanks
|