9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] anyone attempted to build ghostscript recently?
@ 2013-05-03 14:18 Steve Simon
  2013-05-03 14:22 ` erik quanstrom
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Steve Simon @ 2013-05-03 14:18 UTC (permalink / raw)
  To: 9fans

Thinking of tackeling ghostscript again but failed at the first hurdle,
it needs autotools to build...

Anyone attempted this?

-Steve



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 14:18 [9fans] anyone attempted to build ghostscript recently? 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 16:20 ` tlaronde
  2 siblings, 1 reply; 18+ messages in thread
From: erik quanstrom @ 2013-05-03 14:22 UTC (permalink / raw)
  To: 9fans

On Fri May  3 10:19:43 EDT 2013, steve@quintile.net wrote:
> Thinking of tackeling ghostscript again but failed at the first hurdle,
> it needs autotools to build...

oh please do!

one question, though.  are there better alternatives than ghostscript
for pdf?  ghostscript usually fails for simple documents on my amd64
machine with (to me) inscrutible postscript stack traces.  i find that
often ghostscript also fails on linux for the same document, but e.g.
evince does not.

- erik



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 14:22 ` erik quanstrom
@ 2013-05-03 14:34   ` Kurt H Maier
  0 siblings, 0 replies; 18+ messages in thread
From: Kurt H Maier @ 2013-05-03 14:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, May 03, 2013 at 10:22:13AM -0400, erik quanstrom wrote:
>
> one question, though.  are there better alternatives than ghostscript

evince is a poppler frontend; poppler's problematic dependencies include
glib and cmake.  poppler is descended from xpdf, whose problematic
dependencies are include freetype and motif, although I believe the
actual pdf rendering code doesn't invoke any motif.

khm



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 14:18 [9fans] anyone attempted to build ghostscript recently? Steve Simon
  2013-05-03 14:22 ` erik quanstrom
@ 2013-05-03 15:53 ` David du Colombier
  2013-05-03 20:08   ` Steve Simon
  2013-05-03 16:20 ` tlaronde
  2 siblings, 1 reply; 18+ messages in thread
From: David du Colombier @ 2013-05-03 15:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Thinking of tackeling ghostscript again but failed at the first hurdle,
> it needs autotools to build...
>
> Anyone attempted this?

Ghostscript 8.53 was already using autotools, but Russ Cox wrote a
mkfile for it when he ported it to Plan 9.
The current mkfile is already able to compile Ghostscript up to 8.63,
with almost no change. However, I'm only using Ghostscript 8.56, since
I wasn't able to run the following releases properly.

You could probably use the current mkfile as a base and expend it.
There are probably changes needed in the code that should be pushed
upstream.

--
David du Colombier



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 14:18 [9fans] anyone attempted to build ghostscript recently? Steve Simon
  2013-05-03 14:22 ` erik quanstrom
  2013-05-03 15:53 ` David du Colombier
@ 2013-05-03 16:20 ` tlaronde
  2013-05-03 16:26   ` a
  2 siblings, 1 reply; 18+ messages in thread
From: tlaronde @ 2013-05-03 16:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, May 03, 2013 at 03:18:40PM +0100, Steve Simon wrote:
> Thinking of tackeling ghostscript again but failed at the first hurdle,
> it needs autotools to build...

Plan A, create a SmallScript borrowing the rasterizing routines of
METAFONT and not aiming to be a full PostScript interpreter.

Plan B, get rid of PostScript altogether and use TeX and METAFONT and/or
fonts available with the glyphes, and render directly from dvi to pdf,
dvi to raw (image), dvi to pcl; even using virtual fonts to render
approximately fonts not present with glyphes definition for
previsualisation, and using dvips for direct printing to real
PostScript interpreters (with embedded compliant PostScript standard
fonts).

Isn't there a sentence about "wanting a banana, and being forced to
have a Gorilla handing the banana with the whole jungle around"?
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 16:20 ` tlaronde
@ 2013-05-03 16:26   ` a
  2013-05-03 16:48     ` tlaronde
  0 siblings, 1 reply; 18+ messages in thread
From: a @ 2013-05-03 16:26 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

...and how does that help me read a pre-existing PDF document?

[-- Attachment #2: Type: message/rfc822, Size: 4352 bytes --]

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: Fri, 3 May 2013 18:20:39 +0200
Message-ID: <20130503162039.GA557@polynum.com>

On Fri, May 03, 2013 at 03:18:40PM +0100, Steve Simon wrote:
> Thinking of tackeling ghostscript again but failed at the first hurdle,
> it needs autotools to build...

Plan A, create a SmallScript borrowing the rasterizing routines of
METAFONT and not aiming to be a full PostScript interpreter.

Plan B, get rid of PostScript altogether and use TeX and METAFONT and/or
fonts available with the glyphes, and render directly from dvi to pdf,
dvi to raw (image), dvi to pcl; even using virtual fonts to render
approximately fonts not present with glyphes definition for
previsualisation, and using dvips for direct printing to real
PostScript interpreters (with embedded compliant PostScript standard
fonts).

Isn't there a sentence about "wanting a banana, and being forced to
have a Gorilla handing the banana with the whole jungle around"?
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 16:26   ` a
@ 2013-05-03 16:48     ` tlaronde
  2013-05-03 17:14       ` Jack Johnson
  0 siblings, 1 reply; 18+ messages in thread
From: tlaronde @ 2013-05-03 16:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, May 03, 2013 at 12:26:47PM -0400, a@9srv.net wrote:
> ...and how does that help me read a pre-existing PDF document?

Reading a pre-existing PDF document does not need ghostscript. PDF
is supposed to be in the dvi class, and predigested rendering. So it
should be easier to "port" a PDF library... except that the existing
ones are C++ and there is an inflation of "interactive" features (that
keep Adobe cutting edge even if the language is documented and royalty
free).

So, reading existing things is one thing. Producing things that we are
unable to render is another one. You may have the obligation of the
former; not the latter. This the sense of my comment.
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 16:48     ` tlaronde
@ 2013-05-03 17:14       ` Jack Johnson
  2013-05-03 17:16         ` erik quanstrom
  2013-05-03 17:50         ` tlaronde
  0 siblings, 2 replies; 18+ messages in thread
From: Jack Johnson @ 2013-05-03 17:14 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

Is a PS/PDF library something that might benefit from reconstruction in Go?
Or is it just a spaghetti mess?

[-- Attachment #2: Type: text/html, Size: 130 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  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
  1 sibling, 2 replies; 18+ messages in thread
From: erik quanstrom @ 2013-05-03 17:16 UTC (permalink / raw)
  To: 9fans

On Fri May  3 13:15:41 EDT 2013, knapjack@gmail.com wrote:

> Is a PS/PDF library something that might benefit from reconstruction in Go?
> Or is it just a spaghetti mess?

go or c, a fresh implementation might be an improvement,
and given the weight of some of the other options, might be
more time-efficient than one would think.

- erik



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 17:16         ` erik quanstrom
@ 2013-05-03 17:24           ` pmarin
  2013-05-03 17:27           ` Jeff Sickel
  1 sibling, 0 replies; 18+ messages in thread
From: pmarin @ 2013-05-03 17:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

What about mupdf? It has few dependecies [1]

http://mupdf.com/doc/
[1] http://git.ghostscript.com/?p=mupdf.git;a=tree;f=thirdparty;hb=HEAD

pmarin.


On Fri, May 3, 2013 at 7:16 PM, erik quanstrom <quanstro@quanstro.net>wrote:

> On Fri May  3 13:15:41 EDT 2013, knapjack@gmail.com wrote:
>
> > Is a PS/PDF library something that might benefit from reconstruction in
> Go?
> > Or is it just a spaghetti mess?
>
> go or c, a fresh implementation might be an improvement,
> and given the weight of some of the other options, might be
> more time-efficient than one would think.
>
> - erik
>
>

[-- Attachment #2: Type: text/html, Size: 1208 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 17:16         ` erik quanstrom
  2013-05-03 17:24           ` pmarin
@ 2013-05-03 17:27           ` Jeff Sickel
  1 sibling, 0 replies; 18+ messages in thread
From: Jeff Sickel @ 2013-05-03 17:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On May 3, 2013, at 12:16 PM, erik quanstrom <quanstro@quanstro.net> wrote:

> On Fri May  3 13:15:41 EDT 2013, knapjack@gmail.com wrote:
> 
>> Is a PS/PDF library something that might benefit from reconstruction in Go?
>> Or is it just a spaghetti mess?
> 
> go or c, a fresh implementation might be an improvement,
> and given the weight of some of the other options, might be
> more time-efficient than one would think.

There are several somewhat portable pdf rendering libraries
out there.  Some with mostly C and a little sprinkling of
C++ (like mupdf.com).  If we had a Javascript interpreter
and support or SVG then https://wiki.mozilla.org/PDF.js
might be an option once that group irons out the kinks.

-jas




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 17:14       ` Jack Johnson
  2013-05-03 17:16         ` erik quanstrom
@ 2013-05-03 17:50         ` tlaronde
  2013-05-03 18:10           ` Aram Hăvărneanu
  1 sibling, 1 reply; 18+ messages in thread
From: tlaronde @ 2013-05-03 17:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, May 03, 2013 at 09:14:18AM -0800, Jack Johnson wrote:
> Is a PS/PDF library something that might benefit from reconstruction in Go?
> Or is it just a spaghetti mess?

Whatever the way (porting existing to Go or writing from scratch), a Go
version would be an improvement against a C++ one with gigabytes
of dependencies. This may be (partly) achievable with a PDF library,
I doubt something like Ghostscript is achievable (and I even wonder if
that makes sense to reimplement a full PostScript interpreter).

The problem is: if this is just to render documents created on Plan9,
a minimum is required, but one could get rid entirely of PostScript or
PDF. If this is to view an external PDF document, or to render an
external PS document, that may use the latest version (for PDF) or a lot
of features (for PS), you're skrewed. But in this case, there are
probably online PDF viewers...

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



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 17:50         ` tlaronde
@ 2013-05-03 18:10           ` Aram Hăvărneanu
  2013-05-03 18:34             ` tlaronde
  0 siblings, 1 reply; 18+ messages in thread
From: Aram Hăvărneanu @ 2013-05-03 18:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> But in this case, there are
> probably online PDF viewers...

But no Plan 9 browsers.

--
Aram Hăvărneanu



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 18:10           ` Aram Hăvărneanu
@ 2013-05-03 18:34             ` tlaronde
  2013-05-03 18:38               ` erik quanstrom
  0 siblings, 1 reply; 18+ messages in thread
From: tlaronde @ 2013-05-03 18:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, May 03, 2013 at 08:10:26PM +0200, Aram H?v?rneanu wrote:
> > But in this case, there are
> > probably online PDF viewers...
>
> But no Plan 9 browsers.

Yes... But this is also why, concurrently, work has to be done to get
rid of some unnecessities: that documents produced on Plan9 be viewable
on Plan9 with only Plan9 means (external documents are another problem).
And this is why I prefer TeX other *roff: not because of some religious
war; but because TeX is a whole system, including fonts and mean to
make them, and there is a shortest path to full autonomy. (And this is
why kerTeX will still produce DVI, even with extensions, and not
directly PDF.)

What would be fun would be a... PDF to DVI converter (because it will
mean a huge part of "dropping" features---/dev/null is something I can
not do without.)
--
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 18:34             ` tlaronde
@ 2013-05-03 18:38               ` erik quanstrom
  2013-05-03 18:53                 ` Jack Johnson
  0 siblings, 1 reply; 18+ messages in thread
From: erik quanstrom @ 2013-05-03 18:38 UTC (permalink / raw)
  To: 9fans

> Yes... But this is also why, concurrently, work has to be done to get
> rid of some unnecessities: that documents produced on Plan9 be viewable
> on Plan9 with only Plan9 means (external documents are another problem).

ghostscript already renders plan 9 produced pdf just fine.
so that problem is solved, and there's no need to do anything.

what we need is better access to externally produced documents.

- erik



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 18:38               ` erik quanstrom
@ 2013-05-03 18:53                 ` Jack Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Jack Johnson @ 2013-05-03 18:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

On Fri, May 3, 2013 at 10:38 AM, erik quanstrom <quanstro@labs.coraid.com>wrote:

> > Yes... But this is also why, concurrently, work has to be done to get
> > rid of some unnecessities: that documents produced on Plan9 be viewable
> > on Plan9 with only Plan9 means (external documents are another problem).
>
> ghostscript already renders plan 9 produced pdf just fine.
> so that problem is solved, and there's no need to do anything.
>
> what we need is better access to externally produced documents.
>

So, skipping interactivity, what about a pdf2pdf filter?

-Jack

[-- Attachment #2: Type: text/html, Size: 993 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 15:53 ` David du Colombier
@ 2013-05-03 20:08   ` Steve Simon
  2013-05-04  7:43     ` tlaronde
  0 siblings, 1 reply; 18+ messages in thread
From: Steve Simon @ 2013-05-03 20:08 UTC (permalink / raw)
  To: 9fans

> Russ Cox wrote a
> mkfile for it when he ported it to Plan 9.

thanks,

yes I looked at ghostscript a year or two ago but they seem
to have changed their directory layout and modifying the mkfile
was not straightforward.

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.

I will try again.

-Steve



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9fans] anyone attempted to build ghostscript recently?
  2013-05-03 20:08   ` Steve Simon
@ 2013-05-04  7:43     ` tlaronde
  0 siblings, 0 replies; 18+ messages in thread
From: tlaronde @ 2013-05-04  7:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-05-04  7:43 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-03 14:18 [9fans] anyone attempted to build ghostscript recently? 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
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

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).