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

280
Views
¿Hay alguna manera de poner un Pdf dentro de un modal Swal?

Estoy creando un botón para que cuando el usuario haga clic, abra un Swal... la cosa es, ¿cómo puedo poner una vista de PDF dentro de ese swal modal, sin enviar al usuario a otra página?

¿Es posible hacer eso usando la biblioteca Sweet Alert? ¿Cómo puedo hacer eso?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede agregar algún código html dentro de SweetAlert.

 Swal.fire({ title: '<strong>HTML <u>example</u></strong>', icon: 'info', html: 'You can use <b>bold text</b>, ' + '<a href="//sweetalert2.github.io">links</a> ' + 'and other HTML tags', showCloseButton: true, showCancelButton: true, focusConfirm: false, confirmButtonText: '<i class="fa fa-thumbs-up"></i> Great!', confirmButtonAriaLabel: 'Thumbs up, great!', cancelButtonText: '<i class="fa fa-thumbs-down"></i>', cancelButtonAriaLabel: 'Thumbs down' })

Y luego intente agregar su pdf con incrustación, por ejemplo:

 <embed src="files/Brochure.pdf" type="application/pdf" width="100%" height="600px" />

Referencias:

https://dulcealert2.github.io/

https://www.codexworld.com/embed-pdf-document-file-in-html-web-page/

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!