我用过pdf转html http://pdftohtml.sourceforge.net/成功地将表格从 PDF 中剥离为 CSV。它基于Xpdf http://www.foolabs.com/xpdf/portsntools.html,这是一个更通用的工具,包括pdf转文本 http://en.wikipedia.org/wiki/Pdftotext。我只是将其包装为来自 C# 的 Process.Start 调用。
如果您正在寻找更 DIY 一点的东西,这里有iTextSharp http://itextsharp.sourceforge.net/库 - Java 的一个端口iText http://www.1t3xt.com/products/index.php - and PDFBox http://www.pdfbox.org/(是的,它说的是 Java - 但他们有一个 .NET 版本IKVM.NET http://www.ikvm.net/)。这里有一些关于使用的 CodeProject 文章iTextSharp http://www.codeproject.com/KB/cs/PDFToText.aspx and PDFBox http://www.codeproject.com/KB/string/pdf2text.aspx来自 C#。
而且,如果你是really一个受虐狂,你可以调用 Adobe 的PDF I过滤器 http://www.adobe.com/support/downloads/detail.jsp?ftpID=2611与 COM 互操作。这过滤器规格 http://msdn.microsoft.com/en-us/library/ms691105.aspx非常简单,但我猜互操作开销会很大。
编辑:重新阅读问题和后续答案后,很明显OP正在处理images在他的 PDF 中。在这种情况下,您需要提取图像(上面的 PDF 库可以相当轻松地做到这一点)并通过 OCR 引擎运行它。
我用过MODI http://en.wikipedia.org/wiki/Microsoft_Office_Document_Imaging之前进行过交互,取得了不错的效果。它是 COM,因此通过互操作从 C# 调用它也是如此doable http://secure.codeproject.com/KB/office/OCRSampleApplication.aspx和漂亮simple http://msdn.microsoft.com/en-us/library/aa167607.aspx:
' lifted from http://en.wikipedia.org/wiki/Microsoft_Office_Document_Imaging
Dim inputFile As String = "C:\test\multipage.tif"
Dim strRecText As String = ""
Dim Doc1 As MODI.Document
Doc1 = New MODI.Document
Doc1.Create(inputFile)
Doc1.OCR() ' this will ocr all pages of a multi-page tiff file
Doc1.Save() ' this will save the deskewed reoriented images, and the OCR text, back to the inputFile
For imageCounter As Integer = 0 To (Doc1.Images.Count - 1) ' work your way through each page of results
strRecText &= Doc1.Images(imageCounter).Layout.Text ' this puts the ocr results into a string
Next
File.AppendAllText("C:\test\testmodi.txt", strRecText) ' write the OCR file out to disk
Doc1.Close() ' clean up
Doc1 = Nothing
其他人喜欢超立方体 http://code.google.com/p/tesseract-ocr/,但我有直接的经验。我听说过有关它的好消息和坏消息,所以我想这很大程度上取决于您的源质量。