i am trying to use
{ sr = new streamreader([path of a pdf]) and matches = regex.Matches(sr.ReadToEnd(),“/Type\s*/Page[^s]”) } with { pages = matches.Count.ToString } to find out the total no. of pages of a pdf document.
However, this method may count more pages (e.g. 167 pages but the actual no. is 162 only). Is there any easy way to find the no. of pages of a pdf document??
Thanks a lot !!