Skip to contents

Opens the PDF file of which the full path is given in Pdf in a PDF viewer.

Usage

hsShowPdf(Pdf, dbg = TRUE)

Arguments

Pdf

full path to PDF file

dbg

if TRUE (default) the command used to open the PDF file is shown

See also

Examples

# Set path to PDF file and open PDF device
tmpPdf <- tempfile("ex_hsFinishPdf", fileext = ".pdf") 

preparePdf(tmpPdf)
#> [1] "/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpSdCvlf/ex_hsFinishPdfa058cc79ea.pdf"

# Plot something
plot(x <- seq(-pi,pi,pi/100), sin(x), type = "l")

# Finish PDF file.
grDevices::dev.off()
#> agg_png 
#>       2 

if (FALSE) {
# Open PDF file in viewer.
hsShowPdf(tmpPdf)
}