Skip to contents

Delegates to deckifyr preview in the bundled Python engine: builds the project (regardless of its own build.previews setting) and rasterizes each slide to a standalone PNG via LibreOffice + PyMuPDF, alongside the ordinary .pptx/manifest output. Requires the external soffice binary (LibreOffice) on PATH – unlike deck_build()'s own opportunistic build.previews: true (which just skips previews with a warning when LibreOffice is missing), rendering previews is this function's entire purpose, so a missing soffice is always a hard failure here.

Usage

deck_preview(
  presentation,
  rscript_bin = NULL,
  quarto_bin = NULL,
  soffice_bin = NULL,
  trusted_binaries_only = FALSE,
  allow_outside_project = FALSE
)

Arguments

presentation

Path to presentation.yaml.

rscript_bin, quarto_bin, soffice_bin

Run this executable instead of whatever presentation.yaml's build.reportifyr.flextable.binary, build.quarto.binary or build.preview.binary says (NULL, the default, keeps the project file's own setting). For a launcher that treats project files as untrusted user data (deckifyr.policy).

trusted_binaries_only

If TRUE, a project file that names a non-default binary (and no override was given for it) fails with E_UNTRUSTED_BINARY before anything runs, and design.base, layouts, build.output, build.manifest and build.reportifyr's paths must stay inside the project (E_PATH_OUTSIDE_PROJECT). Default FALSE: existing projects behave exactly as before.

allow_outside_project

With trusted_binaries_only = TRUE, let those paths resolve outside the project (e.g. a shared organization design). Default FALSE.

Value

A parsed list from the CLI's JSON output:

output

The built .pptx path.

slide_count

Number of slides composed.

previews

One PNG path per rendered slide.

preview_pdf

The intermediate PDF LibreOffice produced alongside those PNGs.

Examples

if (FALSE) { # \dontrun{
deck_preview("presentation.yaml")
} # }