You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gabe Webb edited this page Mar 20, 2025
·
1 revision
Sections can be used to determine page size and a few other things. Unlike the actual OOXML structure
itself, in docxml sections are components that wrap the section contents. Their use is entirely
optional.
/** @jsx Docx.jsx */importDocx,{cm,Paragraph,Section,Text}from'docxml';awaitDocx.fromJsx(<SectionpageWidth={cm(20)}pageHeight={cm(20)}><Paragraph><Text>This is a square page</Text></Paragraph></Section>,).toFile('sections.docx');