Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

32
Vistas
Puppeteer PDF Generation with Header and Footer on top of the PDF result

I am facing a problem putting the header/footer HTML on the puppeteer pdf result like floating instead of margins,

Is this even possible to make colored PDF with no white header and footer?

<div style="border-top: solid 1px #bbb; width: 100%; font-size: 9px;
   padding: 5px 5px 0; color: #bbb; position: relative;">
   <div style="position: absolute; left: 5px; top: 5px;">
      <span class="">
         <script>
            document.write(new Date().toLocaleTimeString('en-il',{
                year: 'numeric',
                month: 'numeric',
                day: 'numeric'
            })
            )
         </script>
      </span>
   </div>
   <div style="position: absolute; left: 250px; top: 5px;"><span>Generated By xxx</span></div>
   <div style="position: absolute; right: 5px; top: 5px;"><span class="pageNumber"></span>/<span class="totalPages"></span></div>
</div>

I am using bottom margin of 20.

TIA

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos