Image Convert ¤
Creates thumbnails of pdfs, linked to their source and image slideshows from pdfs.
This is the current feature set.
Parameters¤
# Set png=img/foo.png in order to keep the produced pngs within the docs dir:
# pages: whatever is accepted by convert. E.g. 0-4. 0=first page
dflts = dict(width=400, pages=0, thumbwidth=200)
Thumbnails¤
When you specify only one page to be converted, we'll create a thumbnail for the pdf link:
LP Source:
```python lp:python addsrc
show('convert', pdf='img/sample.pdf', xpng='img/my_sample.png', width=100) # implicit: pages=0
```
Result:
or using the more concise
LP Source (shortform):
`lp:python:convert pdf=img/sample.pdf width=200 pages=2 addsrc`
Result:
Slideshow¤
When you specify more than one pages to be converted, we'll create a slideshow, incl. a lightbox.
LP Source (shortform):
`lp:python:convert pdf=img/sample.pdf width=1000 thumbwidth=200 pages=0-4 addsrc`
Result:
Requirements¤
You need to have imagemagick1 installed (convert
command available).
Tip
If you use conda for your virtual env, you
have it, w/o root, via conda install -c conda-forge imagemagick
-
Copyright: © 1999-2020 ImageMagick Studio LLC ↩