-
Python 3
-
pdf2image
module$ pip install pdf2image
-
Poppler PDF-Engine
$ sudo apt-get install poppler-utils
-
Put bin to environment path
-
change
/etc/environment
filePATH="/usr/bin:/some/other/path:/usr/lib/poppler-utils"
-
-
-i
-> path to the pdf file
-o
-> output directory where the images and the markdown file will be dumped in
-f
-> filename of the markdown file
-n
-> namescheme for the images
- Images will be named
<namescheme>1.jpg
,<namescheme>2.jpg
, ...
-r
-> image resolution, default 200. Should be set lower if the pdf file is really big in order to avoid an eviction
$ python3 import.py -i path/to/file.pdf -o path/to/output/ -f example.md -n imagename
- All images will be dumped into the
images
folder inside theoutput
directory - I was to lazy to do error handling, so make sure all the directories exist
- Every output file will be generated on its own.
- Delete all the images in the
images
folder before running the script again using the same parameters