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

139
Views
cambiar el tamaño del PDF incrustado en javascript

novato aquí, quiero que el PDF incrustado aparezca con 100% de ancho y 97,5% de alto, pero no puedo resolverlo

 <style>.size { width:100%; height:97.5%; } </style> <button type="button" id="show" onclick="PDFshow(this); classadd()" >PDF anzeigen</button> <div id="pdfsize"> <script> function PDFshow(x) { x.style.visibility = 'hidden'; var x = document.createElement("EMBED"); x.setAttribute("src", "Doku.pdf"); document.body.appendChild(x); } </script> </div> <script> function classadd() { var element = document.getElementById("pdfsize"); element.classList.add("size"); } </script>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Agregue esto después de x.setAttribute("src", "images/application-form.pdf"); :

 x.setAttribute("width", "100%"); x.setAttribute("height", "97.5%");

puede eliminar el código css de .size y agregar altura en la etiqueta del cuerpo de 100vh.

about 4 years ago · Juan Pablo Isaza Report

0

<button type="button" id="show" onclick="showPDF(this)" >PDF anzeigen</button> <script> function showPDF(x) { x.style.display = "none"; var x = document.createElement("EMBED"); x.setAttribute("src", "Doku.pdf"); x.classList.add("size"); document.body.appendChild(x); } </script>
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!