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.
Thu Apr 02, 2020 2:52 am
I am trying to read the text of the rubberstamp on a pdf in vb.net I can read the subject but I want to read the name. There does not appear to be an explicit property for this value so I am afraid I will have to parse it out of the graphic somehow. Any help would be appreciated.
Thank you
Tom
-
dalsimer76
-
- Posts: 1
- Joined: Wed Apr 01, 2020 8:27 pm
Thu Apr 02, 2020 3:45 am
Hi Tom,
Thanks for your inquiry.
Please refer to the below code and download the latest
Spire.PDF Pack(Hot Fix) Version:6.3.16 for testing. If there is any question, please provide your input file for further investigation. You could send it to us(
support@e-iceblue.com) via email.
- Code: Select all
Dim doc As PdfDocument = New PdfDocument
doc.LoadFromFile("filename")
Dim sb As StringBuilder = New StringBuilder
Dim page As PdfPageBase = doc.Pages(0)
For Each annotation As PdfAnnotation In page.AnnotationsWidget.List
If (TypeOf annotation Is PdfRubberStampAnnotationWidget) Then
Dim prsa As PdfRubberStampAnnotationWidget = CType(annotation, PdfRubberStampAnnotationWidget)
Dim stampSubject As String = prsa.Subject.ToString
Dim stampName As String = prsa.Name
sb.AppendLine("Stamp subject: " + stampSubject)
sb.AppendLine("Stamp name: " + stampName)
End If
Next
File.WriteAllText("out.txt", sb.ToString)
Sincerely,
Rachel
E-iceblue support team
-
rachel.lei
-
- Posts: 1571
- Joined: Tue Jul 09, 2019 2:22 am
Wed Apr 15, 2020 9:31 am
Hello,
Greetings from E-iceblue!
Did my code help you? Could you please give us some feedback at your convenience?
Thanks in advance.
Sincerely,
Rachel
E-iceblue support team
-
rachel.lei
-
- Posts: 1571
- Joined: Tue Jul 09, 2019 2:22 am