Postscript Printer Definition

Brian K. White brian at aljex.com
Fri May 21 17:54:53 PDT 2010


On 5/21/2010 3:36 PM, Bill Campbell wrote:
> On Fri, May 21, 2010, Rob Lewis wrote:
>    
>> Hi Bob,
>>      
>    
>> Actually what I need to do is print to PDF.  I have CUPS running and have a
>> printer configure there that prints to a PDF formatted file.  Works fine
>> with no print codes, but of course the customer wants formatting. :)
>>      
> I usually do this on *nix systems using groff which takes plain
> text input, and can create a variety of outputs including
> Postscript and PDF.  It's even more fun with gplot to create
> pretty graphs which can be include in groff using .PSPIC.
>
> Bill
>    

Also there are a2ps and enscript.

Basically, as Bob said, PS is really a programming language. Most old 
printers control codes were essentially just simple markup, and likewise 
that's all filepro print code tables do is allow you to swap in 
equivalent but different markup tags in the same places in a document.

roff (troff, groff) , a2ps, enscript are all programs that read in their 
own markup codes and output a document. a2ps and enscript specifically 
output postscript, *roff can output several different things including 
postscript.

So you would write a print code table using the markup codes from one of 
those apps, so the print code table outputs, say, groff markup codes, 
and then write a printer definition that uses a script to run the data 
through groff to output ps, or feeds the ps into ghostscript to output 
pdf directly.

Or you could use one of the existing hplaser tables and have your 
printer definition use ghostpdl (pcl2pdf) to read the pcl and output the 
pdf directly.
No ps, no new print code table, no groff/a2ps/enscript

I think with a little digging you can configure cups to make use of 
ghostpdl directly also.
I also think cups is already ready to make use of groff and a2ps 
directly, not as sure about enscript, where you can feed it those data 
types and it will output whatever you want that cups supports, including 
the pdf printer you already have.

So for a couple of different reasons I don't think you actually need to 
go through the bother of getting fp to output ps.

-- 
bkw

-- 
bkw


More information about the Filepro-list mailing list