Converting PDF to Text in C#
|
|
||||||||||||||||
Description1.8.7.dll
然后复制以下文件的 bin 目录: · commons-logging.dll · fontbox-1.8.7.dll · IKVM.OpenJDK.Text.dll · IKVM.OpenJDK.Util.dll · IKVM.Runtime.dll 使用PDFBox 解析 PDFs非常简单: using org.apache.pdfbox.pdmodel; using org.apache.pdfbox.util; // ... private static string ExtractTextFromPdf(string path) { PDDocument doc = null; try { doc = PDDocument.load(path) PDFTextStripper stripper = new PDFTextStripper(); return stripper.getText(doc); } finally { if (doc != null) { doc.close(); } } } 下载一个示例项目: · How to convert PDF files to text in C# (.NET) [squarepdf.net] · How to convert PDF file to text in VB (.NET) [squarepdf.net] 所需集合总大小约 18 MB: · IKVM.OpenJDK.Core.dll (4 MB) · IKVM.OpenJDK.SwingAWT.dll (6MB) · pdfbox-1.8.7.dll (4 MB) · commons-logging.dll (82 kB) · fontbox-1.8.7.dll (180 kB) · IKVM.OpenJDK.Text.dll (800kB) · IKVM.OpenJDK.Util.dll (2 MB) · IKVM.Runtime.dll (1 MB) 速度尚可: 解析 U.S. Copyright Act PDF (5.1 MB) 花费时间约约 13 S。 不足: 1. IKVM.NET 依赖 (18 MB) 2. 速度 (尤其是IKVM.NET热身时间) |
Sponsored links
File list
Tips: You can preview the content of files by clicking file names^_^Name | Size | Date |
---|---|---|
how_to_convert_pdf_to_text_in.html | 1.18 kB | 2014-11-27|14:17 |
0 | 1.97 kB | |
LICENSE | 22.56 kB | 2011-10-31|14:30 |
THIRD_PARTY_README | 171.41 kB | 2011-10-31|14:30 |
TRADEMARK | 2.10 kB | 2010-06-30|15:57 |
0 | 1.97 kB | |
LICENSE.txt | 17.67 kB | 2012-05-25|19:14 |
NOTICE.txt | 435.00 B | 2012-05-25|19:14 |
0 | 1.97 kB | |
readme.txt | 133.00 B | 2012-06-20|19:06 |
0 | 1.97 kB | |
App.ico | 1.05 kB | 2005-12-02|00:29 |
AssemblyInfo.cs | 2.37 kB | 2005-12-02|00:29 |
Pdf2Text.csproj | 6.82 kB | 2014-11-27|14:17 |
Pdf2Text.sln | 900.00 B | 2012-06-20|11:04 |
Program.cs | 1.12 kB | 2014-11-27|13:35 |
0 | 1.97 kB |
Sponsored links
Comments
(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
niuwa
2016-06-13
这个文件非常有用,学习了
- 1
- Page 1
- Total 1