Files
docx-js/demo/demo7.js
2018-01-25 01:47:47 +00:00

15 lines
324 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 succesfully at project root!");