question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

set page number in footer with logic?

See original GitHub issue

there is a way to calculate and display the page number with some index ? something like this ?

options.footer = { height: ‘50px’, contents: { default: <div style="display: inline; float: right">{{page + index}}</div> }

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
rodsguilhermecommented, Mar 25, 2022

In the example of the footer on the home page already shows how to count the pages.

this line makes it work automatically: <span style="color: #444;">{{page}}</span>/<span>{{pages}}</span>

1reaction
amarvadlacommented, Sep 30, 2020

for me this worked : it will generate a footer like page 1 of 4

paginationOffset: 1, “footer”: { “height”: “10mm”, “contents”: { // Any page number is working. 1-based index default: ‘<span style="color: #444; margin-top:5px"> page {{page}} of {{pages}}</span>’, // fallback value } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make Headers & Consecutive Page Numbers Using ...
Raffle Tickets Sequential Numbering in MS Word · Fix Your Page Numbers · MICROSOFT WORD TUTORIALS · Insert Anything into Headers and Footers...
Read more >
How can I insert page numbering field logic into a footer on my ...
The footer fields have some field logic in them based on the section, and basically I need to do the following: Restart page...
Read more >
Using sections to control page numbers, headers and footers
Using sections to control page numbers, headers and footers · Insert section breaks between the pages where the pagination style will change. ·...
Read more >
Add page numbers to a header or footer in Word
Add page numbers to a header or footer. Click or tap in the header or footer where you want the page numbers to...
Read more >
Inserting Page Numbers in Footers - The Collabora Office Help
Choose Insert - Field - Page Number. If you want, you can align the page number field as you would text. To Additionally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found