Using Ghostscript to convert JPEG to PDF

前端 未结 6 874
轻奢々
轻奢々 2020-12-13 02:50

What are the parameters that I should pass? The Ghostscript version I\'m using is 8.71.

6条回答
  •  臣服心动
    2020-12-13 03:01

    I have Ghostscript version 9.10, so the command with the below line DIDN'T WORKED FOR ME

    /usr/local/share/ghostscript/9.02/lib/viewjpeg.ps

    so I modifid the command and edited the line and insted used this, IT WORKED FOR ME

    viewjpeg.ps
    

    So the NEW MODIFIED COMMAND IS below:

    gs \
         -sDEVICE=pdfwrite \
         -o foo.pdf \
          viewjpeg.ps \
         -c "(1st.jpg)  viewJPEG showpage \
             (2nd.jpg)  viewJPEG showpage \
             (3rd.jpg)  viewJPEG showpage \
             (last.jpg) viewJPEG showpage"
    

提交回复
热议问题