Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

html2pdf cdn

// Add follwoing cdn before end of body
// <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js" integrity="sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
  var element = document.getElementById('element-to-print'); //' select div which needs to be dowloaded as pdf
  html2pdf(element);
</script>
Source by ekoopmans.github.io #
 
PREVIOUS NEXT
Tagged: #cdn
ADD COMMENT
Topic
Name
1+5 =