PDF_download: Attempts to download a PDF using a DOI link.

Description Usage Arguments Value See Also

View source: R/PDF_download.R

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

1
2
3
4
5
6
7
8
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


metagear documentation built on Feb. 15, 2021, 5:09 p.m.