-1
A
回答
-2
我觉得iTextSharp的是最流行的一个,即使有其他几个库像 iText.Net,PDF夏普,夏普等PDF谷歌 它,你会发现他们中的很多。我已经使用iTextSharp,我喜欢它。
+0
OP说他已经使用iTextsharp,所以你可以详细说明一下你的答案是关于? – yms 2012-07-24 14:34:16
0
iTextSharp的是相当不错的,并且很容易实现。这里是阅读PDF格式,并把文字转换成字符串,然后打印出来,以标签的web表单页面上的一个小例子:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using iTextSharp.text.pdf;
using iTextSharp.text.pdf.parser;
namespace pdfreadertest
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetTextFromPDFFile(@"c:\example.pdf", 1);
}
public void GetTextFromPDFFile(string pdfFile, int pageNumber)
{
// Call the reader to read the pdf file
PdfReader pdfReader = new PdfReader(pdfFile);
// Extract the text from the pdf reader and put into a string
string pdfText = PdfTextExtractor.GetTextFromPage(pdfReader, pageNumber);
// Try and close the reader
try
{
pdfReader.Close();
}
catch{ }
// Put the string (pdf text) into a label to display on page
this.lblPdfText.Text = pdfText;
}
}
}
希望有所帮助。
+0
如何使用iTextsharp读取图像? – Sam 2012-07-13 11:45:07
相关问题
- 1. 在C#中阅读PDF
- 2. C++阅读PDF文件
- 3. 阅读C中的FAT12图像文件
- 4. 在Python阅读从图像文本硒
- 5. 带图像的IText Pdf阅读器
- 6. pdf文件文本阅读和搜索
- 7. 阅读PDF文件
- 8. 阅读PDF文件?
- 9. 阅读PDF文件
- 10. 写在PDF文件阅读
- 11. 异步阅读从Tesseract图像文本?
- 12. C#阅读文本文件
- 13. 阅读文本文件 - C++
- 14. C阅读文本文件
- 15. 阅读文本文件C#
- 16. 阅读文本文件C
- 17. 阅读文本文件C++
- 18. 在pdf中嵌入的pdf阅读pdf
- 19. 如何通过C#阅读pdf文件?
- 20. 阅读PDF文件,添加文字/图像,并写轨道
- 21. 阅读PDF使用C#.NET
- 22. 阅读pdf页数与C + +
- 23. 阅读图像或pdf使用C + +没有外部库
- 24. 在使用Apache POI和Apache PDF阅读器阅读文档,pdf文件中的错位文本框
- 25. 如何阅读PDF文本矩阵
- 26. 阅读c中的BMP图像
- 27. ITEXT PDF阅读器无法阅读PDF
- 28. C#流阅读器阅读文本文件到RichTextBox的插图中[]标签
- 29. 阅读文本使用C
- 30. 在电话中阅读pdf文件
检查这个http://stackoverflow.com/questions/2295555/how-to-convert-pdf-into-html-using-c-sharp – Matt 2012-07-13 10:53:45