A modern web application that converts any webpage into a downloadable PDF using Flask, Playwright, and a responsive frontend with TailwindCSS + Alpine.js.
- Input any URL and generate a high‑fidelity PDF.
- Preview the website thumbnail before conversion.
- Customize page size (A4/Letter), margin, dark mode, and JavaScript wait time.
- Clean, modern UI with gradient background and smooth animations.
- Error handling for invalid URLs, timeouts, and blocked sites.
- Fully responsive and mobile‑friendly.
- Backend: Python 3.8+, Flask, Playwright (async)
- Frontend: TailwindCSS (CDN), Alpine.js
- Deployment: Runs locally, easy to deploy on Render, Railway, or any WSGI‑compatible host.
- Clone the repository:
git clone https://github.com/mustapha-devstack/website-to-pdf.git cd website-to-pdf playwright install chromium