Generate print-ready PDFs from Plan B Network courses and quizzes — directly in the browser.
Live: content-to-pdf.workers.rocks
- Course — Text and images only, clean print layout
- Full Course — Tutorials, resources, and QR codes linking to external content
- Quiz — Randomized multiple-choice questions with answer key
- Teacher Guide — Ready to Teach companion (BETA)
- 48+ courses across 30+ languages
- Cover page, table of contents, page numbers, and final page with credits
- No Puppeteer — uses browser
window.print()with print-optimized CSS
- SvelteKit 2 + Svelte 5 (runes)
- Tailwind CSS v4
- TypeScript
- Deployed on OpenWorkers (Cloudflare Workers edge)
All content is fetched at runtime from GitHub — no local repos needed:
- Courses & quizzes from bitcoin-educational-content (
devbranch) - i18n labels from bitcoin-learning-management-system (
mainbranch) - Tutorial metadata from the Plan B Network API
Select a course, language, and PDF type in the UI, preview the result, then print/save as PDF.
git clone https://github.com/PlanB-Network/content-to-pdf.git
cd content-to-pdf
npm install
npm run devOpen localhost:5173.
# Production
npm run deploy
# Staging
npm run deploy:devsrc/
├── lib/
│ ├── components/ # Svelte UI components
│ ├── server/
│ │ └── github.ts # GitHub content fetching + caching
│ ├── templates/
│ │ ├── cover.ts # Cover page HTML
│ │ ├── course.ts # TOC, course body, final page
│ │ ├── quiz.ts # Quiz body + answer key
│ │ └── styles.ts # Print CSS + page footer
│ ├── markdown.ts # Markdown parsing + resource cards
│ ├── types.ts # TypeScript types
│ └── i18n.ts # Locale loading with fallback
└── routes/
├── +page.svelte # Main UI
├── best-practices/ # Print best practices page
└── api/
├── courses/ # GET — list all courses
├── languages/ # GET — languages for a course
└── generate/ # POST — generate HTML document
MIT