Every line of 'download pdf javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
41 _downloadPDF() { 42 const pageTitle = encodeURIComponent(document.getElementsByTagName('title')[0].innerText); 43 const currentUrlBase = document.location.href.replace('localhost:8081', 'staging.trase.earth'); 44 const currentUrl = encodeURIComponent(`${currentUrlBase}&print=true`); 45 const pdfUrl = `${PDF_DOWNLOAD_URL}?filename=${pageTitle}&url=${currentUrl}`; 46 window.open(pdfUrl, '_blank'); 47 }
29 function downloadPDFList() 30 { 31 $("#pdfType").attr('value', 'range'); 32 $("#pdfDate").attr('value', $("#date").attr('value')); 33 document.forms["pdf"].submit(); 34 }