[Kde-print-devel] [Bug 129250] print preview does not display more pages on one

Kurt Pfeifle pfeifle at kde.org
Tue Jan 9 04:16:44 CET 2007

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
pfeifle kde org changed:

           What    |Removed                     |Added
           Severity|normal                      |wishlist
             Status|UNCONFIRMED                 |NEW
      everconfirmed|0                           |1
            Version|unspecified                 |4.0

------- Additional Comments From pfeifle kde org  2007-01-09 04:16 -------
I'm changing this bug report as to "Confirmed"/NEW and turn it into a wishlist item for KDE4.

As for the implementation of a preview which will guarantee an identical result as the processing by CUPS is .... let the preview be done by CUPS. :-P

Instead of calling psnup to do the n-up call the CUPS filtering chain (consisting of a single filter for now):

  $(cups-config --serverbin)/filter/pstops \
                                           99999 \
                                           $USER \
                                           "KDEPrint Preview n-up" \
                                           1 \
                                           number-up=$number \
where arguments:
  $1: 99999                   -- a dummy job ID
  $2: $USER                   -- the username
  $3: "KDEPrint Preview n-up" -- the job title
  $4:  1                       -- number of copies
  $5: number-up=$number       -- number for n-up
are of type and order as CUPS expects them for its filters.

To get correct results, the CUPS-specific env var $PPD for the target printer  (plus some more, such as CHARSET, CONTENT_TYPE, PRINTER, CUPS_FONTPATH) would need to be set as well (and maybe even *all* options like for the final job should be sent as $5).

  - exact same preview result should be ensured (outcome of pstops filter)
    as for the "real" printrun 

  - possibly slow; runs same file through pstops filter twice in case preview
    is selected
  - of course this would not work if there is no local CUPS installation (but
    if printing only happens thru a remote CUPS server), 
  - it may not work perfectly, if local and remote CUPS versions are different

In case no local pstops filter is available (== no local CUPS server installed) we could fallback to using psnup, if no psnup just show the "raw" PostScript file (like now), and inform the user in each case that the preview is only an "approximation".

More information about the Kde-print-devel mailing list