Add total number of pages in a section

This commit is contained in:
Forman
2019-08-09 11:56:22 +03:00
parent 3263984f03
commit a9fc40dad4
5 changed files with 91 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import {
SizeComplexScript,
Strike,
} from "./formatting";
import { NumberOfPages, Page } from "./page-number";
import { NumberOfPages, NumberOfPagesSection, Page } from "./page-number";
import { RunProperties } from "./properties";
import { RunFonts } from "./run-fonts";
import { SubScript, SuperScript } from "./script";
@ -92,6 +92,14 @@ export class Run extends XmlComponent {
return this;
}
public numberOfTotalPagesSection(): Run {
this.root.push(new Begin());
this.root.push(new NumberOfPagesSection());
this.root.push(new Separate());
this.root.push(new End());
return this;
}
public smallCaps(): Run {
this.properties.push(new SmallCaps());
return this;