diff --git a/.gitignore b/.gitignore index 4f8777b466..31ad548219 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,12 @@ docs/.nojekyll !.vscode/extensions.json .history +# IntelliJ +.idea + # Lock files package-lock.json +yarn.lock # Documents My Document.docx diff --git a/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts b/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts index a9d1ae46ee..e486ae5c72 100644 --- a/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts +++ b/src/file/document/body/section-properties/page-margin/page-margin-attributes.ts @@ -8,6 +8,7 @@ export interface IPageMarginAttributes { header?: number; footer?: number; gutter?: number; + mirror?: boolean; } export class PageMarginAttributes extends XmlAttributeComponent { @@ -19,5 +20,6 @@ export class PageMarginAttributes extends XmlAttributeComponent { header: 708, footer: 708, gutter: 0, + mirror: false, space: 708, linePitch: 360, headerId: 100, @@ -40,6 +41,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -69,6 +71,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -99,6 +102,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -124,6 +128,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], @@ -150,6 +155,7 @@ describe("SectionProperties", () => { "w:left": 1440, "w:header": 708, "w:gutter": 0, + "w:mirrorMargins": false, }, }, ], diff --git a/src/file/document/body/section-properties/section-properties.ts b/src/file/document/body/section-properties/section-properties.ts index c23964cd14..5042c8a3ab 100644 --- a/src/file/document/body/section-properties/section-properties.ts +++ b/src/file/document/body/section-properties/section-properties.ts @@ -38,6 +38,7 @@ export class SectionProperties extends XmlComponent { header: 708, footer: 708, gutter: 0, + mirror: false, space: 708, linePitch: 360, orientation: PageOrientation.PORTRAIT, @@ -69,6 +70,7 @@ export class SectionProperties extends XmlComponent { mergedOptions.header, mergedOptions.footer, mergedOptions.gutter, + mergedOptions.mirror, ), ); this.root.push(new Columns(mergedOptions.space));