Fill form for custom Digital Signature

Technical support for Spire.PDF

Moderator: iceblue support

Fill form for custom Digital Signature

Postby blueeyeswhite » Mon Jun 19, 2017 9:25 am

hi, i want to ask, how do i make a custom fill form for user to draw his/her signature using tablet or any e-pen like in acrobat reader sign with draw. what i find is fill form with digital signature using certificate
Code: Select all
http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Security/How-to-add-signature-field-to-PDF.html


for now, in my form iam making a freedraw canvas and then save it into an image, and then set the image to pdf to sign, which is i need to set the coordinate to put the image.
Code: Select all
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim bmp As New Bitmap(PictureBox1.Width, PictureBox1.Height)
        PictureBox1.DrawToBitmap(bmp, New Rectangle(0, 0, PictureBox1.Width, PictureBox1.Height))
        bmp.Save("test.jpg", Imaging.ImageFormat.Jpeg)
        Dim pdfdoc As New PdfDocument
        pdfdoc.LoadFromFile("AAA.pdf")
        Using fs As FileStream = File.OpenRead("test.jpg")
            Dim pdfimg As PdfImage = PdfImage.FromStream(fs)
            Dim pdfpage As PdfPageBase
            pdfpage = pdfdoc.Pages(0)
            pdfpage.Canvas.DrawImage(pdfimg, pdfpage.Canvas.ClientSize.Width - pdfimg.Width / 2, pdfpage.Canvas.ClientSize.Height - pdfimg.Height / 2, 187, 64)
            pdfdoc.SaveToFile("Sample.pdf")
        End Using
        bmp.Dispose()
        File.Delete("test.jpg")
        System.Diagnostics.Process.Start("Sample.pdf")

    End Sub



is there any component fill form to draw in the pdf ? or any alternative way to sign via tablet without saving the image and re-put the the image as signature

thankss
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Mon Jun 19, 2017 10:15 am

Hello,

Thanks for your inquiry.
I will investigate this issue and give you reply as soon as possible.

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Tue Jun 20, 2017 7:08 am

Hi,

I am afraid our Spire.Pdf currently does not have a direct way that transmits the image object to fill the image into the signature field, but we will add it as new feature into our schedule. Once it is done, we will inform you.
Sorry for the inconvenience caused.

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby blueeyeswhite » Tue Jun 20, 2017 7:33 am

please do ..
thanks for the confirmation.
n.B : iam using free edition ver
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Tue Jun 20, 2017 7:45 am

Dear Blueeyeswhite,

Thanks for your reply.
I have added this new feature into our schedule. When it is done, we will notify you ASAP.

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Fri Jun 30, 2017 9:04 am

Hi Blueeyeswhite,

Thanks for your waiting.
The new feature has been done in the newest Spire.PDF Pack(Hot Fix) Version:3.9.189, welcome to download it and set the property(signature.ConfiguerGraphicImage) to configure the image source for digital signature. I enclosed sample code for your kind reference.
Code: Select all
PdfDocument pdfdoc = new PdfDocument();
pdfdoc.LoadFromFile("SignField.pdf");
FileStream fs = File.OpenRead("Signature.gif");
PdfImage image = PdfImage.FromStream(fs);
PdfFormWidget form = pdfdoc.Form as PdfFormWidget;
PdfSignatureFieldWidget field = form.FieldsWidget[0] as PdfSignatureFieldWidget;
PdfCertificate cert = new PdfCertificate("SpireTestCert.pfx", "test");
PdfSignature signature = new PdfSignature(pdfdoc, field.Page, cert, field.Name,field);
signature.ConfigGraphicType = ConfiguerGraphicType.Picture;
signature.ConfiguerGraphicImage = image;
pdfdoc.SaveToFile("Result.pdf",FileFormat.PDF);

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby blueeyeswhite » Mon Jul 03, 2017 11:07 am

[*]DUPLICATE From BELOW
Last edited by blueeyeswhite on Mon Jul 03, 2017 11:11 am, edited 2 times in total.
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am

Re: Fill form for custom Digital Signature

Postby blueeyeswhite » Mon Jul 03, 2017 11:08 am

thanks for the up feature. yet i haven't test it. but when i saw the code why still need to create pdfcertificate ?
and from the code, we still need to save a sign as image first and then attach it. and also i have read this tutorial
Code: Select all
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/PDF-Security/Create-Visible-Digital-Signature-in-PDF-with-C-Code.html
which i don't want it also

iam sorry for the confusion, but if we try on acrobat reader there's a feature call Fill and sign and in there click add signature http://imgur.com/DwMWgQO after that we can custom draw signature http://imgur.com/pxBPZKV after we draw we can place where we want http://imgur.com/ZaxrHW2

is there any upcoming feature like this ? or maybe just custom draw signature on the pdf itself and put the image via coordinate manually.
because from the code itself, still need to draw signature first on paint and then save it and place it as image (kinda complicated)
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Tue Jul 04, 2017 2:00 am

Dear Blueeyeswhite,

Thanks for your detailed information, but I am sorry that our product currently doesn't support custom drawing signature graphics.

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby blueeyeswhite » Tue Jul 04, 2017 7:39 am

thanks for your information, but for confirmation will there be any update in near future for this problem ?
thanks
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am

Re: Fill form for custom Digital Signature

Postby Nina.Tang » Tue Jul 04, 2017 9:04 am

Hi blueeyeswhite,

Thanks for feedback.
I just got a message about your requirement from our dev team, sorry that the function is difficult to achieve and I am afraid it will not be completed in a short time. If the feature is supported in the future, we will notify you.
We apologize for this inconvenience.

Sincerely,
Nina
E-iceblue support team
User avatar
Nina.Tang
 
Posts: 78
Joined: Tue Sep 27, 2016 1:06 am

Re: Fill form for custom Digital Signature

Postby blueeyeswhite » Wed Jul 05, 2017 7:14 am

thanks for the information ! :D
please do :mrgreen:
blueeyeswhite
 
Posts: 9
Joined: Mon Jun 19, 2017 9:03 am


Return to Spire.PDF

Who is online

Users browsing this forum: No registered users and 0 guests

cron