R: read PDF

From OnnoWiki
Jump to navigation Jump to search

dengan pdftools

install.packages("pdftools")
library(pdftools)
text <- pdf_text("folder/tempat/data/namafile.pdf")
text <- pdf_text("data/BUSINESSCENTER.pdf")

dengan tm

install.packages("tm")
library(tm)
read <- readPDF(control = list(text = "-layout"))
document <- Corpus(URISource("./71_PV.62.pdf"), readerControl = list(reader = read))
doc <- content(document1)
head(doc)


Pranala Menarik