pdf_to_csv | R Documentation |
pdf_to_csv
takes as input a pdf file and a page number and converts
that to a data.frame and, optionally, saves that to a csv file. This can be
useful for getting client-supplied data into a useful format. NOTE: This
requires the package pdftools, which you may have to download and install
with install.packages("pdftools")
. You only have to do that once.
pdf_to_csv(pdf_file, page, save_csv = "csv")
pdf_file |
the pdf file you want to read, in quotes, e.g.,
|
page |
page number(s) of the pdf you want to read as a numeric vector.
For example, to read page 10, use |
save_csv |
optionally specify a file name for saving the output. If left as "csv", the file name will be the pdf file name plus the 1st page number requested. If set to NA, no file will be saved. |
a data.frame of pdf table content
# No examples yet.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.