home / skills / openclaw / skills / pptx-pdf-font-fix

pptx-pdf-font-fix skill

/skills/chernojagne/pptx-pdf-font-fix

This skill patches font transparency in PPTX files to ensure PDFs embed fonts correctly during export, improving fidelity without noticeable changes.

npx playbooks add skill openclaw/skills --skill pptx-pdf-font-fix

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.8 KB
---
name: pptx-pdf-font-fix
description: Fix PowerPoint font embedding issues in PDF export by patching text transparency in PPTX files. Use when a user has a PPTX file where exported PDFs show wrong/default fonts instead of the intended downloaded/custom fonts, even with font embedding enabled. Works by applying minimal (1%) transparency to fully-opaque text runs, which forces PowerPoint to properly embed fonts during PDF export.
---

# PPT Font Fix

## Problem

PowerPoint's "Export to PDF" can fail to embed downloaded/custom fonts, substituting built-in defaults, even when:
- Fonts are properly installed and embeddable
- "Embed fonts in the file" is checked in PowerPoint options

## Workaround

Applying a tiny transparency (1%) to text with 0% transparency forces PowerPoint to correctly embed fonts in PDF output. This is visually imperceptible but changes how PowerPoint processes the font during export.

## Usage

```bash
python3 scripts/fix_font_transparency.py input.pptx [output.pptx] [--transparency 1]
```

### Options

- `output` -- Output PPTX path (default: `input_fixed.pptx`)
- `--transparency, -t` -- Transparency % to apply (default: 1)

## Behavior

- Only patches text runs that are fully opaque (0% transparency)
- Leaves text that already has any transparency untouched
- Safe to run multiple times
- Only modifies slide XML (`ppt/slides/slideN.xml`), not layouts/masters

## Workflow

1. Receive PPTX file from user
2. Run the fix script: `python3 scripts/fix_font_transparency.py input.pptx`
3. Return the patched PPTX to the user
4. User opens patched file in PowerPoint and exports to PDF -- fonts now embed correctly

## Note

PDF export must be done from PowerPoint desktop. Server-side converters (LibreOffice, Graph API) do not reproduce the same font embedding behavior.

Overview

This skill fixes PowerPoint font embedding problems that appear when exporting PPTX to PDF. It patches fully opaque text runs by applying a minimal (default 1%) transparency so PowerPoint will embed downloaded or custom fonts correctly during PDF export. The change is visually imperceptible and safe to apply repeatedly.

How this skill works

The tool inspects slide XML inside the PPTX package and adds a tiny transparency attribute to text runs that are 100% opaque. It only edits slide files (ppt/slides/slideN.xml) and leaves layouts, masters, and other content untouched. After patching, the PPTX opened in PowerPoint results in proper font embedding when exporting to PDF from the desktop app.

When to use it

  • Exported PDFs replace downloaded or custom fonts with built-in defaults despite embedding enabled.
  • You have a PPTX with embeddable fonts installed but PDF output still shows wrong fonts.
  • You need a quick, non-destructive fix before delivering PDFs created from PowerPoint desktop.
  • You want a repeatable scriptable step in a pre-export workflow for many presentations.

Best practices

  • Run the script on a copy of the PPTX; default output name prevents accidental overwrite.
  • Validate visually after opening the patched file, then export to PDF from PowerPoint desktop.
  • Use the default 1% transparency; increase only if specific rendering issues appear.
  • Do not rely on server-side converters for verification—only PowerPoint desktop reproduces the fix.
  • Keep versioned backups if you process many files in bulk to allow rollback.

Example use cases

  • A designer delivers a deck with a downloaded font and needs reliable client PDFs.
  • Batch-fixing a set of presentations before a conference to ensure branding fonts embed.
  • Automating a pre-export step in a PowerPoint production pipeline to avoid manual edits.
  • Repairing a single problematic slide deck that shows Arial instead of a custom typeface.

FAQ

Will this change be visible in the presentation?

No. Applying 1% transparency is visually imperceptible on normal displays and print.

Is it safe to run multiple times?

Yes. The script only modifies runs that are fully opaque and leaves already-transparent text alone.