bindPDFs: Convert PDFs to TXTs And Combine Them to A Data.frame

Description Usage Arguments Value Author(s) Examples

Description

This is a function combining convPDFs and bindTXTs. You can directly select PDFs and then convert them to txts, based on which you can then combine them to a data.frame with a mapping rule.file.

Usage

1
2
3
4
5
6
7
bindPDFs(mode = 1, converter = c("pdftotext", "pdftohtml"),
  converter.path = NULL, rule.file = paste0(path,
  "IndRptToTable(RegExp).xlsx"), path = getOption("toolkit.dir"))

bind_pdfs(mode = 1, converter = c("pdftotext", "pdftohtml"),
  converter.path = NULL, rule.file = paste0(path,
  "IndRptToTable(RegExp).xlsx"), path = getOption("toolkit.dir"))

Arguments

mode

integer, Default 1L.

1L

as is (-raw)

2L

with layout (-layout)

3L

no breaks (-nopgbrk)

4L

without format ()

5L

as table (-table)

6L

simplified (-simple)

converter

The converter program to use, either "pdftotext" or "pdftohtml"

converter.path

Path to the converter program. If NULL, make sure the xpdf folder is under R.home(). E.g., paste0(R.home(), paste0("/xpdfbin-win-4.00/bin64/pdftotext.exe"))

rule.file

Full path of the conversion dictionary file. Default paste(path, <dict name>).

path

Path of the directory to the dictionary file.

Value

Nothing

Author(s)

Yiying Wang, wangy@aetna.com

Examples

1
2
3
4
## Not run: 
bindPDFs()

## End(Not run)

madlogos/aseshms documentation built on May 21, 2019, 11:03 a.m.