Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Margin is not Working on Exported MS Word Document Pages

I'm using FileSaver.js library and WordExport.js for exporting the word documents using JavaScript, jQuery, everything is working fine, but page margin is not working, i have tried it with multiple ways but couldn't get success, here is the code. following div will be exported

<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>

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda