added body
This commit is contained in:
12
ts/docx/document/body/columns.ts
Normal file
12
ts/docx/document/body/columns.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class Columns {
|
||||
private cols: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.cols = new Array<XmlComponent>();
|
||||
this.cols.push(new Attributes({
|
||||
space: "708"
|
||||
}));
|
||||
}
|
||||
}
|
12
ts/docx/document/body/doc-grid.ts
Normal file
12
ts/docx/document/body/doc-grid.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class DocumentGrid {
|
||||
private docGrid: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.docGrid = new Array<XmlComponent>();
|
||||
this.docGrid.push(new Attributes({
|
||||
linePitch: "360"
|
||||
}));
|
||||
}
|
||||
}
|
19
ts/docx/document/body/index.ts
Normal file
19
ts/docx/document/body/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
import {SectionProperties} from "./section-properties";
|
||||
import {PageSize} from "./page-size";
|
||||
import {PageMargin} from "./page-margin";
|
||||
import {Columns} from "./columns";
|
||||
import {DocumentGrid} from "./doc-grid";
|
||||
|
||||
export class Body {
|
||||
private body: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.body = new Array<XmlComponent>();
|
||||
this.body.push(new SectionProperties());
|
||||
this.body.push(new PageSize());
|
||||
this.body.push(new PageMargin());
|
||||
this.body.push(new Columns());
|
||||
this.body.push(new DocumentGrid());
|
||||
}
|
||||
}
|
18
ts/docx/document/body/page-margin.ts
Normal file
18
ts/docx/document/body/page-margin.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class PageMargin {
|
||||
private pgMar: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.pgMar = new Array<XmlComponent>();
|
||||
this.pgMar.push(new Attributes({
|
||||
top: "1440",
|
||||
right: "1440",
|
||||
bottom: "1440",
|
||||
left: "1440",
|
||||
header: "708",
|
||||
footer: "708",
|
||||
gutter: "0"
|
||||
}));
|
||||
}
|
||||
}
|
13
ts/docx/document/body/page-size.ts
Normal file
13
ts/docx/document/body/page-size.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class PageSize {
|
||||
private pgSz: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.pgSz = new Array<XmlComponent>();
|
||||
this.pgSz.push(new Attributes({
|
||||
w: "11906",
|
||||
h: "16838"
|
||||
}));
|
||||
}
|
||||
}
|
14
ts/docx/document/body/section-properties.ts
Normal file
14
ts/docx/document/body/section-properties.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import {XmlComponent, Attributes} from "../../xml-components";
|
||||
|
||||
export class SectionProperties {
|
||||
private sectPr: Array<XmlComponent>;
|
||||
|
||||
constructor() {
|
||||
this.sectPr = new Array<XmlComponent>();
|
||||
this.sectPr.push(new Attributes({
|
||||
rsidR: "00B64E8F",
|
||||
rsidRPr: "00D842E4",
|
||||
rsidSect: "000A6AD0"
|
||||
}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user