Renders a pptx_container (or a path to a .pptx file) as an interactive slide viewer in the RStudio / Positron Viewer pane, or in the default browser. Uses PptxViewJS (bundled offline; no internet connection required).

preview_pptx(pptx, slide = 1L, view = rlang::is_interactive())

Arguments

pptx

A pptx_container object or a file path to a .pptx file.

slide

Integer. Which slide to show first (1-based). Default 1.

view

Logical. If TRUE (default), opens the viewer. If FALSE, returns the html.

Value

An htmltools::browsable HTML object (invisibly). Called for its side-effect of opening the viewer.

Examples

if (FALSE) { # \dontrun{
pptx <- example_pptx()
preview_pptx(pptx)
} # }