SlideForge

Reference

Validation

Content, layout, package structure, and visual comparison are checked separately. Passing one does not imply passing the others.

Layout rules

validateLayout(page, options) checks rendered slides in Chromium. Errors block export; warnings are reported.

Layout rules
RuleSeverityChecks
dimensionserrorSlide box differs from the canvas
boundarieserrorContent extends beyond the slide
overflowerrorClipped or scrolling content
imageserrorMissing or undecodable images
fontswarningFirst named text font is unavailable
overlapwarningVisible text or media boxes intersect

PPTX structure

validatePptx(data) performs offline ZIP and XML checks: required parts, relationships, content types, slide references, and dimensions. It is not full OOXML schema validation or an Office acceptance test.

{
  "valid": true,
  "slideCount": 6,
  "editableTextCount": 35,
  "shapeCount": 52,
  "issues": []
}

Optional visual comparison

comparePresentation renders the PPTX with LibreOffice Impress and Poppler, captures the source slides, and writes per-slide difference reports. Both tools must be installed separately.

import { comparePresentation } from './dist/index.js';

const reports = await comparePresentation(
  'presentation.html',
  'presentation.pptx',
  'review/comparison',
);
console.log(reports.map(report => report.differenceRatio));