如何在C#中从pdf阅读 [英] How read from pdf in C#
本文介绍了如何在C#中从pdf阅读的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨 我想从C#.net中的pdf中读取或通过C#.net将pdf转换为text(string)
Hi i want read from pdf in C#.net or Convert pdf to text(string) by C#.net
推荐答案
//您必须下载ABCpdf.dll
使用WebSupergoo.ABCpdf5;
公共字符串GetText(字符串fileName)
{
Doc pdfDoc = new Doc();
pdfDoc.Read(fileName);
字符串内容= pdfDoc.GetText(").ToString();
pdfDoc.Dispose();
返回内容;
}
//you have to download ABCpdf.dll
using WebSupergoo.ABCpdf5;
public string GetText(string fileName)
{
Doc pdfDoc = new Doc();
pdfDoc.Read(fileName);
string contents = pdfDoc.GetText("").ToString();
pdfDoc.Dispose();
return contents;
}
有很多第三方帮助您解析PDF.
检查
http://naspinski.net/post/ParsingReading- a-PDF-file-with-C-and-AspNet-to-text.aspx [ http://codingforums.com/showthread.php?t=169997 [
There are lot of 3rd party around which helps you to parse PDF.
Check
http://naspinski.net/post/ParsingReading-a-PDF-file-with-C-and-AspNet-to-text.aspx[^]
http://codingforums.com/showthread.php?t=169997[^]
etc
请参见此处 [
这篇关于如何在C#中从pdf阅读的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文