Problems creating new printer with ppd for ps-file output only!

Goffioul Michael goffioul at imec.be
Mon Jul 18 11:01:20 CEST 2005


> On 15 July 2005 01:52, Gero Mudersbach wrote:
> > Hello,
> >
> > I have the following problem:
> >
> > I have to create a postscript "ps" file using a special ppd 
> file for a film
> > imagesetter (it's not installed locally, so I have to get a 
> ps file). I
> > would like to use any kde application. So it would be nice 
> to use kdeprint
> > for setting up a new printer. How do I add a new printer 
> with kdeprint that
> > uses a ppd file for printing and redirects the output to a 
> postscript file?
> >
> 
> I think I'm not sure in which way the generated postscript 
> will be influenced 
> by the ppd. Usually, the application outputs postscript 
> according to some 
> user choices and postscript is a generic and portable 
> language (at least in 
> theory). The ppd is just that, a printer description. It will 
> only tell about 
> printer's capabilities (color, duplex, collations, paper 
> sizes supported, 
> trays etc.) that can be used when actually printing the 
> already available 
> postscript.

Yes and no. The PPD file also contains the required PS commands that
needs to be inserted in the PS file to trigger some capabilities of
the printer. This operations is performed by the CUPS server. Sometimes,
this is done by the application itself (OO, Gimp), but this is not the
case of KDEPrint.

> > Any idea would be great!
> 
> Right now I think the only way to make use of ppd files in 
> linux is by using a 
> CUPS server. Thus, you will need either a cups server on your 
> machine, or 
> administrator access to your remote cups server. In the first 
> case, I think 
> you can simply use the "Add printer" command in the KDE 
> Printer Manager (or 
> the kaddprinterwizzard app, it's the same) and choose "Local 
> Printer", then 
> choose "PostScript" and click on the "Other" button, which 
> will let you 
> select a PPD file. Once the printer added, all you have to do 
> is select 
> "print preview". This generates a temporary postscript file. 
> I think there 
> has to be a "print to file" option too, but I don't have any printer 
> installed right now to test this.

A more elegant way is to use a "file" backend with the CUPS server. This
backend should send any print data coming from the server to a local file.
This backend used to exist in previous CUPS version, but it has been removed
(for security reasons, I think). So you have to create it yourself. The
easiest is to start from the pdfdistiller script found at
ftp://ftp.kde.org/pub/kde/printing/pdfdistiller/. In this case, the command
to execute should be cat. In attachment, you'll find an example (not tested).

Put the script in /usr/lib/cups/backend/ dir and restart CUPS. Then use
the KDE wizard to add a printer and select your new backend (use "Others"
as printer type) with your PPD file (use the "Others" button when requested
for a printer model).

I didn't test this procedure, os it might need some adaptation. But I hope you
got the idea.

Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file
Type: application/octet-stream
Size: 2825 bytes
Desc: file
Url : http://mail.kde.org/pipermail/kde-print/attachments/20050718/3b3837d9/file.obj


More information about the kde-print mailing list