DOCX Demo 7

node v8.16.2
version: 1.0.0
endpointsharetweet
// docx landscape demo const docx = require('docx'); var express = require("@runkit/runkit/express-endpoint/1.0.0"); var app = express(exports); app.get("/", (req, res) => { var doc = new docx.Document(undefined, { orientation: "landscape", }); var paragraph = new docx.Paragraph("Hello World"); doc.addParagraph(paragraph); const expressPacker = new docx.ExpressPacker(doc, res); expressPacker.pack("Document"); });
Loading…

no comments

    sign in to comment