Construct a path to download a PDF

make_pdf_dest(url, subd = "")

Arguments

url
The URL from which to download a PDF document
subd
The subdirectory in which the download will be written

Value

The file path to which the PDF will be written

Details

Creates the directory to which the PDF will be downloaded if it doesn't yet exist and returns the download path. The filename of the download is based on the URL, but spaces " " are replaced with underscores "_", and the ".pdf" prefix is appended if not present in the URL.