Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

77
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!