Bug 127401

Summary: kdeprint: Catastrophe! - Print to File (PDF)
Product: [Unmaintained] kdeprint Reporter: Pierre Habouzit <madcoder>
Component: generalAssignee: KDEPrint Devel Mailinglist <kde-print-devel>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pierre Habouzit 2006-05-15 23:57:49 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages

from debian bug http://bugs.debian.org/356138
=============================================

when trying to print e.g. http://www.groklaw.net/ to a pdf, one see those errors:

http://bugs.debian.org/cgi-bin/bugreport.cgi/snapshot.png?bug=356138;msg=17;att=1
http://bugs.debian.org/cgi-bin/bugreport.cgi/snapshot-groklaw.png?bug=356138;msg=17;att=2

The bug also occur in kcontrol if hitting the "Test" button for the pdf writer.
Comment 1 Mark Purcell 2006-08-26 13:37:33 UTC
With kdeprint 3.5.4 the error message has changed to:

/usr/bin/lpr -P 'Print to File (PDF)' '-#1' '/usr/share/apps/kdeprint/testprint.ps' : execution failed with message:
lpr: Print to File (PDF): unknown printe
Comment 2 Kurt Pfeifle 2007-01-09 05:04:46 UTC
@ comment 1, for msp@debian.org:

Using this commandline, with the CUPS print client "lpr", addressing a printer named 'Print to File (PDF)' will for sure not work.

The 'Print to File (PDF)' is a "virtual printer", specific to KDE, and not known to CUPS at all, which uses Ghostscript to work. (It is even there if you switch to a different print subsystem, or if you un-install CUPS completely).

The 'lpr: Print to File (PDF): unknown printer' message is therefor to be expected. 

If Debian packagers did introduce patches that do address this KDE virtual printer from a CUPS client, this is meant to fall flat on its face.


Pierre & msp@debian.org:

Please run the following commands and tell us their output:

 which gs
 gs -h|head
 which ps2pdfwr
 which ps2pdf
 which ps2pdf12
 which ps2pdf13
 which ps2pdf14

Last, use Konqueror and kprinter to "Print to file (PostScript)". Then, run these commands in turn on the PostScript file that you just now created:

  ps2pdfwr -dCompatibilityLevel=1.4 /path/to/print.ps ~/print14.pdf
  ps2pdfwr -dCompatibilityLevel=1.3 /path/to/print.ps ~/print13.pdf
  ps2pdfwr -dCompatibilityLevel=1.2 /path/to/print.ps ~/print12.pdf
  
Do all these commands succeed? Does one of these fail? If so, your Ghostscript version is b0rken.

If you discover one of the above commands working, then set the respective compatibility level in the "Print to file (PDF)" properties of the kprinter dialog and try printing the Groklaw page again...

If I don't hear back from you until Feb 1, 2007, I assume the bug isnt there any more and close the report.

Cheers,
Kurt
Comment 3 Kurt Pfeifle 2007-05-31 11:57:57 UTC
Closing now...
Comment 4 Mark Purcell 2007-06-08 17:31:39 UTC
I am still experiencing this bug:

kdeprint       4:3.5.7-1

A print error occurred. Error message received from system:

cupsdoprint -P 'Print to File (PDF)' -J '' -H '/var/run/cups/cups.sock:631' -U 'mark' -o ' multiple-document-handling=separate-documents-uncollated-copies orientation-requested=3' '/usr/share/apps/kdeprint/testprint.ps' : execution failed with message:
client-error-not-found 

I only just became aware of the request for more info which I shall update now..

Mark
Comment 5 Mark Purcell 2007-06-08 17:40:30 UTC
mark@d620:~$ gs -h| head
ESP Ghostscript 8.15.3 (2006-08-25)
Copyright (C) 2004 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF
mark@d620:~$ which ps2pdfwr
/usr/bin/ps2pdfwr
mark@d620:~$ which ps2pdf
/usr/bin/ps2pdf
mark@d620:~$ which ps2pdf12
/usr/bin/ps2pdf12
mark@d620:~$ which ps2pdf13
/usr/bin/ps2pdf13
mark@d620:~$ which ps2pdf14
/usr/bin/ps2pdf14

Printing the groklaw homepage now works correctly.

Printing a Test Page with either the Print to File (PDF or PS) options from kcontrol fails with the following errors:

A print error occurred. Error message received from system:



cupsdoprint -P 'Print to File (PDF)' -J '' -H '/var/run/cups/cups.sock:631' -U 'mark' -o ' multiple-document-handling=separate-documents-uncollated-copies orientation-requested=3' '/usr/share/apps/kdeprint/testprint.ps' : execution failed with message:
client-error-not-found 

A print error occurred. Error message received from system:

cupsdoprint -P 'Print to File (PostScript)' -J '' -H '/var/run/cups/cups.sock:631' -U 'mark' -o ' multiple-document-handling=separate-documents-uncollated-copies orientation-requested=3' '/usr/share/apps/kdeprint/testprint.ps' : execution failed with message:
client-error-not-found 
Comment 6 Michael Goffioul 2007-06-11 09:28:43 UTC
There's really a problem as the "Print to file (PDF)" printer seems to be handled like a regular CUPS printer while it's not. There's something wrong with the configuration and maybe some desktop files. The problem is probably not related to ghostscript; but to solve this problem, we have to find out why a pseudo printer gets handled like a regular one.
Comment 7 Olivier Vitrat 2007-06-14 19:21:36 UTC
additional comment from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356138

I am still experiencing this bug:

kdeprint       4:3.5.7-1

A print error occurred. Error message received from system:

cupsdoprint -P 'Print to File
(PDF)' -J '' -H '/var/run/cups/cups.sock:631' -U 'mark' -o '
multiple-document-handling=separate-documents-uncollated-copies
orientation-requested=3' '/usr/share/apps/kdeprint/testprint.ps' : execution
failed with message:
client-error-not-found


** Please reopen the bug **