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

202
Views
url doesn't work after splitting it using splitTextToSize() in jsPDF

I have a very big URL which I splitted using the method below in jsPDF:

   var finalY=20;

   doc.setTextColor(255, 0, 0);

   doc.text(30,finalY,"APDJ");

   finalY+=2;

   doc.line(30,finalY,190,finalY);

   doc.setTextColor(0, 0, 255);

   for(var j=0; j<social_neg[i].length; j++){ //social_neg[] is a string of urls fetched from php server

       if(social_neg[i][j].length>60){

           var url = doc.splitTextToSize(social_neg[i][j],140);

           finalY+=20;

       }
       else{

           var url = social_neg[i][j];

           finalY+=15;

       }

       doc.text(40,finalY,url);

   }

   finalY+=20;

   doc.line(30,finalY,190,finalY);

My pdf:

Only the first line is clickable, the rest are not. Why?

As you can see, the first line of the url is clickable, the rest of the url isn't. Why is that? How do I fix this?

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