From 57982f64c9e71954049948cf9a080724209bd2ad Mon Sep 17 00:00:00 2001 From: David Tarrant Date: Tue, 30 Jul 2024 11:27:10 +0100 Subject: [PATCH] Fixing table widths for Google Docs compatability --- lib/docxBuilder.js | 6 ++++++ package.json | 2 +- routes/auth.js | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/docxBuilder.js b/lib/docxBuilder.js index 1450219..069d531 100644 --- a/lib/docxBuilder.js +++ b/lib/docxBuilder.js @@ -194,6 +194,9 @@ async function buildDocx(project,metrics) { type: docx.PatchType.DOCUMENT, children: [ new docx.Table({ + columns: 2, + width: 0, + columnWidths: [7638,2000], // total page width is 9638 DXA for A4 portrait rows: [ new docx.TableRow({ children: [ @@ -233,6 +236,9 @@ async function buildDocx(project,metrics) { type: docx.PatchType.DOCUMENT, children: [ new docx.Table({ + columns: 6, + width: 0, + columnWidths: [3200,1606,1606,1606,1606,4800], // total page width is 9638 DXA for A4 portrait rows: [ new docx.TableRow({ children: [ diff --git a/package.json b/package.json index 69b8036..8292ab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "care.theodi.org", - "version": "2.7.0", + "version": "2.7.1", "description": "The ODI Care tool (AI enabled)", "main": "index.js", "scripts": { diff --git a/routes/auth.js b/routes/auth.js index 0cde451..74849b6 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -126,6 +126,4 @@ router.post('/local/password', ensureAuthenticated, async (req, res, next) => { } }); - - module.exports = router; \ No newline at end of file