Give this tool a PDF or text file, it automatically extracts the content and builds beautiful PDF slides or a single-page academic poster.
Demos: OpenAI Pitch Deck (source) Β· Attention Is All You Need (source)
designer |
editorial |
midnight |
blush |
tech |
premium |
terra |
slate |
crimson |
premium |
terra |
- Smart Extraction: Pulls text, tables, LaTeX equations, and figures from PDFs automatically.
- LLM-Powered Writing: Works with Gemini, OpenAI, Claude, and OpenRouter. Adjustable verbosity: concise, normal, or detailed.
- Academic & General Purpose: Built for research and technical content, but works for any topic or industry.
- 9 Handcrafted Themes: Professionally designed styles with curated typography and color palettes (see below).
- Academic Poster Generator: Add
--posterto produce a print-ready single-page HTML poster (A0 landscape) instead of a slide deck.
1. Clone and install everything in one command:
git clone https://github.com/yourusername/slidesai.git
cd slidesai
python3 install.pyThis installs all Python dependencies and Marp CLI automatically. If npm is not found, the script will skip Marp and print instructions β you only need it for PDF rendering.
(Note: marker-pdf may require extra system dependencies for OCR on some platforms. Refer to their docs if you hit issues. Google Chrome or Chromium must be installed for PDF rendering.)
2. Setup your API Key:
cp project_secrets.py.example project_secrets.pySet LLM_PROVIDER and the corresponding key in project_secrets.py. Only the key for your chosen provider is required:
| Provider | Key variable | Default model |
|---|---|---|
google |
GEMINI_API_KEY |
gemini-3-pro-preview |
openrouter |
OPENROUTER_API_KEY |
gemini-3-pro-preview |
openai |
OPENAI_API_KEY |
gpt-5.2 |
anthropic |
ANTHROPIC_API_KEY |
claude-opus-4-6 |
(This file is gitignored to keep your keys safe.)
Just point build.py at your file and everything happens automatically:
# From a PDF (extracts β generates slides β renders PDF)
python3 build.py paper.pdf
# From a text or markdown file
python3 build.py notes.txt --theme midnight
# Control slide count and detail level
python3 build.py paper.pdf --theme designer --num_slides 15 --verbosity detailed
# Extract only specific pages, concise output
python3 build.py paper.pdf --theme slate --page_range 0-10 --num_slides 10 --verbosity concise
# Use a different LLM provider
python3 build.py paper.pdf --provider openai --model gpt-5.2
python3 build.py paper.pdf --provider anthropic
# Generate an academic poster (HTML) instead of slides
python3 build.py paper.pdf --poster
python3 build.py paper.pdf --poster --theme crimsonYour output files will appear in a folder named after your input file.
π‘ Poster tip: Open the generated
{input_name}_poster.htmlin any browser and use File β Print β Save as PDF (set paper size to A0, landscape) for a print-ready conference poster.
π‘ Re-style without calling the LLM again: After your first build, a cached LLM response is saved. Re-run with
--use_cachedto try a different theme instantly β no API call needed:# Slides python3 build.py paper.pdf --theme midnight --use_cached # Poster python3 build.py paper.pdf --poster --theme crimson --use_cached
positional:
input_file Path to input file (.pdf, .txt, or .md)
options:
-o, --output_dir Output directory (default: folder named after input file)
--poster Generate a single-page HTML academic poster instead of slides
--theme Theme (default: premium)
--num_slides Target number of slides β slides only (default: 14-20)
--verbosity Slide text density: concise | normal | detailed β slides only (default: normal)
--provider LLM provider: google | openrouter | openai | anthropic (default: google)
--model Model name, e.g. gpt-5.2, claude-opus-4-6, gemini-3-pro-preview (default: provider's recommended model)
--use_cached Skip the LLM call and reuse the cached response (default: off)
--page_range Pages to extract from PDF, e.g. 0-5, 10 (default: all pages)
--disable_ocr Disable OCR for PDF extraction (default: OCR enabled)
--skip_pdf Skip the final Marp-to-PDF render step β slides only (default: off)
| Theme | Vibe |
|---|---|
| designer | Modern, vibrant β purple, teal, gold |
| editorial | Refined, nature-inspired β forest green, gold, cream |
| midnight | Dark, futuristic β cyan glow, deep navy |
| blush | Warm, startup energy β rose, coral, peach |
| tech | Clean, SaaS-inspired β electric blue, slate |
| premium | Luxury, Apple-keynote feel β deep purple, gold |
| terra | Earthy, organic β terracotta, sand, forest green |
| slate | Minimal, corporate β cool grey, teal |
| crimson | Classic, academic β deep crimson, warm ivory |
If you prefer finer control, you can run each step individually:
python3 extract_with_marker.py --pdf_path my_paper.pdf --output_dir my_project/Generates a markdown file and an images/ folder in the output directory.
options:
--pdf_path Path to input PDF
--output_dir Directory for output assets (default: same directory as PDF)
--page_range Page range to extract, e.g. 0-5, 10, 12-14 (default: all pages)
--disable_ocr Disable OCR and rely on embedded PDF text (default: OCR enabled)
python3 build_slides.py \
--input_file my_project/my_paper.md \
--output_file my_project/my_presentation.md \
--theme designer \
--num_slides 15 \
--verbosity normaloptions:
--input_file Path to your extracted content markdown
--output_file Path to save the generated presentation markdown (default: {input_filename}_slides.md)
--num_slides Target number of slides (default: 14-20)
--theme Presentation theme (default: premium)
choices: designer | editorial | midnight | blush | tech | premium | terra | slate | crimson
--verbosity Slide text density: concise | normal | detailed (default: normal)
--provider LLM provider: google | openrouter | openai | anthropic (default: google)
--model Model name (default: provider's recommended model)
--use_cached Skip the LLM call and reuse a previously saved response (default: off)
--no_page_numbers Do not show page numbers on slides
--poster Generate an HTML academic poster instead of a slide deck
python3 build_slides.py \
--input_file my_project/my_paper.md \
--output_file my_project/my_poster.html \
--theme premium \
--posterOpens directly in the browser. Use File β Print β Save as PDF (A0 landscape) for a print-ready conference poster. A llm_poster_raw.txt cache file is saved alongside for fast re-theming with --use_cached.
python3 render_marp_pdf.py my_project/my_presentation.mdAutomatically finds your Marp installation and Chrome to output my_project/my_presentation.pdf.
options:
input_md Path to the Marp markdown file
-o, --output Output PDF path (default: input filename with .pdf extension)
--browser Browser engine for Marp: auto | chrome | edge | firefox (default: auto)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License β free to use, modify, and distribute.