Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3369

Re: JPEG to PDF question

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: JPEG to PDF question
Date 2019-04-08 10:30 +0100
Message-ID <MPG.3715250f8662497898989d@usenet.plus.net> (permalink)
References <eli$1904061719@qaz.wtf> <AA2A973D375D4EAC2E284CEEC009E394A9D7@127.0.0.1> <eli$1904071723@qaz.wtf>

Show all headers | View raw


In article <eli$1904071723@qaz.wtf>, *@eli.users.panix.com says...

> In comp.lang.postscript, Guy  <guy[AT]guysalias[DOT]tk> wrote:
> > Eli the Bearded wrote:
> >> I'd like to be able to easily turn JPEGs into PDF.
> > Can use viewjpeg.ps of Ghostscript distribution.
> > 
> >  gs -sDEVICE=pdfwrite -o out.pdf viewjpeg.ps -c (in.jpg)viewJPEG
> 
> That works very well, thanks.

Just a quick caveat here, for anyone running into this by a web search.

Older versions of Ghostscript do not have the 'JPEGPassThrough' option 
and so will do the same thing as your original Gimp setup; decompress 
the JPEG and then write it as an image.

NB! Unless you take extra action with these older versions of 
Ghostscript, the image will be compressed again with DCT (JPEG), not 
with Flate. This will lead to additional loss of fidelity in the image 
samples.

The commit which added the ability to pass JPEG images unchanged is (for 
the technically minded) here:

http://git.ghostscript.com/?
p=ghostpdl.git;a=commit;h=eb5d417375e1c7052aeb9f2532d34573bfd07f53

This is present in versions of Ghostscript starting at 9.23 though I 
seem to remember there were a couple of bug fixes, so I'd definitely 
advise using an up to date version if you want to do this (9.26 should 
be fine, since I see you are using that).


		Ken

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JPEG to PDF question Eli the Bearded <*@eli.users.panix.com> - 2019-04-06 21:33 +0000
  Re: JPEG to PDF question John Forkosh <forkosh@panix.com> - 2019-04-07 06:39 +0000
  Re: JPEG to PDF question Guy <guy@guysalias.tk.invalid> - 2019-04-07 14:52 -0500
    Re: JPEG to PDF question Eli the Bearded <*@eli.users.panix.com> - 2019-04-07 21:54 +0000
      Re: JPEG to PDF question ken <ken@spamcop.net> - 2019-04-08 10:30 +0100
      Re: JPEG to PDF question Martin Leese <please@see.Web.for.e-mail.INVALID> - 2019-04-08 10:24 -0600
      Re: JPEG to PDF question Javier <invalid@invalid.invalid> - 2019-04-10 18:10 -0500
        Re: JPEG to PDF question luser droog <luser.droog@gmail.com> - 2019-04-10 18:01 -0700
        Re: JPEG to PDF question ken <ken@spamcop.net> - 2019-04-11 10:50 +0100
    Re: JPEG to PDF question Scott Hemphill <hemphill@hemphills.net> - 2019-04-11 17:59 -0400
      Re: JPEG to PDF question luser droog <luser.droog@gmail.com> - 2019-04-11 16:03 -0700
      Re: JPEG to PDF question Eli the Bearded <*@eli.users.panix.com> - 2019-04-12 00:33 +0000
        Re: JPEG to PDF question Mark Carroll <mtbc@bcs.org> - 2019-04-12 07:15 +0100
  Re: JPEG to PDF question orr721@gmail.com - 2019-06-16 07:11 -0700

csiph-web