Files
docx-js/src/file/paragraph/run/page-number.ts
2022-10-29 03:10:29 +01:00

29 lines
827 B
TypeScript

import { SpaceType } from "@file/shared";
import { XmlComponent } from "@file/xml-components";
import { TextAttributes } from "./text-attributes";
export class Page extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("PAGE");
}
}
export class NumberOfPages extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("NUMPAGES");
}
}
export class NumberOfPagesSection extends XmlComponent {
public constructor() {
super("w:instrText");
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
this.root.push("SECTIONPAGES");
}
}