Last chance! 50% off unlimited learning
Sale ends in
readPDF(PdfinfoOptions = "", PdftotextOptions = "", ...)
function
with the signature elem, language, id
:list
with the named element uri
of type
character
which must hold a valid file name.character
vector giving the text's language.character
vector representing a unique identification
string for the returned text document.PlainTextDocument
representing the text
and meta data in content
. Note that this PDF reader needs both the tools
getReaders
to list available reader functions.if(all(file.exists(Sys.which(c("pdfinfo", "pdftotext"))))) {
f <- system.file("doc", "tm.pdf", package = "tm")
pdf <- readPDF(PdftotextOptions = "-layout")(elem = list(uri = f),
language = "en",
id = "id1")
pdf[1:13]
}
Run the code above in your browser using DataLab