Discussion:
IPP utiltiy
(too old to reply)
Mark Berryman
2021-05-04 18:14:36 UTC
Permalink
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support. Typically, such
printers return a supported document format list similar to the following:

application/vnd.hp-PCL: this is HP’s Printer Control Language. It is
text with escape sequences although binary data can be included when
graphics are involved.

image/jpeg: a standard JPEG file

application/PCLm: contrary to its name, PCLm has nothing to do with PCL.
It is a subset of PDF, basically the raster functions of PDF. Any PDF
viewer can view PCLm files, the reverse is not true.

image/urf: This is Apple’s raster format. This is what AirPrint uses.
Any file to be printed is converted to a raster and sent to the printer.

image/pwg-raster: This is the Printer Working Group’s raster format.
Probably similar to Apple’s but documented and free to use. This
format, along with PCLm, is used by Mopria for printing from Android phones.

Some of these printers have also been known to accept text or postscript
but some of the ones I've received feedback on do not.

Until VMS gets a rasterising utility, it can't really print much to such
printers. At least not directly. There is, however, a work-around.

CUPS has a number of x-to-raster filters included with it and CUPS is
also an IPP server. Thus, if you have unix type system, such as a Mac,
Raspberry Pi, Linux, etc. configured to talk to your printer, you can
use the IPP utility I posted to print files through that system.

For example, here are the file types supported directly by my printer:

application/octet-stream, image/urf, image/pwg-raster, application/pdf,
image/jpeg, application/postscript, application/vnd.hp-PCL, text/plain

But here are the file types supported when printing through my Mac:

application/octet-stream,
application/pc-eps, application/pdf,
application/postscript,
application/vnd.apple-postscript,
application/vnd.cups-banner,
application/vnd.cups-pdf,
application/vnd.cups-postscript,
application/vnd.cups-raster,
application/vnd.cups-raw,
application/x-cshell, application/x-csource,
application/x-perl, application/x-shell,
image/fuji-raw, image/gif, image/imageio,
image/jp2, image/jpeg, image/minolta-raw,
image/openexr, image/pict, image/png,
image/pwg-raster, image/rad, image/tiff,
image/urf, image/x-alias, image/x-bitmap,
image/x-bmp, image/x-ico,
image/x-icon, image/x-photocd,
image/x-portable-anymap,
image/x-portable-bitmap, image/x-portable-graymap,
image/x-portable-pixmap, image/x-psd,
image/x-qtif, image/x-sgi-rgb,
image/x-sun-raster, image/x-tga,
image/x-xbitmap, image/x-xpixmap,
text/plain

An updated version of my IPP utility is available at
https://theberrymans.com/php_kits/ipp.zip

Among other things, this version adds the /device_url switch to the show
command so that one can query a CUPS server. It also no longer requires
privilege to run. See the included readme file for details.

Mark Berryman
Chris Townley
2021-05-04 19:03:30 UTC
Permalink
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing.  This
is indicated by the document formats they support.  Typically, such
application/vnd.hp-PCL: this is HP’s Printer Control Language.  It is
text with escape sequences although binary data can be included when
graphics are involved.
image/jpeg: a standard JPEG file
application/PCLm: contrary to its name, PCLm has nothing to do with PCL.
It is a subset of PDF, basically the raster functions of PDF.  Any PDF
viewer can view PCLm files, the reverse is not true.
image/urf: This is Apple’s raster format.  This is what AirPrint uses.
Any file to be printed is converted to a raster and sent to the printer.
image/pwg-raster: This is the Printer Working Group’s raster format.
Probably similar to Apple’s but documented and free to use.  This
format, along with PCLm, is used by Mopria for printing from Android phones.
Some of these printers have also been known to accept text or postscript
but some of the ones I've received feedback on do not.
Until VMS gets a rasterising utility, it can't really print much to such
printers.  At least not directly.  There is, however, a work-around.
CUPS has a number of x-to-raster filters included with it and CUPS is
also an IPP server.  Thus, if you have unix type system, such as a Mac,
Raspberry Pi, Linux, etc. configured to talk to your printer, you can
use the IPP utility I posted to print files through that system.
application/octet-stream, image/urf, image/pwg-raster, application/pdf,
image/jpeg, application/postscript, application/vnd.hp-PCL, text/plain
application/octet-stream, application/pc-eps, application/pdf,
application/postscript, application/vnd.apple-postscript,
application/vnd.cups-banner, application/vnd.cups-pdf,
application/vnd.cups-postscript, application/vnd.cups-raster,
application/vnd.cups-raw, application/x-cshell, application/x-csource,
     application/x-perl, application/x-shell,           image/fuji-raw,
image/gif, image/imageio,                 image/jp2, image/jpeg,
image/minolta-raw,                       image/openexr, image/pict,
image/png,                         image/pwg-raster, image/rad,
image/tiff,                              image/urf, image/x-alias,
image/x-bitmap,                                    image/x-bmp,
image/x-ico, image/x-icon,
image/x-photocd, image/x-portable-anymap, image/x-portable-bitmap,
image/x-portable-graymap,              image/x-portable-pixmap,
image/x-psd,                image/x-qtif, image/x-sgi-rgb,
image/x-sun-raster, image/x-tga,        image/x-xbitmap,
image/x-xpixmap,      text/plain
An updated version of my IPP utility is available at
https://theberrymans.com/php_kits/ipp.zip
Among other things, this version adds the /device_url switch to the show
command so that one can query a CUPS server.  It also no longer requires
privilege to run.  See the included readme file for details.
Mark, many thanks for your work on this.

I failed to get mine to print with a PCL wrapper, and have only just
finished reconfiguring the printer from Windows (it lost colour!) and
the Pi, as that one wasn't working.

Have now printed successfully from my AXP emulator. Will now try it from
my physical alpha...
--
Chris Townley
Phillip Helbig (undress to reply)
2021-05-04 20:09:24 UTC
Permalink
Post by Mark Berryman
An updated version of my IPP utility is available at
https://theberrymans.com/php_kits/ipp.zip
Among other things, this version adds the /device_url switch to the show
command so that one can query a CUPS server. It also no longer requires
privilege to run. See the included readme file for details.
Thanks very much for this. I'll definitely investigate it more in the
future and will probably find that you've already solved some of my
problems. :-)
Chris Townley
2021-05-04 20:39:29 UTC
Permalink
Post by Phillip Helbig (undress to reply)
Post by Mark Berryman
An updated version of my IPP utility is available at
https://theberrymans.com/php_kits/ipp.zip
Among other things, this version adds the /device_url switch to the show
command so that one can query a CUPS server. It also no longer requires
privilege to run. See the included readme file for details.
Thanks very much for this. I'll definitely investigate it more in the
future and will probably find that you've already solved some of my
problems. :-)
So Phillip it gives you the chance to get a Raspberry Pi running Linux
to have a play with...

:)
--
Chris
Simon Clubley
2021-05-04 20:49:44 UTC
Permalink
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support. Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language. It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.

Is there any indication of which PCL version(s) this covers ?

Simon.
--
Simon Clubley, ***@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
Mark Berryman
2021-05-05 16:19:29 UTC
Permalink
Post by Simon Clubley
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support. Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language. It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.
Is there any indication of which PCL version(s) this covers ?
Yes. Each printer will have some attribute indicating which version of
the various protocols it supports. Mine, for example, claims PCL 6 support.

Mark
Louis Krupp
2021-05-05 19:49:38 UTC
Permalink
Post by Simon Clubley
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. 
This
is indicated by the document formats they support.  Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language.  It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.
Is there any indication of which PCL version(s) this covers ?
Yes.  Each printer will have some attribute indicating which version
of the various protocols it supports.  Mine, for example, claims PCL 6
support.
FWIW:

PCL 5, to my knowledge, is a superset of PCL 4, which is a superset of
PCL 3, and so on. PCL 6 (also known as PCL XL) is very different.

I haven't seen any glaring inaccuracies in the Wikipedia entry:

https://en.wikipedia.org/wiki/Printer_Command_Language#PCL_levels_1_through_5_overview

(I worked on embedded PCL 5 and PCL 6 interpreters about twenty years ago.)

Louis
Mark Berryman
2021-05-05 21:20:06 UTC
Permalink
Post by Louis Krupp
Post by Simon Clubley
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support.  Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language.  It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.
Is there any indication of which PCL version(s) this covers ?
Yes.  Each printer will have some attribute indicating which version
of the various protocols it supports.  Mine, for example, claims PCL 6
support.
PCL 5, to my knowledge, is a superset of PCL 4, which is a superset of
PCL 3, and so on. PCL 6 (also known as PCL XL) is very different.
https://en.wikipedia.org/wiki/Printer_Command_Language#PCL_levels_1_through_5_overview
(I worked on embedded PCL 5 and PCL 6 interpreters about twenty years ago.)
As far as I know, PCL 6 "enhanced" is PCL XL. PCL 6 "standard",
frequently written as simply PCL 6, is the same as PCL 5e (or PCL 5c if
color).

As an example, my printer claims PCL 6, and has properly printed every
PCL file I've thrown at it, most of which were PCL 3.

Mark Berryman
Louis Krupp
2021-05-06 03:35:29 UTC
Permalink
Post by Louis Krupp
Post by Simon Clubley
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support. Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language.  It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.
Is there any indication of which PCL version(s) this covers ?
Yes.  Each printer will have some attribute indicating which version
of the various protocols it supports.  Mine, for example, claims PCL
6 support.
PCL 5, to my knowledge, is a superset of PCL 4, which is a superset
of PCL 3, and so on. PCL 6 (also known as PCL XL) is very different.
https://en.wikipedia.org/wiki/Printer_Command_Language#PCL_levels_1_through_5_overview
(I worked on embedded PCL 5 and PCL 6 interpreters about twenty years ago.)
As far as I know, PCL 6 "enhanced" is PCL XL.  PCL 6 "standard",
frequently written as simply PCL 6, is the same as PCL 5e (or PCL 5c
if color).
As an example, my printer claims PCL 6, and has properly printed every
PCL file I've thrown at it, most of which were PCL 3.
Basically, PCL 6 *is* PCL XL.

I also have a printer that claims PCL 6 support. When I printed a Word
document and selected "Print to file," I got this:

%-***@PJL JOB
@PJL SET JOBATTR "OS =Windows"
@PJL SET JOBATTR "OS Version = Windows 8.1 6.3.9600.1"
@PJL SET JOBATTR "Render Type = InOS"
@PJL SET JOBATTR "Render Name = HP PCL6 Class Driver"
@PJL SET JOBATTR "Render Version=6.3.4.1"
@PJL SET COPIES=1
@PJL SET QTY=1
@PJL SET RESOLUTION=600
@PJL ENTER LANGUAGE=PCLXL
) HP-PCL XL;2;0;Comment Copyright(c) 1999-2011 Hewlett-Packard Corporation
<stuff in binary>LETTER

The first few lines are in PJL, or Printer Job Language. The stuff in
binary looks like this when run through the Linux octal dump (od)
command with the flags "-a -A none":

    C   o   r   p   o   r   a   t   i   o   n  nl   Q   X stx   X
 stx   x  ht   @ nul   x ack   @ etx   x  si   A   @ nul   x  bs
   @ soh   x stx   H   @ soh   x   &   @ nul   x   (   @ nul   x
   4   @ nul   x   (   H   @ ack   L   E   T   T   E   R   x   %
   C   U nul nul nul   ? nul nul nul   ?   x   +   w   @ soh   x
   G   q   @ soh   x   H   r   @ soh   x etx   j   @ nul   x   -
   x   @ nul   x   -   |   a   H   @ stx   F   0   x   (   @ nul
   x   )   O   A   &   8   x   '   P   z   &   8 nul nul nul nul

It's mostly binary, glorious binary. There are none of the escape
sequences that characterize PCLn (where n <= 5), like this file I found
online:

esc   &   l   3   A esc   &   l   0   o   0   l   6   d 3   E
 esc   *   p   0   Y esc   *   v   0   t   0   n   0   O esc   (
   8   U esc   (   s   0   p   1   0   h   1   2   v   0   s   0
   b   3   T esc   *   p   2   9   9   x   7   0   Y   D   S   I
  sp   T   E   S   T  sp   L   E   N   D   E   R  sp   F   O   R

I'm having a hard time finding a PCL6 reference manual online.

Two things about your printer:

1. I'm sure your printer supports PCL6. It also supports PCL5 and its
ancestors.

2. PCL6 support might or might not even matter. It might be there
because printer manufacturers believe that the more page description
languages (like PCL5, PCL6, XPS) the printer supports and the more of
them are listed on the box, the more likely you are to buy the printer.
I worked for a company that built PDF support into some of its printers;
if the driver could send a PDF file to the printer, the printer could
print it. This required the printer to have its own disk drive so it
could spool the PDF file; if you've worked with PDF internals, you'll
know that you might be able to print the first page right away, but to
print anything else, you have to read the directory that's at the *end*
of the file. I've never had a problem with opening a file with Adobe
Acrobat Reader and letting it talk to the printer, but I'm sure that in
some situations, it's good to bypass that.

Louis

Scott Dorsey
2021-05-05 23:12:42 UTC
Permalink
Post by Mark Berryman
Post by Simon Clubley
Post by Mark Berryman
Based on feedback, it would appear that a number of the printers out
there are designed more for mobile printing than desktop printing. This
is indicated by the document formats they support. Typically, such
application/vnd.hp-PCL: this is HP?s Printer Control Language. It is
text with escape sequences although binary data can be included when
graphics are involved.
Just for completion, there are multiple PCL versions around.
Is there any indication of which PCL version(s) this covers ?
Yes. Each printer will have some attribute indicating which version of
the various protocols it supports. Mine, for example, claims PCL 6 support.
If you don't know, run the self test page on the printer and it will likely
say.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Loading...