Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Thu Aug 10, 2017 9:28 am

is there a way to put electronic signature dyamically ? (drag and drop)
just like https://www.howtogeek.com/164668/how-to-electronically-sign-documents-without-printing-and-scanning-them/ especially adobe acrobat ?

i try to implement it, but no luck. still set image to static (specific coordinate). by allowing drop `PdfViewer1.AllowDrop = True`

Code: Select all
    Private Sub PdfViewer1_DragDrop(sender As Object, e As DragEventArgs) Handles PdfViewer1.DragDrop
        Dim picbox As PdfViewer = CType(sender, PdfViewer)

        Dim files As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
        Dim fil As String = files(0).ToString
        Dim pdfdoc As New PdfDocument
        pdfdoc.LoadFromFile("c:\cust.pdf")

        Dim pdfpage As PdfPageBase = pdfdoc.Pages(0)
        If files.Length <> 0 Then
            Try
                Dim pdfimg As PdfImage = PdfImage.FromFile(fil)
                pdfpage.Canvas.DrawImage(pdfimg, 562, 50, 40, 33)
                pdfdoc.SaveToFile("C:\Users\xxx\Desktop\asd.pdf")
            Catch ex As Exception
                MessageBox.Show("Problem opening file ")
            End Try
            MsgBox("a")
        End If

    End Sub

    Private Sub PdfViewer1_DragEnter(sender As Object, e As DragEventArgs) Handles PdfViewer1.DragEnter
        If e.Data.GetDataPresent(DataFormats.FileDrop) Then
            e.Effect = DragDropEffects.Copy
        Else
            e.Effect = DragDropEffects.None
        End If
    End Sub



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

Thu Aug 10, 2017 10:02 am

Hello,

Thanks for your inquiry. The pdfviewer is just a viewer, not editor, sorry that it doesn't support to edit the elements.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Aug 18, 2017 6:25 am

so what component should i use ? what's the approach for this problem ?
thanks

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

Fri Aug 18, 2017 7:39 am

Hello,

Sorry that our product doesn't have the visual operating interface, you only use the our Spire.Pdf product to set image to static (specific coordinate) programmatically.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDFViewer