caiyexiang / html-docx-js-typescript

Convert HTML documents to docx format.
MIT License
85 stars 18 forks source link

Margins not taken into account #24

Closed klaaslauwers closed 1 year ago

klaaslauwers commented 1 year ago

Hi @caiyexiang !

Whatever I try, the margin options are not taken into account. I don't want any margins for my document, and I want it to be in landscape mode:

   const opt = {
      margin: {
        top: 0,
        left: 0, 
        right: 0, 
        bottom: 0,
        header: 0, 
        footer: 0, 
        gutter: 0
      },
      orientation: 'landscape' as const
    }

Whatever I enter in the margin object, the margins are always 1 inch in the exported document: image

Am I missing something here?

Thanks in advance for helping me out.

Kr Klaas

klaaslauwers commented 1 year ago

Yeah, I need to learn to type margins in stead of margin 🥇 Anyhow, fixed :-)