enable_feature_message() returns a character vector with the information needed to install the requested feature. Formatted for use with rlang::abort(), rlang::warn(), or rlang::inform().

enable_feature_message(
  feature = c("cat_pages", "get_bookmarks", "get_docinfo", "get_xmp", "n_pages",
    "set_bookmarks", "set_docinfo", "set_xmp")
)

Arguments

feature

Which xmpdf feature to give information for.

Value

A character vector formatted for use with rlang::abort(), rlang::warn(), or rlang::inform().

Examples

  rlang::inform(enable_feature_message("get_bookmarks"))
#> ! You must install (only) one suggested R package or system command to use ‘get_bookmarks()’
#>  The system command ‘pdftk’ is not installed (or detected)
#>  <https://gitlab.com/pdftk-java/pdftk> (Official)
#>  ‘sudo apt-get install pdftk-java’ (Debian/Ubuntu)
#>  ‘brew install pdftk-java’ (Homebrew)
#>  ‘choco install pdftk-java’ (Chocolately)
#>  ‘Sys.setenv(PDFTK_PATH = "/path/to/pdftk")’ if installed but not detected on PATH