Dim reader As New iTextSharp.text.pdf.PdfReader("d:\test.pdf")
Dim n As Integer = reader.NumberOfPages
Dim str As String = ""
For i As Integer = 1 To n
Dim strategy As object = New iTextSharp.text.pdf.parser.SimpleTextExtractionStrategy()
Dim currentText As String = iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(Reader, i, strategy)
messagebox.show(currenttext)
currentText = Encoding.UTF8.GetString(ASCIIEncoding.Convert(Encoding.[Default], Encoding.UTF8, Encoding.[Default].GetBytes(currentText)))
messagebox.show(currenttext)
str &= currentText
Next
msgbox(str)
reader.Close()
messagebox.show()显示啥也没有,不知道为什么?