Skip to content

PDF β†’ PPTX: one slide per page (built in) - #98

Merged
KnifeLemon merged 1 commit into
mainfrom
feature/pdf-to-pptx
Oct 18, 2026
Merged

KnifeLemon merged 1 commit into
mainfrom
feature/pdf-to-pptx

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

Summary

For #96: converts PDF to PowerPoint, one slide per page. Each slide shows the page rendered as a picture, so it looks exactly like the PDF but can't be edited. Built in; no new engine.

  • New pdf-slides engine (PdfSlidesConverter, PictureDeckWriter).
    • Pages are rendered with PDFium at the preset's DPI (150–600; very large pages get a lower DPI) and the preset's page range.
    • Each page becomes a JPEG at the preset's quality (default 90).
    • The PPTX package is written directly, slide by slide, so pages aren't held in memory.
  • Slide size follows the first page: A4 portrait gives portrait slides, 16:9 gives widescreen. Every page is fitted and centred on its slide, and rotated pages are handled.
  • Speaker notes hold each page's text, so it can be searched and copied. Scanned pages get no notes.
  • Routing: the new ConversionEdge.DirectOnly flag means this edge is used only for a direct PDF β†’ PPTX conversion, never as a step in longer routes (DOCX β†’ PDF β†’ PPTX, PDF β†’ PPTX β†’ ODP). An exhaustive test checks that every other format pair keeps its route.
  • Preset "PPTX (slides)" goes on the PDF donut after DOCX. The donut was full at 12 slices, so the new default drops TIFF from it; the TIFF preset itself is kept. Settings schema 18 updates untouched PDF donuts and adds the preset to customised ones only when there is room.
  • Encrypted PDFs fail with the usual password message. A broken PDF fails without leaving a file.

Test plan

  • 14 new PdfSlidesTests, checked with OpenXmlValidator (0 errors) and read back with Filee's PPTX reader. Route stability is checked across all format pairs.
  • Core 204, Engines 835, Cli 21 and App 265 tests passed. dotnet format is clean.
  • Not opened in PowerPoint, Impress or Keynote yet.

πŸ€– Generated with Claude Code

Each PDF page is rendered with PDFium and becomes one JPEG picture on its own
slide, so the deck looks exactly like the PDF (not editable). The slide size is
the first page's own size (A4 portrait β†’ portrait slides, 16:9 β†’ 16:9); every
page is fitted and centred. Render DPI from the preset (150..600, pages over
25 megapixels render smaller), page range from the preset, JPEG quality from
the preset (90). The page text (PdfPig, reading order) goes into the speaker
notes. The package is written by hand and validated with the Open XML SDK in
the tests.

The edge is DirectOnly, a new ConversionEdge flag: the planner uses it only
for a PDF converted to PPTX, never as a step of a longer route, so no other
pair of formats changes (checked for every pair).

"PPTX (slides)" preset on the PDF donut after DOCX: settings schema 18 puts it
in place of TIFF on an unchanged default donut and offers it to a changed one
with room; the "pdf-slides" engine joins the priority list after "pdf-text".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon added a commit to pleguen/Filee that referenced this pull request Oct 18, 2026
Schema 18 is taken by PDF β†’ PPTX (KnifeLemon#98), so "Extract frames (PNG / JPG)" come
with 19. They are inserted after "Split PDF", where a new library has them
(BuiltInData.FramePresets), instead of at the end, and stay on no donut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon
KnifeLemon merged commit 875b689 into main Oct 18, 2026
5 checks passed
@KnifeLemon
KnifeLemon deleted the feature/pdf-to-pptx branch October 19, 2026 12:55
@KnifeLemon KnifeLemon added the formats New formats and engines label Oct 20, 2026
@KnifeLemon KnifeLemon self-assigned this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

formats New formats and engines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant