-
Python 3
-
pdf2imagemodule$ pip install pdf2image -
Poppler PDF-Engine
$ sudo apt-get install poppler-utils
-
Put bin to environment path
-
change
/etc/environmentfilePATH="/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
imagesfolder inside theoutputdirectory - 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
imagesfolder before running the script again using the same parameters