2022.2

Table Of Contents
if (merge.context.type == ContextType.PRINT) {
merge.context.sections['Section A'].restartPageNumber = true;
merge.context.sections['Section B'].restartPageNumber = true;
merge.context.sections['Section C'].restartPageNumber = false;
merge.context.sections['Section D'].restartPageNumber = true;
}
Thepagenumberingintheoutputwillbe:
1. SectionApage1
2. SectionBpage1
3. SectionCpage2
4. SectionDpage1
Disabled section
Whenasectionisdisabled,itwillnotbeoutputted,butitsrestartPageNumberflagwillstillbetaken
intoaccountforcomposingthepagenumbersequences.So,iftherestartPageNumberflagsareset
asfollows:
1. SectionA(1page)restartPageNumber=true
2. SectionB(2pages)restartPageNumber=false
3. SectionC(3pages)restartPageNumber=true,enabled=false
4. SectionD(4pages)restartPageNumber=false
Incode:
if (merge.context.type == ContextType.PRINT) {
merge.context.sections['Section A'].restartPageNumber = true;
merge.context.sections['Section B'].restartPageNumber = false;
merge.context.sections['Section C'].restartPageNumber = true;
merge.context.sections['Section C'].enabled = false;
merge.context.sections['Section D'].restartPageNumber = false;
}
Thepagenumberingintheoutputwillbe:
1. SectionApage1
2. SectionBpage2
3. SectionDpage1(pagenumberingisrestartedduetosectionC'srestartPageNumber=true)
Page 842