toPdf: bytes in, a LayoutDocument with one page per slide out, then PDF. See .pptx to PDF.
runPptxPipeline()
@reductoai/pptx, @reductoai/pptx/browser.
PptxPipelineOptions
Import from @reductoai/pptx, @reductoai/pptx/browser.
slideSizeHmm()
@reductoai/pptx, @reductoai/pptx/browser.
renderPdfBytes()
ir; createPdfWriter is the page-at-a-time form.
Import from @reductoai/pptx/pdf.
FontRegistry
Owns one document’s font state (builtins, overlay, fontTable decls).
Import from @reductoai/pptx, @reductoai/pptx/browser.
FontRegistry properties
ansiOnly()
applyEmbeddedFonts()
applyFontDeclarations()
applyEmbeddedFonts.
builtinCjkFamilies()
markCjkFamilies, resolveCjkFamily would rewrite
every eastAsia name to Arial Unicode MS.
builtinFamilyIds()
cjkFaceId()
documentScope()
familySet()
resolveFace, cjkFaceId, the
measurer’s and painter’s Times fallback — which is why the face trace is
recorded at this one point. All four slots of a touched family are recorded,
not just the requested one: cheap, and it keeps bold/italic switching within
a family from needing a third pass.
hasFamily()
family (lowercased) has faces, without recording a lookup or a fallback.
installedTable()
wasmFontManifest).
isCjkFace()
isCjkFamily), not hhea + gap.
isCjkFamily()
isCjkFontRequest()
isEmbeddedOnly()
family (lowercased) has faces only because the document embeds them.
isRegisteredFontFile()
id names a face this registry can hand out (builtin or the
current document’s overlay). For node system fonts the id is the file path,
so this remains a path allow-list for the demo server.
markCjkFamilies()
markNoSubsetFaces()
noteScriptFace()
served, a portable face.
quietly()
fn noting no swap: a face probed for glyphs is not one the document asked for.
recordFallbacks()
fn runs. A layout memo stores the list
and feeds it back through replayFallbacks when it skips the work, so the
per-document ledger reads the same whether or not the memo hit.
registerBuiltinFamilies()
registeredFaceBytes()
/api/font from the registry instead of trusting client paths.
replayFallbacks()
resolveArabicFamily()
resolveCjkFamily()
resolveDevanagariFamily()
resolveFace()
source is absent when the resolved family has no registered
face for that slot (nothing installed, or a partial embed edge case);
consumers fall back (measurer -> Times -> width heuristic, painter -> Times).
resolveFamily()
resolveHebrewFamily()
resolveThaiFamily()
startFaceTrace()
FaceSource.bytes() is SYNCHRONOUS while
fetching is not: it cannot load a face on demand mid-layout. So it installs
the whole family table with empty faces, lays out once under a trace to
learn which faces the document actually reaches, fetches exactly those, and
lays out again. Pass two asks for the same set — resolution depends on the
family table and the document, never on whether bytes were present — so the
second pass is the real one.
takeFaceTrace()
startFaceTrace, and stop recording.
defaultFontRegistry
@reductoai/pptx, @reductoai/pptx/browser.
blankPresentationBytes()
PowerPointPresentation.create() starts from, without the parser: for a server that only stores them.
Import from @reductoai/pptx/blank.