Chicago Citation Generator

Chicago Citation Generator

Create citations in the Chicago Manual of Style (17th Edition).

${currentCitations.ad}

`; pdfContentEl.innerHTML = reportHTML; pdfContentEl.style.display = 'block'; const { jsPDF } = window.jspdf; const canvas = await html2canvas(pdfContentEl, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF('p', 'mm', 'a4'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save('chicago-citation.pdf'); } catch (error) { console.error('PDF Generation Error:', error); alert('An error occurred while creating the PDF.'); } finally { document.getElementById('pdf-content').style.display = 'none'; document.getElementById('pdf-content').innerHTML = ''; pdfBtn.textContent = 'Download as PDF'; pdfBtn.disabled = false; } } });
Scroll to Top