@nextgensoftwares/folio-canvas-export
Canvas pages as PowerPoint and PDF, through Folio's slides exporters: each page becomes a slide on the Blank layout and every object an editable shape. Ink stays vector (the same filled outline the screen draws), shapes keep their Office preset and adjust values, stickies and text keep their direction, connectors keep their route, arrowheads and label, images are embedded. Bounded pages fill the slide; infinite pages fit their contents, centred.
ts
import { exportCanvasPdf, exportCanvasPptx } from '@nextgensoftwares/folio-canvas-export';
const pptx = exportCanvasPptx(board.store.document);
const pdf = await exportCanvasPdf(board.store.document, { layout: { measurer: fonts }, shaper: fonts, fonts: loadFace });| Export | Description |
|---|---|
canvasToPresentation(doc, options?) | a canvas document as a folio-slides Presentation, for any slides exporter or editor |
exportCanvasPptx(doc, options?) | a .pptx file (options: CanvasDeckOptions plus the PPTX writer's) |
exportCanvasPdf(doc, options) | a PDF, one page per canvas page (options: CanvasDeckOptions plus the slides PDF export's: measurer, shaper, fonts) |
CanvasDeckOptions | size (slide px; default the first bounded page's, else 1280 × 720), margin around infinite pages' contents, pages to export, theme |
objectShapes(object, env) | one canvas object as slide shapes (for custom converters) |
ConvertEnv, Placement | what objectShapes needs: the page-to-slide placement (k, dx, dy), a resolver for connector ends, the theme, a shape id source |