Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Jul 13, 2021 11:24 am

Hi,

I am using spire.pdf.

I have the following problem.

I created a dynamic stamp. This stamp has an textbox. When you place the stamp on a pdf file you are asked to write a number. After this, this number is placed on the stamp.

When I read only my stampfile, I can read the number, but not when the stamp is placed in an other pdf file.

So my stamp is some kind of nested pdf.

Is there any way to read from the file, the stamp is placed, the number that is placed inside the stamp file? The stamp itself is also a pdf file.

To read something from a textbox I use the following code successfully, but not in this nested matter.
Code: Select all
Dim doc As PdfDocument = New PdfDocument()
        doc.LoadFromFile("C:\temp\" & "Rechnungspruefung.pdf")
        Dim formWidget As PdfFormWidget = TryCast(doc.Form, PdfFormWidget)
     

            For i As Integer = 0 To formWidget.FieldsWidget.List.Count - 1
                Dim field As PdfField = TryCast(formWidget.FieldsWidget.List(i), PdfField)
                Dim g As PdfStampCollection

                If TypeOf field Is PdfTextBoxFieldWidget Then
                    Dim textBoxField As PdfTextBoxFieldWidget = TryCast(field, PdfTextBoxFieldWidget)
                    Dim s As String = textBoxField.Text
                End If
            Next

Thanks

Best Regards

Bernd

bekraclg
 
Posts: 1
Joined: Fri Apr 03, 2020 12:26 pm

Wed Jul 14, 2021 7:38 am

Hello,

Thanks for your inquiry.
In order to help us investigate and solve your problem quickly and effectively, please provide your sample PDF file. You could attach it here or send to us via email ([email protected]). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Jul 14, 2021 11:56 am

Hi,

Thank you for providing the file via email.
Sorry to tell you that there is no way to read the number from the stamp in your PDF. If you have other questions, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF