niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.47k stars 4.8k forks source link

generarPDF(row: any) { const div = document.getElementById('content'); const options = { background: 'white', scale: 2, dpi: 300, useCORS: true, // pdf clarity }; // Check if the element is not null before using it if (div) { // Get the total height of the scrollable content const totalHeight = div.scrollHeight; // Set the height of the container to capture the entire content div.style.height = totalHeight + 'px'; // Scroll to the specified position window.scrollTo({ top: -window.scrollY, left: 0, behavior: 'smooth' // You can change this to 'auto' for instant scrolling }); // Wait for scrolling to complete // Adjust the timeout as needed } else { console.error('Element with the specified ID not found.'); } } #3136

Open ragavanramadass opened 9 months ago

ragavanramadass commented 9 months ago

I have generaratePDF function but I have 9 sheet to downloading file but first sheet only dates show remining sheets are came in empty so please give the correct solutions