powered by
PDF
Extract PDF document
read.pdf( file, pages = integer(), method = c("csv", "sqlite", "PythonInR"), laycntrl = layout_control(), encoding = "utf8", password = "", caching = TRUE, maxpages = Inf, rotation = 0L, image_dir = "", pyexe = "python3" )
a character string giving the name of the PDF-file the data are to be read from.
an integer giving the pages which should be extracted (default is integer()).
integer()
a character string giving the data transfer method. Allowed values are "csv" (default), "sqlite" and "PythonInR" (recommended).
"csv"
"sqlite"
"PythonInR"
a list of layout options, created by the function layout_control.
layout_control
a character string giving the encoding of the output (default is "utf8").
"utf8"
a character string giving the password necessary to access the PDF (default is "").
""
a logical if TRUE (default) pdfminer is faster but uses more memory.
TRUE
an integer giving the maximum number of pages to be extracted (default is Inf).
Inf
an integer giving the rotation of the page, allowed values are c(0, 90, 180, 270).
c(0, 90, 180, 270)
a character string giving the path to the folder, where the images should be stored (default is "").
a character string giving the path to the python executable (default is "python3"). Only used when method is "csv" or "sqlite".
"python3"
method
Returns a object of class "pdf_document".
"pdf_document"
# NOT RUN { if (is_pdfminer_installed()) { pdf_file <- system.file("pdfs/cars.pdf", package = "pdfminer") read.pdf(pdf_file) } # }
Run the code above in your browser using DataLab