You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I have two issues about Section's page counting. I don't know if these are issues from my MS Office 2019 or they are from this library:
After I open the created document, the total amount of pages for a section is not refreshed correctly, and it displays different total numbers while navigating thru pages. It refreshes only after some pages are displayed. For example, if the first section have 11 pages, when I open the document it shows "Pg. 1 of 4", I scroll to the next page and it displays "Pg. 2 of 5", I continue to scroll to the next page and it displays "Pg. 3 of 11". Right now, if I scroll up to second or to the first page it display correctly "Pg 2 of 11" and "Pg 1 of 11".
In a document with multiple sections, the starting number for section starts correctly for first section, which is 1, but from the second section, all sections starts with number 2.
The text was updated successfully, but these errors were encountered:
valimaties
changed the title
Paragraph AppendSectionCount() starting number is wrong for a new section
Paragraph AppendPageNumber() starting number is wrong for a new section
Jan 26, 2023
for 2) Page Numbering, if you want each page number to start at 1 for each section of the document, you can do like that:
` var doc = DocX.Create( "test.docx" );
doc.InsertParagraph( "First Paragraph" );
doc.InsertSectionPageBreak();
doc.InsertParagraph( "Second Paragraph" ).InsertPageBreakAfterSelf();
doc.InsertParagraph( "new Paragraph of second section" );
doc.InsertSectionPageBreak();
doc.InsertParagraph( "Third Paragraph" );
foreach( var section in doc.Sections )
{
section.PageNumberType = new PageNumberType() { PageNumberStart = 1 };
}
doc.AddHeaders();
doc.Headers.Odd.InsertParagraph( "Page " ).AppendPageNumber( PageNumberFormat.normal ).Append( " of " ).AppendPageCount( PageNumberFormat.normal, true );
doc.Save();`
If you still have issues with page numbers, please send a sample showing the issue.
Hi.
I have two issues about Section's page counting. I don't know if these are issues from my MS Office 2019 or they are from this library:
The text was updated successfully, but these errors were encountered: