I am evaluating using the Spire.PDF library and am trying to extract some highlighted text but I only seem to extract 'Evaluation Warning : The document was created with Spire.PDF for .NET.' - Is this a limitiation of the free version?
Here is my source code. Select a file with a highlight on the first page. I want to fill the variable called Text with the contents of the highlight.
Dim pdfFile As String
Dim dialog As New OpenFileDialog()
dialog.Filter = "PDF document (*.pdf)|*.pdf"
Dim result As DialogResult = dialog.ShowDialog()
If result <> Windows.Forms.DialogResult.OK Then Exit Sub
pdfFile = dialog.FileName
Dim pdf As New PdfDocument()
pdf.LoadFromFile(pdfFile)
Dim count As Integer = pdf.Pages.Count
Dim Page0 = pdf.Pages(0)
Dim Annot = Page0.AnnotationsWidget
For Each Ann In Annot
Dim Text As String
Dim TextMU = TryCast(Ann, Spire.Pdf.Annotations.PdfTextMarkupAnnotationWidget)
If TextMU IsNot Nothing Then Text = Page0.ExtractText(TextMU.Bounds)
Dim TextPU = TryCast(Ann, Spire.Pdf.Annotations.PdfPopupAnnotationWidget)
If TextPU IsNot Nothing Then Text = Page0.ExtractText(TextPU.Bounds)
Dim i As Integer = 0
Next