delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/12/10:12:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3EBFAB7D.6040402@mimosa.ceng.cea.fr>
Date: Mon, 12 May 2003 16:11:09 +0200
From: gilles civario <civario AT mimosa DOT ceng DOT cea DOT fr>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425
X-Accept-Language: fr,en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Cc: CIVARIO Gilles <civario AT mimosa DOT ceng DOT cea DOT fr>
Subject: Re: a2ps and printer
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0305120926500 DOT 393-100000 AT slinky DOT cs DOT nyu DOT edu>
In-Reply-To: <Pine.GSO.4.44.0305120926500.393-100000@slinky.cs.nyu.edu>

Igor Pechtchanski wrote:
> On Mon, 12 May 2003, gilles civario wrote:
> 
> 
>>Hello.
>>
>>I've just fond the a2ps-4.2.1 pakage on my favorite repository and
>>I've tested it. As a fan of a2ps for printing source listings, I'd
>>already installed the version 4.13 on my machine. And with an very
>>dirty hack, I managed to use a samba-shared network printer with it.
>>If somebody cares about it, here is a diff between the initial version
>>of the file <root>/etc/a2ps-site.cfg and my new one :
>>
>>$ diff a2ps-site.cfg.init a2ps-site.cfg
>>41c41
>>< DefaultPrinter: | #{lp.default}
>>---
>>
>>>DefaultPrinter: | cat > /tmp/foo.ps ;cd /tmp; /cygdrive/c/WINNT/system32/lpr -S mimosa -P glaieul foo.ps ; rm foo.ps
>>
>>48c48
>>< UnknownPrinter: | #{lp} #o
>>---
>>
>>>UnknownPrinter: | cat > /tmp/foo.ps ;cd /tmp; /cygdrive/c/WINNT/system32/lpr -S mimosa -P #o foo.ps ; rm foo.ps
>>
>>Where mimosa is the name of the network print server and glaieul is
>>the name of the default printer.
>>I suppose there is a more elegant way to do this, but this is the only
>>one I've found.
>>
>>Regards.
>>Gilles.
> 
> 
> Gilles,
> 
> Any particular reason "a2ps -P //mimosa/glaieul" doesn't work?  Something
> like that (with a possible substitution of '/' by '\') worked for me at
> some point.  Unfortunately, I'm not able to verify this just now, but if
> it doesn't work for you, I can send a follow-up later with the exact
> invocation (when I'm at a machine that has a shared printer)...
> 	Igor

I've never thought about this.
Ok, let's try (sorry for the french messages) :

$ /bin/a2ps -P //mimosa/glaieul gettime.c
[gettime.c (C): 1 page on 1 sheet]
lpr: can't open '//mimosa/glaieul' for writing
lpr: Le nom de l'imprimante n'est pas valide.

a2ps: received signal 13: Broken pipe
$

=> no output on the printer

Nevertheless, with the classical cp methode, it works
$ cp gettime.c //mimosa/glaieul
$

=> a print lp-style

With a little bit of verbosity :

$ /bin/a2ps --verbose=files -P //mimosa/glaeuil gettime.c
r-fopen (/usr/share/a2ps/ppd/level1.ppd)
Parsing file `/usr/share/a2ps/ppd/level1.ppd'
End of PPD file `/usr/share/a2ps/ppd/level1.ppd'.
Loading map file `/usr/share/a2ps/encoding/encoding.map'
r-fopen (/usr/share/a2ps/encoding/encoding.map)
r-fopen (/usr/share/a2ps/encoding/iso1.edf)
Loading map file `/usr/share/a2ps/afm/fonts.map'
r-fopen (/usr/share/a2ps/afm/fonts.map)
Outputing file bw.pro
r-fopen (/usr/share/a2ps/ps/bw.pro)
Including file 'base.ps' upon request given in '/usr/share/a2ps/ps/bw.pro':31
Outputing file base.ps
r-fopen (/usr/share/a2ps/ps/base.ps)
Including file 'a2ps.hdr' upon request given in '/usr/share/a2ps/ps/bw.pro':32
Outputing file a2ps.hdr
r-fopen (/usr/share/a2ps/ps/a2ps.hdr)
Parsing file `/usr/share/a2ps/afm/pcrr.afm'
r-fopen (/usr/share/a2ps/afm/pcrr.afm)
Parsing file `/usr/share/a2ps/afm/pcrro.afm'
r-fopen (/usr/share/a2ps/afm/pcrro.afm)
Parsing file `/usr/share/a2ps/afm/pcrb.afm'
r-fopen (/usr/share/a2ps/afm/pcrb.afm)
Parsing file `/usr/share/a2ps/afm/phvr.afm'
r-fopen (/usr/share/a2ps/afm/phvr.afm)
Parsing file `/usr/share/a2ps/afm/phvb.afm'
r-fopen (/usr/share/a2ps/afm/phvb.afm)
Parsing file `/usr/share/a2ps/afm/ptmr.afm'
r-fopen (/usr/share/a2ps/afm/ptmr.afm)
Parsing file `/usr/share/a2ps/afm/psyr.afm'
r-fopen (/usr/share/a2ps/afm/psyr.afm)
Parsing file `/usr/share/a2ps/afm/pcrbo.afm'
r-fopen (/usr/share/a2ps/afm/pcrbo.afm)
Loading sheets map `/usr/share/a2ps/sheets/sheets.map'
r-fopen (/usr/share/a2ps/sheets/sheets.map)
Getting ready to print file `gettime.c', with command `c'
r-fopen (/usr/share/a2ps/sheets/c.ssh)
Parsing file `/usr/share/a2ps/sheets/c.ssh'
perl-open (|\040\040lpr\040\040-P\040//mimosa/glaeuil)
w-popen (lpr  -P //mimosa/glaeuil)
lpr: can't open '//mimosa/glaeuil' for writing
lpr: Le nom de l'imprimante n'est pas valide.

a2ps: received signal 13: Broken pipe
$


Any idea ?

Thanks.

Gilles.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019