Question: I am looking for script to extract table text from pdfs using pdfminer. I have tried tabula but I am looking to integrate the normal text and table text to a database. Any ideas on how to implement this are welcome.

Answer: 
I find that base R's `untar()` is a bit unreliable and/or slow on Windows.

What worked very well for me (on all platforms) was

```
library(archive)
archive_extract("C:/User/user/Downloads/dnmarchives/1776.tar.xz",
                dir="C:/User/user/Downloads/dnmarchives")

```

It supports 'tar', 'ZIP', '7-zip', 'RAR', 'CAB', 'gzip', 'bzip2', 'compress', 'lzma' and 'xz' formats.

And one can also use it directly read in a csv file within an archive without having to UNZIP it first using

```
read_csv(archive_read("C:/User/user/Downloads/dnmarchives/1776.tar.xz", file = 1), col_types = cols()) 

```
1. On Debian or Ubuntu, first install the package xz-utils

```
$ sudo apt-get install xz-utils

```

2. Extract a .tar.xz the same way you would extract any tar.\_\_ file.

```
$ tar -xf file.tar.xz

```

Done.