diff --git a/src/export/packer/compiler.ts b/src/export/packer/compiler.ts index 6ee1665074..c912054510 100644 --- a/src/export/packer/compiler.ts +++ b/src/export/packer/compiler.ts @@ -40,6 +40,7 @@ export class Compiler { const xmlFooterRelationships = xml(this.formatter.format(this.file.Footer.Relationships)); const xmlContentTypes = xml(this.formatter.format(this.file.ContentTypes)); const xmlAppProperties = xml(this.formatter.format(this.file.AppProperties)); + const xmlFootnotes = xml(this.formatter.format(this.file.FootNotes)); this.archive.append(xmlDocument, { name: "word/document.xml", @@ -73,6 +74,10 @@ export class Compiler { name: "word/footer1.xml", }); + this.archive.append(xmlFootnotes, { + name: "word/footnotes.xml", + }); + this.archive.append(xmlRelationships, { name: "word/_rels/document.xml.rels", }); diff --git a/src/file/file.ts b/src/file/file.ts index b207065e8f..627b5e79be 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -82,6 +82,12 @@ export class File { "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", "footer1.xml", ); + + this.docRelationships.createRelationship( + 5, + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", + "footnotes.xml", + ); this.media = new Media(); this.headerWrapper = new HeaderWrapper(this.media); diff --git a/src/file/relationships/relationship/relationship.ts b/src/file/relationships/relationship/relationship.ts index 3986451257..92553a38f3 100644 --- a/src/file/relationships/relationship/relationship.ts +++ b/src/file/relationships/relationship/relationship.ts @@ -14,7 +14,8 @@ export type RelationshipType = | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" - | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"; + | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" + | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes"; export type TargetModeType = "External";