5/15/2015 - 7:44 AM

linux中各种pdf 转图片 图片转pdf等

linux中各种pdf 转图片 图片转pdf等

1.pdf 转换为图片
sudo apt-get install imagemagick
convert -density 150 input.pdf -quality 90 output.png

PNG, JPG or (virtually) any other image format can be chosen
-density xxx will set the dpi to xxx (common are 150 and 300)
-quality xxx will set the compression to xxx for PNG, JPG and MIFF file formates (100 means no compression)
all other options (such as trimming, grayscale, etc) can be viewed on the website of Image Magic.

sudo apt-get install imagemagick
ls *.png > a.txt
sort -V a.txt > b.txt
convert $(cat b.txt | tr '\n' ' ') test.pdf