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

85
Views
Save uploaded img with conditions JSPDF

I have this code to save in pdf:

          doc.addImage(imagen, 'JPEG', 7, 157, 94,59);
          doc.addImage(imagen2, 'JPEG', 108, 157, 94,59); 
          doc.addImage(imagen3, 'JPEG',7,180,94,59);
          doc.addImage(imagen4, 'JPEG',108,180,94,59);
          doc.save("myfile.pdf);

Here i have 4 upload input with this id's: imagen, imagen2, imagen3 and imagen4. What's the problem: The only way that saves the pdf is if i just upload the 4 image at the same time, if i try to upload 1 or 2 or 3 images won't saves the pdf.

It looks like that i need to use a conditions here, but i don't know how to implemented. Thank you again.

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!