Hi,
When I try to extract text from a PDF file, it throws the error:
Unexpected token DictionaryEnd before 7320
My code is:
Dim doc As New PdfDocument()
doc.LoadFromFile("C:\Cop\A.PDF") << Here throws the error
Dim buffer As New StringBuilder()
Dim images As IList(Of Image) = New List(Of Image)()
For Each page As PdfPageBase In doc.Pages
buffer.Append(page.ExtractText())
Next page
doc.Close()
'save text
Dim fileName As String = "C:\Cop\A.txt"
File.WriteAllText(fileName, buffer.ToString())
Thanks.
Best regards,
galder