9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: tlaronde@polynum.com
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] anyone attempted to build ghostscript recently?
Date: Sat,  4 May 2013 09:43:16 +0200	[thread overview]
Message-ID: <20130504074316.GA570@polynum.com> (raw)
In-Reply-To: <cd82e4c43219b1383bc7353ae4a869eb@quintile.net>

On Fri, May 03, 2013 at 09:08:26PM +0100, Steve Simon wrote:
> 
> My need is for postscript to pcl6 for the printer we have, currently I
> run ghostscript under linuxemu which works but I I would prefer to have
> a working native port.
> 

Since I had to try to print to an HP with PCL (in fact, with HPGL
embedded in PCL, with job dispatched by PJL...) I looked for a direct
whatever to HPGL (there was a now nuked program in cups in the
early days) or for whatever to PCL. I have not managed to get a
working ghostscript combination that can be swallowed by the HP
big designjet, so I have read the ghostscript sources and the
cups sources.

Problem: there is a mixing of PJL directly in the drivers (while PJL
should be left outside for what it is: embedding printer jobs---lp
level); cups uses ghostscript mainly to rasterize a PS document and then
to produce PJL and PCL commands to embed this image in a job the PCL
printer can eat.

For the task at end, you might have more success by using the
Ghostscript shipped by Plan9 to create a raw image (à la cups)
and to write the filter to embed this image in PCL commands, and
these in PJL (PCL and PJL are now finally documented by HP).

If you have a network connected printer (or a printer connected to a
bi-directional parallel port) to discover what is supported by the
printer, use PJL (sh(1) example used from an Unix):

------------
#!/bin/sh
#

# lpd status.
#
LPD_OK=0
LPD_ERROR=1
LPD_FATAL=2

PJL_UEL='^[%-12345X' # Universal Exist Language : sentry

PJL_LANGUAGE_SWITCH='^[E' # for printers supporting several languages

# If used as a filter for lpd, it has to have "something".
#
cat >/dev/null

# Opening the job.
#
printf '%s' $PJL_UEL

# Ensure we send us something.
#
printf '@PJL USTATUS DEVICE=VERBOSE\n'

# A custom string is echoed because there can be informations sent to
# someone else for something else. This is to now this is linked to our
# request.
#
printf '@PJL ECHO KerGIS requesting config %s\n' "$(date -u '+%F %T')"

# If the printer does not support the category, the answer is:
#
# "?" <CR><LF>
# <FF>
#
# Hence, we ask for everything hoping to have something...

# INFO
#
printf '@PJL INFO ID\n'
printf '@PJL INFO CONFIG\n'
printf '@PJL INFO FILESYS\n'
printf '@PJL INFO MEMORY\n'
printf '@PJL INFO PAGECOUNT\n'
printf '@PJL INFO STATUS\n'
printf '@PJL INFO VARIABLES\n'
printf '@PJL INFO USTATUS\n'

# INQUIRE et DINQUIRE.
#
printf '@PJL INQUIRE PERSONALITY\n'
printf '@PJL INQUIRE RESOLUTION\n'
printf '@PJL INQUIRE RESOURCESAVE\n'

# End of job
#
printf '%s' $PJL_UEL

exit $LPD_OK
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



  reply	other threads:[~2013-05-04  7:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 14:18 Steve Simon
2013-05-03 14:22 ` erik quanstrom
2013-05-03 14:34   ` Kurt H Maier
2013-05-03 15:53 ` David du Colombier
2013-05-03 20:08   ` Steve Simon
2013-05-04  7:43     ` tlaronde [this message]
2013-05-03 16:20 ` tlaronde
2013-05-03 16:26   ` a
2013-05-03 16:48     ` tlaronde
2013-05-03 17:14       ` Jack Johnson
2013-05-03 17:16         ` erik quanstrom
2013-05-03 17:24           ` pmarin
2013-05-03 17:27           ` Jeff Sickel
2013-05-03 17:50         ` tlaronde
2013-05-03 18:10           ` Aram Hăvărneanu
2013-05-03 18:34             ` tlaronde
2013-05-03 18:38               ` erik quanstrom
2013-05-03 18:53                 ` Jack Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130504074316.GA570@polynum.com \
    --to=tlaronde@polynum.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).