从.pdf文件读取数据 [英] read data from .pdf file
本文介绍了从.pdf文件读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,我的代码可以访问.pdf文件并读取一些属性.
问题:
如何扩展我的C#代码,以便我可以阅读.pdf文件第二页上txtLastname控件内的文本?
谢谢
现有代码:
Hi,
At present, my code can access a .pdf file and read a few properties.
Question:
How is it possible to extend my c# code so that I can read the text inside txtLastname control which is on the second page of the .pdf file?
Thanks
Existing code:
PdfReader reader = new PdfReader(@"D:\test.pdf");
// total number of pages
int n = reader.NumberOfPages;
// size of the first page
Rectangle psize = reader.GetPageSize(1);
// file properties
Dictionary<string, string> infodict = reader.Info;
foreach (KeyValuePair<string, string> kvp in infodict)
Console.WriteLine(kvp.Key + " => " + kvp.Value);
推荐答案
您是否正在寻找类似本文的内容: ^ ]?也许其中一项可以帮助您:
http://stackoverflow.com/Questions/2550796/reading-pdf-content-with-itextsharp-dll-in-vb-net-or-c-sharp [ http://forums.asp.net/t/1218513.aspx [
Are you looking for something like in this article: A PDF Forms Parser[^]? Or maybe one of these will help you:
http://stackoverflow.com/questions/2550796/reading-pdf-content-with-itextsharp-dll-in-vb-net-or-c-sharp[^]
http://forums.asp.net/t/1218513.aspx[^]
Regards,
Manfred
请参阅我的先前的答案 [
See my previous answer[^] for similar question.
这篇关于从.pdf文件读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文