i used this code to extract text from pdf, but i found it extract only one line from text?can you tell me why?
Dim dlg As OpenFileDialog = New OpenFileDialog
If (dlg.ShowDialog = DialogResult.OK) Then
'open document
Dim pdfDocument As New Aspose.Pdf.Document(dlg.FileName)
Dim extractedText As String
For Each pdfPage As Page In pdfDocument.Pages
Using textStream As New MemoryStream()
'create text device
Dim textDevice As New Devices.TextDevice()
'set text extraction options - set text extraction mode (Raw or Pure)
Dim textExtOptions As New TextExtractionOptions(TextExtractionOptions.TextFormattingMode.Pure)
textDevice.ExtractionOptions = textExtOptions
'convert a particular page and save text to the stream
textDevice.Process(pdfPage, textStream)
'close memory stream
textStream.Close()
'get text from memory stream
extractedText = Encoding.Unicode.GetString(textStream.ToArray())
End Using
Next pdfPage
TextBox1.Text = extractedText
Thanks.