source: spip-zone/_plugins_/convertisseur/trunk/scripts/pdf2img.sh @ 94582

Last change on this file since 94582 was 94582, checked in by booz@…, 5 years ago

conversion pdf2img

  • Property svn:executable set to *
File size: 404 bytes
Line 
1#!/bin/sh
2
3# Conversion d'un PDF en images
4
5nom=${1%.*}
6nom=${nom##*/}
7nom=${nom/\//}
8
9dest="$2/$nom"
10
11echo "conversion de $1 dans $dest"
12
13# infos sur le pdf
14# identify -format "%[pdf:HiResBoundingBox]" testpdf.pdf
15
16
17[ ! -d "$dest" ] && mkdir "$dest"
18
19cd "$dest"
20convert -verbose -colorspace RGB -resize 1200 -interlace none -density 300 -background white -alpha remove -quality 80 "$1" "$nom-%04d.jpg"
21
Note: See TracBrowser for help on using the repository browser.