async function renderPage(pageNum) { try { const page = await pdfDoc.getPage(pageNum); const width = parseInt(displayWidth.value); const height = parseInt(displayHeight.value); const viewport = page.getViewport({ scale: 1 }); const scale = Math.min(width / viewport.width, height / viewport.height); const scaledViewport = page.getViewport({ scale: scale }); canvas.width = scaledViewport.width; canvas.height = scaledViewport.height; const renderContext = { canvasContext: ctx, viewport: scaledViewport }; await page.render(renderContext).promise; } catch (error) { console.error(`Error rendering page ${pageNum}:`, error); showStatus(`Error rendering page ${pageNum}`, 'error'); } } function updatePageNumber() { currentPageNum.textContent = currentPage; } PDF Flipbook - TV Display

⚙️ Admin Panel

Flipbook Configuration

📺 Display Mode

📄 PDF Mode
🌐 iFrame Mode

📄 PDF Settings

🌐 iFrame Settings

💡 Paste the complete iFrame code from your flipbook provider (Issuu, FlipHTML5, Publuu, Yumpu, etc.). The system will try multiple methods to control page turning automatically.

⚠️ Note: Due to browser security, some iFrames from external sites may not allow automatic control. If auto-flip doesn't work, try using the PDF mode instead or ensure the iFrame source allows cross-origin scripting.

⏱️ Auto-Flip Settings

Ready to configure display
Loading...
-2.5 0v-3.5zm3.5 0a1.25 1.25 0 1 1 2.5 0v3.5a1.25 1.25 0 1 1