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

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