Files
docx-js/demo/demo17.js

18 lines
522 B
JavaScript
Raw Normal View History

2018-06-27 23:36:04 +01:00
const docx = require('../build');
var doc = new docx.Document();
var paragraph = new docx.Paragraph("Hello World").referenceFootnote(1);
2018-06-30 23:50:11 +01:00
var paragraph2 = new docx.Paragraph("Hello World").referenceFootnote(2);
2018-06-27 23:36:04 +01:00
doc.addParagraph(paragraph);
2018-06-30 23:50:11 +01:00
doc.addParagraph(paragraph2);
2018-06-27 23:36:04 +01:00
doc.createFootnote(new docx.Paragraph("Test"));
2018-06-30 23:50:11 +01:00
doc.createFootnote(new docx.Paragraph("My amazing reference"));
2018-06-27 23:36:04 +01:00
var exporter = new docx.LocalPacker(doc);
exporter.pack('My Document');
console.log('Document created successfully at project root!');