Thde Docker image has been created using the following commands:
apt-get update
apt-get install python3 python3-pip
apt-get install imagemagick
apt-get install openjdk-8-jre-headless
As well as the installation of pdftotree:
pip3 install pdftotree
If you use the Docker image there is no need to do any of the above, see Usage below!
In order to use pdftotree run the following command:
docker run --rm -v "$(pwd)/data/:/data/" semmtech/pdftotree pdftotree -o /data/output.html /data/input.pdf
Note that the -v "$(pwd)/src/:/data/" mount the local folder data into the container to /data. The -o /data/output.html sets the output file; whereas the last argument indicate the input PDF file (which is /data/input.pdf).
Also look at pdfminer and extraction of data (as described in https://dzone.com/articles/exporting-data-from-pdfs-with-python)
Some useful references
Content type
Image
Digest
Size
1.3 GB
Last updated
over 5 years ago
docker pull semmtech/pdftotree