media_extract

0th

Percentile

Extract media from a document object

Extract files from an rdocx or rpptx object.

Usage
media_extract(x, path, target)
Arguments
x

an rpptx object or an rdocx object

path

media path, should be a relative path

target

target file

Aliases
  • media_extract
Examples
# NOT RUN {
example_pptx <- system.file(package = "officer",
  "doc_examples/example.pptx")
doc <- read_pptx(example_pptx)
content <- pptx_summary(doc)
image_row <- content[content$content_type %in% "image", ]
media_file <- image_row$media_file
png_file <- tempfile(fileext = ".png")
media_extract(doc, path = media_file, target = png_file)
# }
Documentation reproduced from package officer, version 0.3.5, License: GPL-3

Community examples

Looks like there are no examples yet.