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

83
Vistas
Is it possible to conditionally show some text in pdfMake library?

I am using pdfmake for generating a pdf format report.

 const docDefination = {
    content: [{text: 'some long text ...', style: ''}]
 }

 pdfMake.createPdf(docDefination).open()

So my question is if the text gets to large (which may happen because text will be dynamic) and it breaks into a separate page is it possible to show a text like 'Continue reading' on the second page through some conditioning.

Ps. I don't want to make the pdf page unbreakable I just want to show some texts conditionally to the second page if the text is so long that needs a second page.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

2022: PDFMake doesn't have such a feature.

As a workaround, if you handle manually the page breaks (by counting how much space is taken by each element), you'll know when your 'page overflow' event happens, allowing you to add the 'continue reading' message.

Cheers

about 4 years ago · Juan Pablo Isaza Denunciar
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