Learn R Programming

copula (version 0.999-13)

device: Cropping and Font Embedding PDF Device

Description

dev.off.pdf() is a wrapper of dev.off() which is meant for closing a pdf device. It also performs cropping and font embedding if chosen.

Usage

dev.off.pdf(file="Rplots.pdf", crop=NULL, embedFonts="", ...)

Arguments

file
output file name including extension .pdf.
crop
cropping command, can be one of: [object Object],[object Object],[object Object]
embedFonts
font embedding command, can be one of: [object Object],[object Object],[object Object]
...
additional arguments passed to dev.off().

Value

See Also

dev.off() for closing a device, embedFonts() for font embedding. sfsmisc's pdf.end() for another approach.

Examples

Run this code
## typical usage
doPDF <- !dev.interactive(orNone=TRUE)
if(doPDF) pdf(file=(file <- "crop_device.pdf"), width=6, height=6)
plot(1)
if(doPDF) dev.off.pdf(file)

Run the code above in your browser using DataLab