A powerful, browser-based PDF document generator with rich text editing, 10 themes, templates, tables, and PWA support.
| Feature | Description |
|---|---|
| π Bullet & Numbered Lists | Add organized lists to your documents |
| π€ Headings (H1-H4) | Insert headings with one click |
| Left, Center, Right, Justify | |
| π 6 Templates | Resume, Invoice, Report, Letter, Notes, Blank |
| π Undo/Redo Buttons | Visual undo/redo in toolbar |
| π Tables Support | Insert custom tables (rows x columns) |
| π¨ 10 Themes | Dark Purple, Ocean Blue, Forest Green, and more |
| π± PWA Support | Install as app on any device |
| β¬οΈβ¬οΈ Subscript/Superscript | HβO, xΒ², etc. |
| Additional callout boxes |
- Bold, Italic, Underline,
Strikethrough - Subscript & Superscript
- 7 Font sizes (Tiny to Huge)
- Custom text colors (color picker + 9 quick colors)
- Text highlighting (color picker + 8 quick colors)
- Text alignment (Left, Center, Right, Justify)
- Headings (H1, H2, H3, H4)
- Undo/Redo support
- Bullet lists (unordered)
- Numbered lists (ordered)
- Editable list items
- Custom rows and columns
- Editable headers and cells
- Styled with alternating rows
- Upload images (JPG, PNG, GIF, WebP)
- Resize (25%, 50%, 75%, 100%)
- Align (Left, Center, Right)
- Add captions
- Max 10MB per image
- Syntax highlighting (10+ languages)
- Copy code button
- Tab support
- Proper line breaks
| Block | Description |
|---|---|
| π Text | Rich text content |
| π» Code | Syntax-highlighted code |
| πΌοΈ Image | Images with controls |
| π Table | Custom tables |
| π Bullets | Unordered lists |
| π’ Numbers | Ordered lists |
| π‘ Hint | Yellow hint box |
| β Solution | Green solution box |
| βΉοΈ Info | Blue info box |
| Orange warning box | |
| β Divider | Horizontal line |
| Template | Use Case |
|---|---|
| Blank | Start from scratch |
| Resume | Professional CV |
| Invoice | Business invoices |
| Report | Project reports |
| Letter | Formal letters |
| Notes | Study notes |
| Theme | Colors |
|---|---|
| Dark Purple | Purple & Blue |
| Ocean Blue | Teal & Navy |
| Forest Green | Green & Earth |
| Sunset Orange | Orange & Brown |
| Midnight | Black & Purple |
| Light Mode | White & Purple |
| Cyberpunk | Pink & Neon |
| Rose Gold | Pink & Gold |
| Nord | Arctic Blue |
| Dracula | Purple & Green |
- Install as app on phone/desktop
- Works offline (cached resources)
- Fast loading
- App-like experience
- 3x resolution (288 DPI)
- A4 size output
- All formatting preserved
- Images included
- Highlights work correctly
# Download files
# Open index.html in browsergit clone https://github.com/SudhirDevOps1/pdf-generator.git
cd pdf-generator
# Open index.html in browser# 1. Create repository on GitHub
# 2. Push your code
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/pdf-generator.git
git push -u origin main
# 3. Go to Settings β Pages
# 4. Select "main" branch, root folder
# 5. Save - Your site will be live at:
# https://YOUR_USERNAME.github.io/pdf-generator/# Option 1: Drag & Drop
# 1. Go to netlify.com
# 2. Drag your project folder to deploy
# Option 2: Connect GitHub
# 1. Connect your GitHub account
# 2. Select repository
# 3. Deploy automatically# 1. Install Vercel CLI
npm i -g vercel
# 2. Deploy
vercel
# Or connect GitHub for auto-deploy# 1. Go to Cloudflare Dashboard
# 2. Pages β Create project
# 3. Connect GitHub repository
# 4. Deploy# 1. Install Firebase CLI
npm install -g firebase-tools
# 2. Login
firebase login
# 3. Initialize
firebase init hosting
# 4. Deploy
firebase deploy- Go to Google AdSense
- Sign up / Login
- Add your site
- Get your ad code
<!-- In <head> section -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXXXXX" crossorigin="anonymous"></script>
<!-- Replace ad placeholder in sidebar with: -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXX"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>- Sidebar (current placeholder)
- Between pages (interstitial)
- Bottom of page
- After export (success page)
| Shortcut | Action |
|---|---|
Ctrl + S |
Save document |
Ctrl + B |
Bold |
Ctrl + I |
Italic |
Ctrl + U |
Underline |
Ctrl + Z |
Undo |
Ctrl + Y |
Redo |
Escape |
Close modals |
pdf-generator/
βββ index.html # Main application
βββ manifest.json # PWA manifest
βββ sw.js # Service worker
βββ README.md # Documentation
βββ LICENSE # MIT License
| Technology | Purpose |
|---|---|
| HTML5 | Structure |
| CSS3 | Styling |
| JavaScript ES6+ | Functionality |
| Tailwind CSS | Utility styling |
| jsPDF | PDF generation |
| html2canvas | HTML to image |
| Prism.js | Syntax highlighting |
| Font Awesome | Icons |
| Google Fonts | Typography |
| Service Worker | PWA/Offline |
| Scale | Resolution | File Size | Use Case |
|---|---|---|---|
| 1x | 96 DPI | ~300KB/page | Draft |
| 2x | 192 DPI | ~1.2MB/page | Normal |
| 3x | 288 DPI | ~2.5MB/page | Print (Current) |
// In index.html, find:
let currentTheme = 'dark-purple';
// Change to any theme name/* Add in <style> section */
.theme-custom {
--bg: #YOUR_BG_COLOR;
--surface: #YOUR_SURFACE_COLOR;
--text-color: #YOUR_TEXT_COLOR;
--accent-purple: #YOUR_ACCENT_COLOR;
}// In renderPDF function, change:
scale: 3, // 1, 2, or 3| Issue | Solution |
|---|---|
| Highlights not in PDF | Use the highlight tool, not browser |
| Images not loading | Check file size (<10MB) |
| PWA not installing | Use HTTPS |
| Slow export | Reduce image sizes |
| Theme not saving | Clear browser cache |
- Fork the repository
- Create feature branch:
git checkout -b feature/AmazingFeature - Commit changes:
git commit -m 'Add AmazingFeature' - Push:
git push origin feature/AmazingFeature - Open Pull Request
MIT License - see LICENSE file.
β Star this repo if you find it useful! β
Made with β€οΈ by SudhirDevOps1