First page footer is not working!
See original GitHub issueI have found this code through one of the pull requests/threads. It is supposed to work but somehow it is creating an empty page for first
attribute. default
is working as it is supposed to.
const footer1 = doc.createFooter();
footer1.createParagraph('Footer on another page');
const footer2 = doc.createFooter();
footer2.createParagraph('Footer on first page');
doc.addSection({
footers: {
default: footer1,
first: footer2
},
pageNumberStart: 1
});
version: 4.7.1
What could be the possible reason for this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
"Different first page" does not seem to work
Use a Next Page Section Break from the Page Layout tab's Page Setup, Breaks to separate page 1 from the rest of the...
Read more >Word 2010 header "different first page" option does not ...
Try creating a new section break between your first and second pages. Then try the header for the first page and preset for...
Read more >Headers in Word – "Different first page" issue
In a book I'm writing, I start each new chapter with a section break (next. Naturally I don't want a header on the...
Read more >Make the First Page Header or Footer Different in Word
Go to the Header & Footer tab, click the Header or Footer icon, select a format if desired, and type the new information...
Read more >uncheck Different first page option without losing its content
The link to previous/same as previous setting refers to the equivalent header/footer in the previous Section of the document, not to a different ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
demo14 doesnt work
Got it working, you need the
titlePage
attribute for first page headers and footers to workI have amended demo 14 to showcase this:
https://github.com/dolanmiu/docx/blob/master/demo/14-page-numbers.ts