Estoy usando la biblioteca FileSaver.js y WordExport.js para exportar los documentos de Word usando JavaScript, jQuery, todo funciona bien, pero el margen de la página no funciona, lo probé de varias maneras pero no pude tener éxito, aquí está el código. siguiente div será exportado
<div class="col-md-12" id="page-content"> <style type="text/css"> @page { mso-page-orientation: portrait; size: 21cm 29.7cm; margin: 1cm 1cm 1cm 1cm; } @page Section1 { mso-header-margin: .2in; mso-footer-margin: .5in; mso-header: h1; mso-footer: f1; } div.Section1 { page: Section1; } </style> <div class="firstpage Section1" style="margin:10.0pt 20.0pt 10.0pt 20.0pt; !important"> <h2>Topic of template</h2> <h5>Prepared for</h5> <h5>Name of Company</h5> <br clear=all style='mso-special-character:line-break; page-break-before:always'> </div> <br clear=all style='page-break-before:always; mso-break-type:section-break'> <div class="otherpages"> <p>other pages stuff</p> </div> </div>
Gracias por adelantado.