Converting a PDF to PNG

前端 未结 12 1902
一个人的身影
一个人的身影 2020-11-27 09:58

I\'m trying to convert a PDF to a PNG image (at least the cover of one). I\'m successfully extracting the first page of the PDF with pdftk. I\'m using imagemagick to do the

12条回答
  •  忘掉有多难
    2020-11-27 10:13

    My solution is much simpler and more direct. At least it works that way on my PC (with the following specs):

    me@home: my.folder$ uname -a
    Linux home 3.2.0-54-generic-pae #82-Ubuntu SMP Tue Sep 10 20:29:22 UTC 2013 i686 i686 i386 GNU/Linux
    

    with

    me@home: my.folder$ convert --version
    Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
    Features: OpenMP
    

    So, here's what I run on my file.pdf:

    me@home: my.folder$ convert -density 300 -quality 100 file.pdf file.png
    

提交回复
热议问题