Skip to content

Commit f0af535

Browse files
committed
pdf2txt in docker
1 parent 49b1342 commit f0af535

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

pdf2txt/alpine/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM alpine:3.2
2+
3+
RUN apk update && apk add python git && \
4+
git clone https://github.com/euske/pdfminer.git && \
5+
cd /pdfminer && \
6+
python setup.py install && \
7+
cd / && \
8+
apk del git && \
9+
rm -rf /var/cache/apk/* && \
10+
rm -rf /pdfminer
11+
12+
ENTRYPOINT ["pdf2txt.py"]

pdf2txt/alpine/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## convert pdf to plain text file
2+
3+
Suppose you have a pdf file named `sample.pdf` in your current folder.
4+
```
5+
docker pull bwits/pdf2txt
6+
docker run -ti --rm -v $(pwd):/app pdf2txt /app/sample.pdf > sample.txt
7+
```
8+
You will get the txt file named `sample.txt` in your current folder.

0 commit comments

Comments
 (0)