We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

unable to get the page numbers

Thread ID:

Created:

Updated:

Platform:

Replies:

46009 Jul 4,2006 04:26 AM Jul 21,2006 03:00 PM Windows Forms 4
loading
Tags: PDF
Sharat Babu
Asked On July 4, 2006 04:26 AM

hi, am unable to get the page number with "#p;". It was fine if I generate document with Grid model, but it was not with Flow model. And, one more is how to get the total number of pages. I want to display for each page like "Page 1 of n, page 2 of n, ......" Thanks in advance, Sharat.

Ajish [Syncfusion]
Replied On July 4, 2006 08:13 AM

Hi Sharat, Thank you for your interest in Essential PDF. 1) In Grid model to get page number of the current page use #p; and to get the total number of pages you can use #P; Here is the sample which does the above and displays footer with Page X of Y format: GridModel.zip You can also get the total page number using the following code. doc.pages.count; 2) You can get the page number in flow model too using #p; and #P; Here is a sample for doing this in flow model: FlowModelSample.zip However please note that the #p; symbolic representation has its limitation it can only be used with TemplateArea. Please take a look and let me know if you have any other questions. Thanks, Ajish.

Sharat Babu
Replied On July 4, 2006 09:25 AM

Hi Ajish, Thanks for your response, it was working fine with TemplateArea. Thanks, Sharat. >Hi Sharat, > >Thank you for your interest in Essential PDF. > >1) In Grid model to get page number of the current page use #p; and to get the total number of pages you can use #P; > >Here is the sample which does the above and displays footer with Page X of Y format: GridModel.zip > >You can also get the total page number using the following code. > >doc.pages.count; > >2) You can get the page number in flow model too using #p; and #P; > >Here is a sample for doing this in flow model: FlowModelSample.zip > >However please note that the #p; symbolic representation has its limitation it can only be used with TemplateArea. > >Please take a look and let me know if you have any other questions. > >Thanks, >Ajish.

Robert Rhoden
Replied On July 21, 2006 02:47 PM

Does #p; and #P; also work in Visual Basic? I have tried to do this and it just shows a blank space where the page numbers should be.

>Hi Sharat,
>
>Thank you for your interest in Essential PDF.
>
>1) In Grid model to get page number of the current page use #p; and to get the total number of pages you can use #P;
>
>Here is the sample which does the above and displays footer with Page X of Y format: GridModel.zip
>
>You can also get the total page number using the following code.
>
>doc.pages.count;
>
>2) You can get the page number in flow model too using #p; and #P;
>
>Here is a sample for doing this in flow model: FlowModelSample.zip
>
>However please note that the #p; symbolic representation has its limitation it can only be used with TemplateArea.
>
>Please take a look and let me know if you have any other questions.
>
>Thanks,
>Ajish.

Ajish [Syncfusion]
Replied On July 21, 2006 03:00 PM

Hi Robert,

The Symbolic constants #p; and #P; to display page numbers will work on VB.Net applications too. However note that the #p; symbolic representation has its limitation it can only be used with TemplateArea.

Here is a sample for your reference:
Page Numbers.zip


Please take a look and let me know if you have any questions.

Thanks,
Ajish.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;