Skip to content

Commit

Permalink
Give a hint about pdf reading
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jul 18, 2024
1 parent 494cc7c commit 9b391bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/edit.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ image_read <- function(path, density = NULL, depth = NULL, strip = FALSE, coales
density <- as.character(density)
depth <- as.integer(depth)
defines <- validate_defines(defines)
if(is.character(path) && grepl("\\.pdf$", path) && Sys.which('gs') == ""){
message("Ghostscript (gs) not found on the PATH.\nTry image_read_pdf() to read PDF using pdftools instead.")
}
image <- if(isS4(path) && methods::is(path, "Image")){
convert_EBImage(path)
} else if(inherits(path, "nativeRaster") || (is.matrix(path) && is.integer(path))){
Expand Down

0 comments on commit 9b391bf

Please sign in to comment.