> For the complete documentation index, see [llms.txt](https://lauradang.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lauradang.gitbook.io/notes/web/web-scraping/pdf-to-csv.md).

# PDF To CSV

### Tabula

```python
import tabula
df = tabula.read_pdf("file.pdf")
tabula.convert_into(pdf, "output.csv", output_format="csv")
```

### Dealing with multi-line tables

```python
tabula.read_pdf("BC Civil Forefeiture 2014-15 Grant Recipients.pdf",spreadsheet=True, pages='all')
```
