Ziv-Barber / officegen

Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.
MIT License
2.64k stars 472 forks source link

How to make a particular page Orientation to A3 / Landscape ? #392

Open raghavan117 opened 2 years ago

raghavan117 commented 2 years ago

1) I am generating a word document. I need to change the page orientation of the word file - generally it would be A4/ Potrait , i want to have it as A3/Landscape to accommodate my table. Is it possible to implement with OfficeGen ??

2) Table size is not changing

I tried below code. Kindly check the same var tableStyle = { tableColWidth: 4210, // This is not working tableSize: 90, // This is not working tableColor: "ada", tableAlign: "center", tableFontFamily: "Arial", }

Kindly let me know the fixes for both the issues

2284730142 commented 2 years ago
  1. You can get it in the document linked https://github.com/Ziv-Barber/officegen/blob/87dd5501968501555ea3bee60043affc9f67c1fa/manual/docx/README.md below(The document object's settings).
  2. The table plug-in has less content, but there is no problem with the basic configuration
zz570557024 commented 2 years ago

Q1:

...
let docx = officegen({
    type: 'docx',
    pageSize: 'A3',
    columns: 2
})
...