how can find the number of pages in pdf file.

Posted by Bageshkumarbagi under C# on 1/3/2014 | Points: 10 | Views : 1434 | Status : [Member] | Replies : 3
hi all,

i am using
PdfReader pdfr = new PdfReader(strFilePath);
TextBox1.Text = pdfr.NumberOfPages.ToString();

but my problem is the it capture page number of some pdf file and some time it does not capture the page number. I am using itextsharp.dll
plese give some solutation. its urgent

Thanks in Advance.

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied



Responses

Posted by: Bandi on: 1/3/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://stackoverflow.com/questions/320281/determine-number-of-pages-in-a-pdf-file
http://stackoverflow.com/questions/12747533/how-to-get-the-number-of-pages-inside-each-pdf-document-inside-a-directory

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bageshkumarbagi on: 1/3/2014 [Member] Starter | Points: 25

Up
0
Down
geting this error

Rebuild faild: Input string was not in a correct formate.: original message: PDF startxref not fount.

Thanks,
Bagesh Kumar Singh
Mark as answer if you have been satisfied

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hongdida on: 4/23/2014 [Member] Starter | Points: 25

Up
0
Down
Check this post which offers severl ways to count the PDF page number, very useful

http://stackoverflow.com/questions/14644353/get-the-number-of-pages-in-a-pdf-document
http://www.rasteredge.com/how-to/vb-net-imaging/pdf-processing/

Bageshkumarbagi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response