html-to-docx
html-to-docx copied to clipboard
Margins don't work
const options = {
margins: {
top: 10000, // Set the top margin to 1 centimeter
right: 2400, // Set the right margin to 2 centimeters
left: 5000 // Set the left margin to 2 centimeters
},
pageNumber: true,
font: 'Arial',
fontSize: 18,
footer: true,
header: true,
}
This options object doesn't affect the exported document - did I create the object wrong?
Hey, if you are using the params to define you files' margins, you have to define all of the params :
// WILL WORK
{
"margins": {
"header": 240,
"footer": 240,
"top": 80,
"bottom": 80,
"left": 90,
"right": 90
}
}
// WON'T WORK
{
"margins": {
"header": 240,
"footer": 240,
"top": 80,
"bottom": 80,
"left": 90
// "right": 90
}
}
See #57 for more info