Hi, I need to add the page number on each page’s footer, the problem here is how can I give some formatting using HTML? for example I am looking to apply this on the footer but to achieve that I need that $$Page is a wildcard on aspose.words or something like that, is that possible? Here is the sample html that I would like to insert on my footer:
You can insert HTML into Word document using DocumentBuilder.InsertHtml method. If you want to insert HTML with PAGE and NUMPAGES fields, you can insert HTML snippet as shown below.
You may also insert your shared HTML into Word document and use find and replace feature to replace the text with PAGE and NUMPAGES fields. Please read the following articles. Find and Replace Working with Fields
is it possible that the snippet can automatically enumerate word pages alone instead of me coding it doing a for each page? @tahir.manzoor I mean something like this:
dBuilder.InsertField("<div style='font-size:12pt;font-family:Verdana;'><p style='text-align: right;'>{{PAGE}}</p></div>");
where {{PAGE}} is the field that aspose.words will be replacing with proper page number on each page, can that be achieved? or should I need to code this for each page and setting the right counter number per page?
It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.