Technical article 125656

How do I print JPEG pictures to a postscript printer on OpenServer 5.0.6 or 5.0.7?

OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

I want to print JPEG pictures to a printer from the
command line.  Utilities like Netscape or Mozilla can
already print JPEG pictures, but I want to do this from
the command line.

Solution

The jpegtopnm command used in conjunction with the pnmtops command can convert JPEG picture files into postscript files that can be sent to a postscript printer.

This is what you will need to install:

OSS646B - the Execution Environment Supplement. Download all VOL images for oss646b from:

https://ftp.scoexpert.com/openserver5/oss646b/

The OpenServer Supplemental Graphics, Web and X11 Libraries supplement. Download all VOL images for this supplement, or gwxlibs, from here:

https://ftp.scoexpert.com/openserver5/opensrc/gwxlibs-1.3.2Ag

Use the scoadmin software manager, or custom, to install these supplements.

After these are installed, the following command converts the JPEG picture into a postscript file that can be printed to a postscript printer:

# jpegtopnm pict.jpg | pnmtops > newfile.ps
# lp -d printer -opostscript newfile.ps

This printer has to be a postscript printer.

From the Xinuos technical article database, record 125656. Reproduced with permission. The original is at www.sco.com/ta/125656, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.