These methods allow the user to download PDF files of data collection instruments. The download may be with or without collected data; and may return a single record, multiple records, or all records.
exportPdf(
rcon,
dir,
filename = "redcap_forms_download",
record = NULL,
events = NULL,
instruments = NULL,
all_records = FALSE,
...
)# S3 method for redcapApiConnection
exportPdf(
rcon,
dir,
filename = "redcap_forms_download",
record = NULL,
events = NULL,
instruments = NULL,
all_records = FALSE,
...,
error_handling = getOption("redcap_error_handling"),
config = list(),
api_param = list()
)
exportPdf
has no return. After saving the file to the local
computer, a message is displayed providing the location of the file
on the system.
A redcapConnection
object.
character(1)
. The directory into which the file
should be saved.
character(1)
. The base of the file name. When
record = NULL
, it will be appended with "_blank.pdf"
. When
record
has a value, it will be appended with "_record_[record id].pdf"
character(1)
, integerish(1)
, or NULL
.
The record id for which forms should be downloaded.
character
. The events for which forms should be downloaded
character
. The instruments for which forms
should be downloaded
logical(1)
. When TRUE
forms for all records
are downloaded. When TRUE
, this overrides the records
argument.
Arguments to pass to other methods
character(1)
. One of c("error", "null")
.
An option for how to handle errors returned by the API.
see redcapError()
.
A named list
. Additional configuration parameters to pass to
httr::POST()
. These are appended to any parameters in
rcon$config
.
A named list
. Additional API parameters to pass into the
body of the API call. This provides users to execute calls with options
that may not otherwise be supported by redcapAPI
.
These methods mimics the behavior of "Download PDF of Instruments" button on the REDCap user interface. They permit the user to export a PDF file for:
A single collection instrument (blank)c
All instruments (blank)
A single instrument (with data from a single record)c
All instruments (with data from a single record)
All instruments (with data from all records)
exportMetaData()
,
importMetaData()
,
exportFieldNames()
,
exportInstruments()
,
exportMappings()
,
importMappings()