PDF_download {metagear}R Documentation

Attempts to download a PDF using a DOI link.

Description

Tries to download a PDF file using the digital objected identifier (DOI) link. Uses ad hoc searches of journal HTML pages to detect candidate PDFs for download. Downloads all candidate pdfs. If running downloader in Windows, having "WindowsProxy = TRUE" will significantly improve download success.

Usage

PDF_download(
  DOI,
  directory = getwd(),
  theFileName = "temp",
  validatePDF = TRUE,
  quiet = FALSE,
  WindowsProxy = FALSE
)

Arguments

DOI

A string of the DOI (digital object identifier) used to identify the source of a journal article PDF file(s).

directory

A string of the location (directory) were downloaded PDF files are to be saved. Directory name must end with "\\".

theFileName

Used to rename the downloaded file. No need to include extension ".pdf".

validatePDF

When "TRUE" will only save to files that are valid PDF documents. When "FALSE" will save all candidate files, even if they are not valid PDF formats.

quiet

When "FALSE" does not print to console download progress and summary.

WindowsProxy

When TRUE significantly improves download success for computers running Windows; when FALSE on a Windows based computer, you may only be able to download 30 to 50 PDFs at a time before a connection error occurs and halts all downloads (e.g., InternetOpenUrl failed error).

Value

A string describing the download success. If unsuccessful, returns the type of error during the download attempt.

See Also

PDFs_collect


[Package metagear version 0.7 Index]