Files
docx-js/demo/demo7.js
2018-01-30 01:16:48 +00:00

15 lines
325 B
JavaScript

const docx = require("../build");
var doc = new docx.File(undefined, {
orientation: "landscape",
});
var paragraph = new docx.Paragraph("Hello World");
doc.addParagraph(paragraph);
var exporter = new docx.LocalPacker(doc);
exporter.pack("My Document");
console.log("Document created successfully at project root!");