Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 使用iTextSharp搜索PDF文档时,如何获取找到匹配项的页码_Vb.net - Fatal编程技术网

Vb.net 使用iTextSharp搜索PDF文档时,如何获取找到匹配项的页码

Vb.net 使用iTextSharp搜索PDF文档时,如何获取找到匹配项的页码,vb.net,Vb.net,我正在尝试提取搜索字符串所在的页码 请参见下面我的部分代码: For Each match As Match In Regex.Matches(TextPDF,nino_pattern,RegexOptions.IgnoreCase) nino_pattern = match.Value page = code to get the page number where the search string is found ToalPage = Reader.Numb

我正在尝试提取搜索字符串所在的页码

请参见下面我的部分代码:

For Each match As Match In Regex.Matches(TextPDF,nino_pattern,RegexOptions.IgnoreCase)
     nino_pattern = match.Value
     page = code to get the page number where the search string is found
     ToalPage = Reader.NumberOfPages
     FileWriter.WriteLine(filename & vbTab & nino_pattern & vbTab & Page & ToalPage)
Next

如果它是VB.net,为什么要把它标记为c?如果答案是c,我可以将代码转换成VBnet。它可能是c中的副本,但会完全满足您的需要。