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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Page numbers in PDFLogicDocument

Thread ID:

Created:

Updated:

Platform:

Replies:

52808 Dec 5,2006 01:05 AM UTC Dec 7,2006 12:33 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
Kirk Franzen
Asked On December 5, 2006 01:05 AM UTC

I have some code which creates a PDF using the Flow model. I am able to successfully add a footer to the pages in the PDF, however, I cannot find anyway to add a page number to the footer.

It looks like the "#p;" is only supported by the TemplateArea functionality in the Grid model. Is there an equivilant in the Flow model? Or, just someway of adding page numbers using the Flow model?

Thanks.

Administrator [Syncfusion]
Replied On December 5, 2006 03:57 PM UTC

Hi kfranzen,

We do have support for add the page number in Flow model too, in which the page no can be added easily inside PDFTemplateArea using #p.

Code snippet (C#)
-----------------------
PDFTemplateArea template = ldoc.Areas.Add( new RectangleF(0,600,610,250));
TextShape txtShape = template.Canvas.AddText("Page #p; of the #P; pages");

Here is a sample for your reference.
PageNo(Flowmodel).zip

Could you please take a look at this and let me know if you have any other queries.

Regards,
Prakash.

Administrator [Syncfusion]
Replied On December 5, 2006 05:56 PM UTC

Prakash,
Thanks, that did the trick.

I do have one question. The PDFTemplateArea for the footer is added to the document not to a section. Yet in the code you posted a second PDFTemplateArea is added after the second Section is added to the document. Is this really necessary?

My code only has one section at the moment, but I would like to know for the future?

Thanks.

Administrator [Syncfusion]
Replied On December 7, 2006 12:33 AM UTC

Hi kfranzen,

It is not necessary to add the page footer to every section since we add it to the document directly. Its enough to add footer only once and the page footer will be added whenever we the new page is created.

Please let me know if you have any other queries.

Regards,
Prakash.









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

;