We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

TextAbsorber problem

I have this problem with the TextAbsorber () Class from Aspose.Pdf.dll Version 10.2.0.0 to Aspose.Pdf.dll Version 11.8.0.
The string on the PDF, attached, age002@consorzioagrarioparma.it
is processed as age002" & vbNullChar & "consorzioagrarioparma.it from Version 11.8.0.0
and age002@consorzioagrarioparma.it from Version 10.2.0.0

This is my used code:
Private Function LeggiRighePagina(page As Aspose.Pdf.Page) As String()
Dim absorber = New TextAbsorber()
Dim ws As String
absorber.Visit(page)
ws = absorber.Text
Dim wRighe = ws.Split(System.Environment.NewLine.ToCharArray)
Return wRighe
End Function

@Rino

Thanks for contacting support.

I am afraid that you are using a quite old version of the API, whereas it is always recommended to use latest version of the API as it contains all enhancements and fixes. Please try again while using Aspose.Pdf for .NET 17.10 and in case you still face same issue, please share your sample PDF document along with complete code snippet so that we can test the scenario in our environment and address it accordingly.

Hi Al. Thanks for now

Sorry my English, my little knowledge compels me to use Google Translator.
my problem is very simple.
I work in a small software production company and we occasionally experience third-party software like Aspose.pdf.
The company has already purchased licenses 10 and 11.
We need to buy another license because we need it, because we need to regenerate and redistribute new setup, which is never easy.
I would have expected that the transition from 10 to 11 would be painless for our application, using already methods in 10.

I attach the document, which by mistake I ignored Yesterday, Aand the code I use to test

Imports Aspose.Pdf
Imports Aspose.Pdf.Text

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
    Dim wLic As Aspose.Pdf.License = New Aspose.Pdf.License()
    wLic.SetLicense("Aspose.Total.lic")
    wLic.Embedded = True

End Sub

Private Function LeggiRighePagina(page As Aspose.Pdf.Page) As String()
    Dim absorber = New TextAbsorber()
    Dim wDescrRegola As String = String.Empty
    Dim ws As String
    Dim wRowsCount As Integer = 0
    absorber.Visit(page)
    ws = absorber.Text
    Dim wRighe = ws.Split(System.Environment.NewLine.ToCharArray)

    Return wRighe

End Function

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim wFilePdf = New Document("C:\CartelleSplitPdf\Pdf FilesDati\CodCli_006269_2.pdf")
    Dim wPagineLette As Integer = 0
    For Each page As Aspose.Pdf.Page In wFilePdf.Pages
        Dim wRighelette = LeggiRighePagina(page)
        If Not wRighelette.Count > 18 Then Continue For
        Dim wStringaAddree = wRighelette(18)
        wPagineLette = wPagineLette + 1
        TPages.Text = wPagineLette.ToString
    Next

End Sub

End Class
CodCli_006269_2.pdf (128.3 KB)

Sorry for my mistakes, but it’s the first time I use the forum.
Thanks again

@Rino

Thanks for sharing sample code snippet and PDF document.

We have checked the PDF document and I am afraid that we were unable to find age002@consorzioagrarioparma.it text inside it, as you have mentioned in your first post. However, there was another email address as abonori@eurocappetroli.com in the PDF, which you have shared and while testing your code snippet with Aspose.Pdf for 17.10, the API returned complete text.

For your reference, we have attached a sample output which we have observed in our environment.
extracted_text.png (775 Bytes)

Please note that, each version of the API comes with some new enhancements and fixes, due to which some new methods/classes have been added into the API as well as some old and obsoleted methods have been removed. We always recommend and encourage our customers to use latest version of the API as the issues in the older versions have also been resolved in new and latest version of the API.

You may apply for a temporary license, in order to evaluate complete features of the API with latest version and in case you face any issue, please feel free to contact us.