
pdf-playground
Interactive playground for creating and testing PDF reports and proposals
- version
- 1.3.8
- GitHub stars
- 456
Install
/plugin install pdf-playground@claude-skills-journalismRun it inside Claude Code after adding the marketplace with /plugin marketplace add jamditis/claude-skills-journalism.
Contents
Discovered from sourceSkills 1
Document design
Create professional, print-ready HTML documents that export to PDF with customizable branding.
Brand configuration
Before creating documents, check for pdf-playground.local.md in the project
root. If it is absent, check the legacy Claude Code path
.claude/pdf-playground.local.md. If both exist, use only the project-root
file. If neither exists, use sensible defaults or ask the user for their brand
colors.
Reading brand config
Parse the selected config file's YAML frontmatter:
---
brand:
name: "Organization Name"
tagline: "Tagline"
website: "https://example.com"
email: "contact@example.com"
colors:
primary: "#CA3553"
secondary: "#000000"
background: "#FFFFFF"
text: "#2d2a28"
muted: "#666666"
fonts:
heading: "Playfair Display"
body: "Source Sans 3"
style:
headingCase: "sentence"
useOxfordComma: true
---
Default brand values
If no config exists, use these defaults:
- Primary color:
#CA3553(red) - Secondary color:
#000000(black) - Heading font: Playfair Display
- Body font: Source Sans 3
- Heading case: sentence case
Core principles
- Print-first design: All documents target 8.5" × 11" letter size with proper margins
- Brand compliance: Use colors and fonts from brand configuration
- Sentence case by default: Unless brand config specifies "title" case
- Clean exports: Documents must render correctly when printed to PDF
CSS variables
Generate CSS variables from brand config:
:root {
--primary: [colors.primary];
--secondary: [colors.secondary];
--background: [colors.background];
--text: [colors.text];
--muted: [colors.muted];
/* Derived colors */
--primary-dark: [darken primary by 15%];
--gray-100: #f5f4f2;
--gray-200: #e8e6e3;
}
Print CSS fundamentals
Page setup
@page {
size: 8.5in 11in;
margin: 0;
}
@media print {
body {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
.page {
page-break-after: always;
page-break-inside: avoid;
}
}
Fixed page dimensions
.page {
width: 8.5in;
height: 11in;
padding: 0.5in 0.75in;
padding-bottom: 1in; /* Space for footer */
position: relative;
box-sizing: border-box;
overflow: hidden;
}
Fixed footers
.page-footer {
position: absolute;
bottom: 0.4in;
left: 0.75in;
right: 0.75in;
font-size: 9pt;
border-top: 1px solid var(--gray-200);
padding-top: 0.1in;
background: var(--background);
}
Footer clearance (critical)
Content overlapping or touching the footer is a recurring issue.
Preferred layout, grid rows auto 1fr auto:
.page {
display: grid;
grid-template-rows: auto 1fr auto;
overflow: hidden;
}
This makes the header and footer take their natural height, and the content fills the remaining space. No magic-number calc() needed, the footer clearance is structural.
Required safeguards:
- Use
grid-template-rows: auto 1fr autoon the page so content automatically gets the space between header and footer - Set
overflow: hiddenon the content container to prevent text bleeding past its bounds - Include
padding-bottom: 0.3in(minimum) inside the content area as a buffer - Never use hardcoded
height: calc(...)with magic numbers for header/footer heights, they drift when padding or font sizes change - After rendering, always screenshot and visually verify the bottom of the page before delivering
- If content overflows, reduce content, never shrink the footer gap. Tighten the header first if you need more room.
Typography patterns
Font loading
@import url('https://fonts.googleapis.com/css2?family=[heading-font]:wght@400;600;700&family=[body-font]:wght@400;500;600;700&display=swap');
body {
font-family: '[body-font]', Arial, sans-serif;
font-size: 11pt;
line-height: 1.6;
color: var(--text);
}
h1, h2, h3 {
font-family: '[heading-font]', Georgia, serif;
font-weight: 700;
}
Heading styles
.section-title {
font-size: 26pt;
color: var(--secondary);
margin-bottom: 0.25in;
}
.section-title::after {
content: '';
display: block;
width: 0.5in;
height: 3px;
background: var(--primary);
margin-top: 0.12in;
}
Common components
Cover page header
<header class="cover-header">
<div class="logo-bar">
<div class="logo-primary">[brand.name]</div>
</div>
<div class="cover-title-block">
<div class="cover-eyebrow">[Document type] • [Date]</div>
<h1 class="cover-title">[Title in configured case]</h1>
</div>
</header>
Budget table
.budget-table thead {
background: var(--secondary);
color: white;
}
.budget-table tbody tr:last-child {
background: var(--primary);
color: white;
font-weight: 700;
}
Highlight box
.highlight-box {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: white;
padding: 0.3in;
}
Document creation workflow
- Check for brand config at project-root
pdf-playground.local.md, then the legacy.claude/pdf-playground.local.mdfallback - Locate this installed
SKILL.mdand resolve bundled resources from its directory. Do not assume a plugin-root environment variable is available. - Load template from the skill-relative
templates/directory - Apply brand settings to CSS variables and content
- Customize content based on user requirements
- Save HTML file in current working directory
- Offer preview with Playwright browser tools
PDF export instructions
- Open the HTML file in Chrome
- Press Ctrl+P (or Cmd+P on Mac)
- Set "Destination" to "Save as PDF"
- Set "Margins" to "None"
- Enable "Background graphics"
- Save the file
Additional resources
Templates
Pre-built templates in the installed skill's templates/ directory:
proposal-template.htmlreport-template.htmlonepager-template.htmlnewsletter-template.htmlslides-template.htmlevent-template.html
slides-template.html contains illustrative local photo and wordmark paths,
not bundled image assets. Before delivering a deck based on it, replace every
CSS url(...) and <img src> reference with an available asset. If the user
has no suitable images, remove every unresolved reference, use the template's
gradient or solid-color slide variants, and replace a missing wordmark image
with text. Never deliver a deck with an unresolved local asset path.
Brand examples
Example brand configurations in the installed skill's brands/ directory:
default.yaml- Default brand settingsccm.yaml- Center for Cooperative Mediaexample-newsroom.yaml- Sample newsroom config
Reference files
For detailed CSS patterns, use the installed skill's
references/css-patterns.md.
Preview controls
Reusable preview assets are in the installed skill's controls/ directory.
These files are resources for document generation; they do not turn the
Claude-only preview command or plugin hook into Codex features.
Related
Use document-delivery to inspect, share, send, and verify the final PDF or editable document.
Commands 8
Create print-ready event materials.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- Load the event template from
${CLAUDE_PLUGIN_ROOT}/templates/event-template.html
Material types
Flyer (8.5" × 11"):
- Event title (large, eye-catching)
- Date, time, location
- Brief description
- Registration info or QR code placeholder
- Organization branding
Poster (11" × 17"):
- Bold headline
- Key details at a glance
- Visual hierarchy for scanning
- Prominent logo
Signage:
- Directional signs
- Welcome banners
- Table tents
Design principles
- High visual impact
- Easy to read from distance (for posters)
- Clear hierarchy: What → When → Where → How
- Bold use of brand primary color
- Minimal text, maximum clarity
Brand application
- Primary color for header/accent areas
- Secondary color for text
- Brand fonts
- Organization name in footer
Event name
The event name is: $ARGUMENTS
If not provided, ask for:
- Event name
- Date and time
- Location
- Brief description
- Registration URL
- Material type needed
Footer clearance (critical)
Content MUST NOT touch or overlap the footer.
- The
.flyerelement MUST usedisplay: grid; grid-template-rows: auto 1fr auto - It MUST have exactly 3 direct children:
<header class="flyer-header">,<div class="flyer-content">,<footer class="flyer-footer"> - The content wrapper (
.flyer-content) MUST haveoverflow: hiddento prevent text bleeding - Never use
position: absolutefor footers, keep them in normal document flow as the third grid row - After generating, always take a screenshot and visually verify the bottom of the page
- If content is too long, reduce content rather than shrinking the footer gap
Output
Save HTML file in current working directory. For professional printing, export to PDF with "Background graphics" enabled.
Create an HTML email newsletter.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- Load the newsletter template from
${CLAUDE_PLUGIN_ROOT}/templates/newsletter-template.html
Email constraints
HTML emails have special requirements:
- Use tables for layout (not CSS grid/flexbox)
- Inline CSS styles
- Max width: 600px
- Web-safe fonts with fallbacks
- Alt text for all images
Document structure
Header:
- Organization logo centered
- Newsletter title/date
- View in browser link (placeholder)
Content:
- Featured story with image placeholder
- News items (headline + excerpt + link)
- Upcoming events
- Quick links
- CTA button
Footer:
- Social media links
- Unsubscribe link (placeholder)
- Organization address
- Copyright
Brand application
- Use brand primary color for headers and buttons
- Apply brand secondary color for text
- Use brand fonts with web-safe fallbacks
Newsletter name
The newsletter name is: $ARGUMENTS
If not provided, ask for:
- Newsletter title or edition
- Featured content
- Number of news items
- Any events to highlight
Output
Save HTML file in current working directory. Note: Test in email clients before sending.
Create a print-ready single-page HTML fact sheet.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- If not found, ask the user for their organization name and primary brand color
- Load the one-pager template from
${CLAUDE_PLUGIN_ROOT}/templates/onepager-template.html
Brand application
Apply brand settings throughout:
- Organization name in header
- CSS variables for colors
- Font families from config
Document structure
Create a single 8.5" × 11" page with:
Header:
- Organization name/logo
- Document title
- Category eyebrow
Content area:
- Key points (3-5 bullet points)
- Brief description (2-3 paragraphs max)
- Sidebar with quick facts or stats
- Call to action
Footer:
- Organization website
- Contact information
Layout options
- Two-column (main + sidebar)
- Full-width with callout boxes
- Grid for multiple equal sections
Topic
The topic is: $ARGUMENTS
If no topic provided, ask for:
- Main topic or program name
- 3-5 key points
- Any statistics
- Call to action
Footer clearance (critical)
Content MUST NOT touch or overlap the footer. This is a common issue.
- The page MUST use
display: grid; grid-template-rows: auto 1fr autoso the footer takes its natural height and content fills the rest, no magic-numbercalc()for heights - The
.contentarea MUST haveoverflow: hiddento prevent text bleeding past its bounds - Use
padding-bottom: 0.3in(minimum) on the content area to create a buffer - After generating, always take a screenshot and visually verify the bottom of the page
- If content is too long, remove content rather than shrinking the clearance, the footer gap is non-negotiable
- Tighten the header padding first if you need more room for content
Output
Save HTML file in current working directory. All content MUST fit on one page, no overflow, no text touching the footer.
Launch an interactive preview session for iterating on a document design.
Setup
- Read the document-design skill for guidance
- Resolve the HTML file path (see "File path" below)
- Copy the playground wrapper and controls next to the file
- Start a local HTTP server to serve the file
- Open the wrapper in the Playwright browser
Helper script
Every shell step runs through one plugin script. This command pre-approves only
that script, so use the exact form below. If python3 is not found (common on
Windows), use python in its place.
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py <setup|serve|clean> ...
Preview workflow
Step 1: Set up the playground wrapper
The playground uses an iframe-based architecture: the document lives in an iframe, and the control panel sits alongside it as a sidebar. This keeps the document HTML clean for PDF export while providing interactive design controls.
Detect which template is being previewed (see "Template detection" below), then copy the control files and wrapper next to the HTML file:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py setup <html-file> --template <template-name>
This creates playground-controls/ and playground-wrapper.html in the same directory as the HTML file and prints the wrapper path to open.
If the command prints that the control panel is missing, tell the user to run this command and restart Claude Code, then STOP:
claude plugin update pdf-playground@claude-skills-journalism
Step 2: Start local server
The Playwright browser cannot open file:// URLs. Start a local HTTP server instead, with run_in_background: true:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py serve <directory-containing-html>
The script picks the first free port from 8787 upward, binds to 127.0.0.1 only, and prints Serving http://localhost:<port>/. Read the port from that line.
Step 3: Open the wrapper
Navigate to the wrapper page with the document and template as URL parameters:
http://localhost:<port>/playground-wrapper.html?doc=<filename>.html&template=<template-name>
The template parameter defaults to proposal if omitted.
The wrapper page will:
- Display the document in a full-height iframe (left side)
- Show the control panel as a sidebar (right side)
- Handle all iframe-to-control communication automatically
Take an initial screenshot to show current state.
Tell the user:
The interactive control panel is now loaded on the right side of the preview. You can:
- Adjust colors, fonts, spacing, and layout live
- Toggle sections on and off
- Try different presets for quick theme changes
- Click "Copy changes" to get a prompt you can paste back here
- I'll apply the changes to the HTML source file
Step 4: Gather feedback
- Ask user what changes they'd like
- Options:
- Describe changes in words
- Point out specific areas to adjust
- Paste a prompt from the control panel's "Copy changes" button
- Request screenshots of specific pages
Step 5: Implement changes
- Edit the HTML file based on feedback
- Refresh the browser to show updates:
browser_navigateto the same wrapper URL - The control panel reloads automatically with the wrapper (no re-injection needed)
- Take new screenshots to confirm
Step 6: Iterate
- Repeat steps 4-5 until satisfied
- Offer to take final screenshots
Step 7: Clean up
When the user is done:
- Close the browser:
browser_close - Stop the HTTP server (the background process from step 2)
- Optionally remove the temporary playground files:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py clean <html-file>
File path
The file to preview is: $ARGUMENTS
If no file path provided:
- Look for HTML files in current directory
- If found, list them and ask which to preview
- If none found, ask for the file path
Template detection
To determine which template map to use, check the HTML file for clues:
- Look for CSS class names that match known templates (e.g.
.cover-title,.stat-gridfor proposal) - Check the document structure and layout
- If uncertain, default to the proposal template map
Currently available template maps:
proposal.js, Funding proposals, grant applications
Common adjustments
- Text content changes
- Spacing and margin adjustments
- Font size tweaks
- Color modifications
- Layout restructuring
- Adding or removing sections
- Fixing overlap issues
Browser commands
browser_navigate, Open the wrapper page via HTTP URLbrowser_snapshot, Get accessibility treebrowser_take_screenshot, Capture visual statebrowser_close, End preview session
Tips
- Always use HTTP URLs (
http://localhost:<port>/), neverfile:// - Take screenshots after each change
- The control panel reloads with each page navigation (no manual re-injection needed)
- For multi-page docs, scroll or use page-specific screenshots
- Remind user: Ctrl+P in Chrome -> Save as PDF -> Margins: None -> Background graphics: checked
- The wrapper uses
display: flexandclamp()so it scales with the browser window
Create a print-ready HTML funding proposal document using a guided wizard.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- If not found, ask the user for their organization name and primary brand color
- Load the proposal template from
${CLAUDE_PLUGIN_ROOT}/templates/proposal-template.html - Read the document-design skill for CSS patterns
Project name
The project name is: $ARGUMENTS
If no project name provided, ask the user in Phase 1 below.
Phase 1, Content setup
Gather requirements using AskUserQuestion before generating anything.
Q1: Proposal type
AskUserQuestion:
question: "What type of proposal is this?"
header: "Type"
options:
- label: "Funding proposal"
description: "Request for grant funding or financial support from a foundation or government agency"
- label: "Partnership pitch"
description: "Pitch to a potential partner organization for a collaborative project"
- label: "Program overview"
description: "Summary of an existing program for stakeholders or board members"
Q2: Sections to include
AskUserQuestion:
question: "Which sections should be included?"
header: "Sections"
multiSelect: true
options:
- label: "Background"
description: "Context, history, and research supporting the need"
- label: "Proposed work"
description: "Priorities, deliverables, and what the funding supports"
- label: "Case studies"
description: "Evidence of past success with named examples"
- label: "Budget"
description: "Itemized budget table with totals"
Q3: Page count
AskUserQuestion:
question: "How many pages should the proposal be?"
header: "Pages"
options:
- label: "3 pages (compact)"
description: "Cover + 2 content pages. Good for quick briefs."
- label: "4 pages (standard)"
description: "Cover + background + proposed work + budget"
- label: "5 pages (full)"
description: "Cover + background + proposed work + case studies + budget"
- label: "6+ pages (detailed)"
description: "Full proposal with extra room for evidence and appendices"
Q4: Budget line items (only if budget was selected in Q2)
AskUserQuestion:
question: "How many budget line items?"
header: "Budget"
options:
- label: "3 items"
description: "Simple budget with 3 expense categories"
- label: "4 items"
description: "Standard budget with 4 expense categories"
- label: "5-6 items"
description: "Detailed budget with 5-6 expense categories"
- label: "7+ items"
description: "Full budget, may need a second budget page"
If no project name was provided via $ARGUMENTS, also ask:
- Project name
- Brief description (1-2 sentences)
Phase 2, Design choices
Q5: Color scheme
AskUserQuestion:
question: "What color scheme should the proposal use?"
header: "Colors"
options:
- label: "Brand colors (Recommended)"
description: "Use colors from your pdf-playground.local.md config, or the template defaults"
- label: "Professional blue"
description: "Navy and steel blue, formal and institutional"
- label: "Bold red and black"
description: "High contrast with red accents, CCM style"
- label: "Custom"
description: "You'll specify the exact hex colors"
If "Custom" selected: ask for primary color, dark variant, and text color.
If "Professional blue" selected: use --red: #1a5f7a; --red-dark: #134a5e; --black: #0a1628;
If "Bold red and black" selected: use template defaults (--red: #CA3553).
Q6: Typography style
AskUserQuestion:
question: "What typography style?"
header: "Fonts"
options:
- label: "Classic (Recommended)"
description: "Playfair Display headings + Source Sans body, elegant and readable"
- label: "Modern"
description: "Inter for both headings and body, clean and contemporary"
- label: "Mixed"
description: "Merriweather headings + Open Sans body, warm and approachable"
- label: "Custom"
description: "You'll specify the exact Google Font names"
If "Custom" selected: ask for heading font name and body font name (must be valid Google Fonts).
Q7: Visual style
AskUserQuestion:
question: "What visual style?"
header: "Style"
options:
- label: "Clean and minimal (Recommended)"
description: "Generous whitespace, subtle accents, professional tone"
- label: "Bold and impactful"
description: "Larger headings, stronger colors, prominent stats"
- label: "Traditional and formal"
description: "Conservative layout, smaller decorative elements, classic feel"
Apply style adjustments:
- Clean and minimal: Default template sizing. Body 11pt, heading scale 1.0x, padding 0.75in.
- Bold and impactful: Body 11pt, heading scale 1.15x, padding 0.65in. Stat numbers 20% larger.
- Traditional and formal: Body 10.5pt, heading scale 0.9x, padding 0.85in. Remove decorative gradients from highlight boxes (use solid background instead).
Phase 3, Generation and review
Step 1: Generate the HTML
Using the answers from Phases 1 and 2:
- Copy the proposal template
- Apply brand settings (org name, colors, fonts)
- Include only the sections selected in Q2
- Match the page count from Q3
- Set budget line items per Q4
- Apply color scheme from Q5
- Apply typography from Q6
- Apply visual style from Q7
- Fill placeholder text with
[bracketed instructions]for the user to fill in later - Save the HTML file in the current working directory
Step 2: Launch preview with control panel
-
Start a local HTTP server in the background (
run_in_background: true). This command pre-approves only this script; ifpython3is not found (common on Windows), usepython:python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py serve .The script picks the first free port from 8787 upward and prints
Serving http://localhost:<port>/. Read the port from that line. -
Open in Playwright browser:
browser_navigatetohttp://localhost:<port>/<filename>.html -
Inject the control panel:
- Read
${CLAUDE_PLUGIN_ROOT}/controls/control-panel.css - Read
${CLAUDE_PLUGIN_ROOT}/controls/template-maps/proposal.js - Read
${CLAUDE_PLUGIN_ROOT}/controls/prompt-generator.js - Read
${CLAUDE_PLUGIN_ROOT}/controls/control-panel.js - Inject all four via
browser_run_code(CSS first, then template map, then prompt generator, then control panel last)
- Read
-
Take a screenshot and show it to the user
-
Explain the control panel:
The interactive control panel is loaded on the right side. You can tweak colors, fonts, spacing, and toggle sections live. When you're happy with changes, click "Copy all changes" in the panel, it puts a prompt on your clipboard that you can paste back here and I'll apply the changes to the source HTML.
Step 3: Iterate with user
Wait for user feedback. They may:
- Describe changes in words ("make the title bigger")
- Paste a prompt from the control panel's "Copy all changes" button
- Ask for specific adjustments
For each round:
- Apply changes to the HTML source file
- Refresh the browser:
browser_navigateto the same URL - Re-inject the control panel (it's lost on page refresh)
- Take a new screenshot
Q8: Satisfaction check
After applying changes:
AskUserQuestion:
question: "How does this look?"
header: "Review"
options:
- label: "Looks good"
description: "Move on to finalization"
- label: "Make more changes"
description: "Keep tweaking, describe what to change or use the control panel"
- label: "Start over"
description: "Scrap this and begin the wizard again from the top"
If "Make more changes": loop back to Step 3. If "Start over": go back to Phase 1.
Phase 4, Finalization
Q9: What next?
AskUserQuestion:
question: "What would you like to do with the proposal?"
header: "Next"
options:
- label: "Finalize and save"
description: "Save the HTML file and clean up the preview server"
- label: "Export to PDF"
description: "Get instructions for printing to PDF from Chrome"
- label: "Make more changes"
description: "Go back to the review phase"
If "Finalize and save":
- Close the browser:
browser_close - Stop the HTTP server background process
- Report the saved file path
If "Export to PDF": Tell the user:
To export as PDF:
- Open the HTML file in Chrome
- Press Ctrl+P (Windows/Linux) or Cmd+P (Mac)
- Set "Destination" to Save as PDF
- Set "Margins" to None
- Check Background graphics
- Click Save
Then ask Q9 again.
If "Make more changes": Go back to Phase 3, Step 3.
Brand application
Apply brand settings to the template:
- Replace organization name throughout
- Update CSS variables with brand colors
- Set font families from brand config
- Apply heading case style (sentence or title)
Document structure
Create a multi-page HTML document with:
Page 1 - Cover page:
- Organization logo/name in header
- Document type eyebrow
- Main title in configured heading case
- Subtitle or tagline
- Key statistics (if provided)
- Footer with organization and date
Page 2+ - Content pages:
- Section headings
- Body text with proper margins
- Fixed footer with document title and page number
- Proper page breaks between sections
Budget page (if included):
- Budget tables with brand-colored headers
- Total row with primary color background
- Two-year or custom period totals
Footer clearance (critical)
Content MUST NOT touch or overlap the page footer.
- The
.pageelement MUST usedisplay: grid; grid-template-rows: auto 1fr auto - It MUST have exactly 3 direct children:
<header class="page-header">,<div class="page-body">,<footer class="page-footer"> - The content wrapper (
.page-body) MUST haveoverflow: hiddento prevent text bleeding - Never use
position: absolutefor footers, keep them in normal document flow as the third grid row - After generating, always take a screenshot and visually verify the bottom of each page
- If content is too long, reduce content rather than shrinking the footer gap
Output
Save the HTML file in the current working directory with a descriptive filename like proposal-[project-name].html.
Create a print-ready HTML program report document.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- If not found, ask the user for their organization name and primary brand color
- Load the report template from
${CLAUDE_PLUGIN_ROOT}/templates/report-template.html - Read the document-design skill for CSS patterns
Brand application
Apply brand settings to the template:
- Replace organization name throughout
- Update CSS variables with brand colors
- Set font families from brand config
- Apply heading case style
Document structure
Page 1 - Cover page:
- Organization branding
- Report title in configured case
- Subtitle (e.g., "Annual report 2025")
- Date range or publication date
Page 2+ - Content sections:
- Executive summary
- Key metrics or highlights (use callout boxes)
- Detailed sections with headings
- Data visualizations or tables
- Quotes and testimonials
Final page:
- Contact information
- Acknowledgments
- Organization info
Report name
The report name is: $ARGUMENTS
If no report name provided, ask the user for:
- Report title
- Time period covered
- Key sections to include
- Any metrics or data to highlight
Footer clearance (critical)
Content MUST NOT touch or overlap the page footer.
- The
.pageelement MUST usedisplay: grid; grid-template-rows: auto 1fr auto - It MUST have exactly 3 direct children:
<header class="page-header">,<div class="page-body">,<footer class="page-footer"> - The content wrapper (
.page-body) MUST haveoverflow: hiddento prevent text bleeding - Never use
position: absolutefor footers, keep them in normal document flow as the third grid row - After generating, always take a screenshot and visually verify the bottom of each page
- If content is too long, reduce content rather than shrinking the footer gap
Output
Save the HTML file in the current working directory. After creating, offer to preview with Playwright browser tools.
Create HTML presentation slides.
Version check
Read the plugin version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json and note it. If the file doesn't exist or the read fails, warn the user that the plugin may not be properly installed.
Setup
- Check for brand configuration at
.claude/pdf-playground.local.md - If found, parse the YAML frontmatter for brand settings
- Load the slides template from
${CLAUDE_PLUGIN_ROOT}/templates/slides-template.html
Slide format
Default: 16:9 widescreen (13.333" × 7.5"). For 4:3, update both places in templates/slides-template.html:
--slide-width: 10inon the:rootblock (drives the.slidewidth)@page { size: 10in 7.5in; }(drives the PDF page size, CSS variables aren't permitted inside@page, so it must be edited directly)
If you only change one, the on-screen preview and the rendered PDF will disagree and content will clip.
Slide types
The template ships with layouts for most pitch- and walkthrough-style decks. Use the right one for each slide rather than forcing everything through a generic content layout.
Cover and hero
.slide-title, Gradient title slide with centered headline, subtitle, presenter line. Use when no cover photo is available.
.slide-hero, Full-bleed photo background with right-aligned headline and subtitle, plus a red branded footer bar. Best for opening pitch decks. Set the background image on the .hero-bg child via inline style.
.slide-hero.slide-closing, Same hero with left-aligned headline for closing "Ready on [date]" slides. The subtitle sits tight to the headline on purpose, the close reads as one unit, not two floating lines.
Section dividers
.slide-section, Solid red background with a large outlined section number and title. Use for clean typographic chapter breaks.
.slide-section.with-photo, Photo background with a red section chip ("Section 8.1") and a large section title. Use when the deck mirrors a numbered document (RFP response, report) and reviewers need to cross-reference.
Content layouts
.slide-content, Headline with red accent rule, optional .lede intro paragraph, and bullet list or prose. The workhorse layout. The accent rule is a tight 0.95in × 0.08in red bar under the headline, not a heavy border across the whole body.
.slide-content.slide-two-col, Headline, optional lede, then two text columns with a dashed divider. Use for paired or compared topics.
.three-col, Three text columns with dashed dividers. Use inside a .slide-body for breaking one topic into three facets (e.g. partners / programming / operations).
.four-col-tiles, Four numbered tile cards with a red top rule, each containing a label ("Pillar 01"), short title, and 2–3 line description. Use for parallel capabilities or themes where each item deserves equal weight.
.stats-strip, Row of big numbers with small captions, each with a red left rule. Default 4 columns, override with style="--stat-cols: 3" on the container. Use to summarize the top-line numbers from a longer section.
.slide-table, Comparison or budget table with a red header row, gray-shaded label column, and grid rules. Use for scenario comparisons, budget tiers, or before/after data.
.partner-grid, 4-column grid of label tiles with a red left accent bar. Use for letters of support, sponsor lists, or organizations.
Set pieces
.slide-quote, Pull quote on a tinted background with a red left rule.
.slide-stat, Single huge number centered on white. Use when one statistic carries the slide.
.slide-end, Dark "thank you" closing slide with contact info.
Design rules
- Sentence case everywhere. Never Title Case. Use
text-transform: uppercasein CSS if you want visual caps on a section chip or hero title, but keep the source text in sentence case. - Large fonts. Title: 52–68pt. Headline: 32–36pt. Lede: 19pt bold. Body: 16pt. Footer: 10–11pt.
- Tight vertical rhythm. Headline → accent rule → lede → body should feel connected, not spaced out. The template's default paddings are already tuned; don't add extra
margin-topto children. - Minimal text. Max 5–6 bullets per slide, max 2 lines per bullet. If you need more, split the slide.
- Contrast. Dark text on white, white text on red or dark photo overlays. No gray-on-gray.
- Brand colors. Set
--redon:rootto your primary. Use--font-headingand--font-bodyto swap font pairs (Playfair/Source Sans for reports, Montserrat for modern decks). - Photos earn their place. Hero slides and section dividers with photos have more impact than gradient or solid-color versions. Use photos when you have good ones; fall back to gradients otherwise.
- Accent rule, not border-bottom. The headline's red accent rule is tight to the title. Don't convert it to a full-width border unless you want a different visual system.
Content discipline
- The lede should be one or two sentences max, sitting right below the headline.
- Bold inline phrases in bullets anchor the most important words. Use sparingly, bolding everything bolds nothing.
- Section chips should use the RFP/report section number ("Section 8.1") if the deck is a walkthrough, or a simple eyebrow label ("Chapter 2") otherwise.
Presentation name
The name is: $ARGUMENTS
If not provided, ask for:
- Presentation title
- Target audience (investors, selection committee, internal briefing, etc.)
- Number of slides
- Key topics or RFP sections to walk through
- Aspect ratio preference (default 16:9)
- Whether photos are available for hero and divider slides
Footer clearance (critical)
Content MUST NOT touch or overlap the slide footer.
- The
.slideelement MUST usedisplay: grid; grid-template-rows: auto 1fr auto - Content slides MUST have exactly 3 direct children:
<div class="slide-header">,<div class="slide-body">,<div class="slide-footer">(or.slide-footer-redfor the branded bar) - The
.slide-bodyMUST haveoverflow: hiddento prevent text bleeding - Never use
position: absolutefor footers, keep them in normal document flow as the third grid row - Title and section slides that don't have footers can use flex layout instead
- After generating, always take a screenshot and visually verify the bottom of each slide
- If content is too long, reduce content rather than shrinking the footer gap
Output
Save HTML file in current working directory alongside a photos/ folder for any hero/divider images.
To export:
- PDF:
chromium --headless=new --disable-gpu --no-sandbox --no-pdf-header-footer --print-to-pdf=out.pdf "file://$(pwd)/slides.html" - Google Slides / PowerPoint: Screenshot each slide to PNG via
pdftoppm, then assemble with python-pptx as full-bleed images. Upload the resulting.pptxto Google Drive withmimeType: application/vnd.google-apps.presentationto convert. This gives pixel-perfect fidelity across all three formats from a single HTML source. - Text-editable PowerPoint: Build a parallel python-pptx file with native text shapes. Use the same palette and structure but accept minor spacing differences, the trade-off is editability.
Multi-format delivery pattern
When a deck needs to ship as PDF, PowerPoint, and Google Slides:
- Build the HTML deck (authoritative source)
- Render to PDF via Chromium headless
- Screenshot each slide to PNG via
pdftoppm -r 144 -png - Assemble PNGs into a
.pptxwith python-pptx (one full-bleed image per slide) - Upload the
.pptxto Google Drive with conversion to Google Slides - Export the Google Slides as PDF for cross-verification
All three formats share the same source pixels, so they're visually identical. Text isn't individually editable in the pptx/Slides, if editability is a requirement, build a parallel python-pptx version with native text shapes.
Check if the PDF Playground plugin is up to date and update if needed.
Steps
-
Read the current installed version from
${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json -
Tell the user the current version
-
Run the update:
claude plugin update pdf-playground@claude-skills-journalism -
Read the version again to confirm it changed
-
Tell the user:
Updated successfully. Please restart Claude Code for the changes to take effect.
If the version didn't change:
You're already on the latest version.
Sponsors
Details
- Marketplace
- jamditis/claude-skills-journalism
- Source
- pdf-playground
- Author
- Joe Amditis
- Category
- Productivity