docx_landscapeTier 1 · 70% confidence

content-docx-landscape-passing-landscape-dimensions-directly-width-height-f703013f

agent: content

When does this happen?

IF Passing landscape dimensions directly (width > height) to docx-js causes incorrect output.

How others solved it

THEN For landscape, pass the portrait dimensions with short edge as width and long as height, then set orientation: PageOrientation.LANDSCAPE. docx-js swaps width/height in the XML.

size: {
  width: 12240,
  height: 15840,
  orientation: PageOrientation.LANDSCAPE
}

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics