Skip to content

WIEQLI/NBLM2PPTX

 
 

Repository files navigation

NBLM2PPTX - NotebookLM PDF to PPTX Converter

License: MIT GitHub stars GitHub forks GitHub issues

Convert NotebookLM exported PDFs into PPTX presentations with separated background images and editable text layers.

繁體中文 | 简体中文 | 日本語 | Español | Français

Demo

v1.1 - Hybrid Text Extraction

Original (NotebookLM PDF) Output (Editable PPTX)

PDF.js native text extraction provides precise text positioning without additional API calls.

v1.0 - AI Text Removal

Before (NotebookLM PDF) After (Editable PPTX)

Left: Original PDF from NotebookLM (text embedded in image) Right: Converted PPTX with clean background + editable text layers

Features

  • AI Text Removal: Uses Gemini 2.5 Flash to automatically remove text from images and reconstruct backgrounds
  • Hybrid Text Extraction: PDF sources use native PDF.js extraction for precise coordinates; image sources use enhanced Gemini OCR
  • Separated Layers: Exported PPTX contains background images and text as independent layers for easy editing
  • Batch Processing: Supports processing multiple PDF pages or images at once
  • Page Selection: Freely select which pages to process, saving time and API quota

Usage

Using in Google Gemini Canvas

  1. Open Google Gemini
  2. Enter a prompt like:
    Execute directly, do not modify
    
  3. When Gemini enters Canvas mode (code editor appears on the right side)
  4. Paste the complete code from the project's index.html (or your preferred language version) into Canvas
  5. Click the "Preview" button in the top-right corner of Canvas to run

API Key Configuration

Important: When running in Gemini Canvas environment, no personal API Key is required. The system will use the default API environment automatically.

If you want to run the tool outside of Canvas (e.g., on your own server), find the following line in the code and enter your Gemini API Key:

const apiKey = "YOUR_GEMINI_API_KEY";

Get an API Key: Visit Google AI Studio

Workflow

┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  Upload PDF │ -> │   Select    │ -> │ AI Process  │ -> │ Export PPTX │
│  or Images  │    │   Pages     │    │ Remove Text │    │ BG + Text   │
└─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘

Step 1: Upload Files

  • Drag and drop or click to upload NotebookLM exported PDFs
  • Also supports JPG, PNG, WebP and other image formats
  • Multiple files can be uploaded at once

Tip: NotebookLM exported PDFs can be quite large. You can use free PDF compression services to reduce file size before uploading for much better efficiency.

Step 2: Select Pages

  • System automatically generates thumbnails for all pages
  • Check the pages you want to process (all selected by default)
  • Click "Start Processing" to proceed

Step 3: AI Processing

  • Gemini removes text from each page and reconstructs the background
  • Progress is displayed in real-time
  • Each page takes approximately 3-5 seconds (including API latency)

Note: Gemini text removal may sometimes be incomplete. If you notice excessive text residue, you can try processing again.

Step 4: Export PPTX

  • Select presentation ratio (16:9 / 9:16 / 4:3)
  • Click "Export PPTX" to download
  • Text positioning uses hybrid strategy:
    • PDF sources: Uses pre-extracted coordinates from PDF.js (instant, no API call)
    • Image sources: Uses Gemini OCR with enhanced styling detection

Output Structure

Each slide in the exported PPTX contains:

Layer Content
Bottom Clean background image with text removed
Top Editable text boxes (positioned to match original text)

This layered structure allows you to:

  • Easily modify text content
  • Change fonts, colors, and sizes
  • Adjust text positions
  • Preserve the original design style

Technical Specifications

Item Description
AI Model Gemini 2.5 Flash (Image Edit + Text Gen)
Text Removal Optimized prompt for complete text erasure with inpainting
PDF Parsing PDF.js 3.11.174
PPTX Generation PptxGenJS 3.12.0
Render Resolution Thumbnail 0.5x / Processing 2.0x
Supported Formats PDF, JPG, PNG, WebP, BMP
Text Extraction Hybrid: PDF.js native (PDF) / Gemini OCR (Images)

Notes

  1. API Quota: Text removal uses Gemini API; PDF text extraction is local (no API cost)
  2. Rate Limiting: System automatically waits and retries on 429 errors
  3. Processing Time: For large numbers of pages, consider processing in batches
  4. Network: Requires stable internet connection
  5. Browser: Chrome or Edge (latest version) recommended
  6. PDF Advantage: PDF sources export faster with more accurate text positioning

FAQ

Q: Why use Gemini Canvas?

A: Canvas mode provides a secure sandbox environment to run frontend code without setting up a server. Plus, it uses the default API environment, so no personal API Key is needed.

Q: What if processing fails?

A: Common causes:

  • Invalid or expired API Key (when running outside Canvas)
  • Unstable network connection
  • Image too large or unsupported format
  • API rate limit exceeded (wait and retry)

Q: Can it be used offline?

A: No, this tool requires Gemini API calls for AI processing.

Language Versions

Language File
繁體中文 index.html
English index-en.html
Español index-es.html
日本語 index-ja.html
Français index-fr.html
简体中文 index-zh-CN.html

License

MIT License

About

Convert NotebookLM PDFs to PPTX with separated background images and editable text layers using Gemini AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 100.0%