PDF to PPT Converter - Professional Conversion ToolPDF to PPT Converter 🔄 Reset 📁 Upload PDF No PDF loaded ← Page 1 of 1 →📄No PDF SelectedUpload a PDF file to start conversion `;// Create and download the HTML file const blob = new Blob([pptHTML], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${pdfFileName}_presentation.html`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url);showMessage('Presentation downloaded successfully!');} catch (error) { console.error('Error creating presentation:', error); showMessage('Error creating presentation file.', 'error'); } }async function downloadImages() { if (extractedImages.length === 0) { showMessage('No images to download. Please convert a PDF first.', 'error'); return; }try { const zip = new JSZip(); const folder = zip.folder("pdf_pages");// Add each image to the zip extractedImages.forEach((imageInfo, index) => { const base64Data = imageInfo.imageData.split(',')[1]; folder.file(`page_${imageInfo.pageNumber.toString().padStart(3, '0')}.png`, base64Data, {base64: true}); });// Generate and download the zip file const content = await zip.generateAsync({type: "blob"}); const url = URL.createObjectURL(content); const a = document.createElement('a'); a.href = url; a.download = `${pdfFileName}_images.zip`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url);showMessage('Images downloaded successfully!');} catch (error) { console.error('Error creating zip file:', error); showMessage('Error creating zip file.', 'error'); } }function resetConverter() { currentPDF = null; currentPage = 1; totalPages = 0; pdfFileName = ''; extractedImages = []; document.getElementById('fileInput').value = ''; document.getElementById('progressSection').style.display = 'none'; document.getElementById('downloadSection').style.display = 'none'; document.getElementById('convertBtn').disabled = true; showEmptyState(); showMessage('Converter reset successfully!'); }// Keyboard shortcuts document.addEventListener('keydown', function(e) { if (e.ctrlKey || e.metaKey) { switch(e.key) { case 'o': e.preventDefault(); document.getElementById('fileInput').click(); break; case 'r': e.preventDefault(); resetConverter(); break; } } // Page navigation if (currentPDF) { if (e.key === 'ArrowLeft') { previousPage(); } else if (e.key === 'ArrowRight') { nextPage(); } } });