[cups] Printing to native XPS printers using CUPS

Gernot Hassenpflug aikishugyo at gmail.com
Thu Oct 15 21:56:05 PDT 2015


On Sun, Oct 11, 2015 at 6:21 PM, Gernot Hassenpflug
<aikishugyo at gmail.com> wrote:
> On Sun, Oct 11, 2015 at 6:12 PM, Helge Blischke <helgeblischke at web.de> wrote:
>> Hello Gernot,
>
> Hallo Helge,

Hello all,

Thanks to Till and Helge for posting on the Ghostscript developer
list, and the new information about the status of the xpswrite device
that resulted.

>> I tried out Ghostscript’s xpswrite device yesterday and currently cannot recommend its use
>> for the following reasons:
>> (1) The pages are rendered as TIFF images (one image per page).
>> (2) The resolution of these images is hardcoded to 96 dpi and cannot be changed.
>> (3) The color space is hard coded to sRGB and cannot be changed (e.g. to grayscale
>>      for a b/w printer).

>From Helge's mail to the ghostscript developer list:
---8<---
In contrast to my last post to cups at cups.org further investigation
revealed that:

– the output resolution can be set, but

– trying to change the color model from the RGB default causes a
"rangecheck in .putdeviceprops“ error  in Ghostscript (gs 9.16)

– source images are converted to TIFF images, but vector graphics
(including rendered text) is internally converted to an image in
memory, the pixels of which are output as filled rectangles each,
which leads to huge output file sizes.
---8<---

And the reply from the developers indicated that resources were too
scarce to implement improvements in the foreseeable future:
---8<---
So, first, *pages* are not converted to a TIFF in xpswrite. Elements
of pages are converted to TIFF images - those will be elements that
are not (directly) supported in the XPS imaging model, like PDF
transparency (although, due to the way PDF transparency works, most
pages containing transparency do result in a single image in the
output), or other elements that the XPS device does not currently
handle.

Secondly, I don't *think* the TIFFs are pegged to 96dpi, I think the
resolution listed in the TIFF files themselves ignores the scaling
applied at the PDL level. The device does honor the resolution option
given on the gs command line.

Thirdly, for colors, properly supporting multiple color spaces could
be very complex (I'm not entirely sure), but we may be able to,
relatively easily, include an ICC profile in the XPS, thus allowing
decent quality conversion by the target.

Lastly, we've got practically no engineering resource available now or
in the foreseeable future - there's a lot we'd like to do to improve
xpswrite, but unless something changes quite radically, we certainly
won't get much of significance done in that area for 9.19.
---8<---

That means we are on our own for the time being.
I have been looking around for printers to test with, but
unfortunately I cannot find (yet) any reasonably cheap second-hand
devices on auction here in Tokyo that would make it feasible for me to
obtain.

On the other hand, I did find related information on Windows formats,
from 2004, leading to another use case for XPS files: printing to
Windows remotely from linux via CUPS, with the native Windows printer
driver accepting the XPS and outputting it to a (possibly proprietary
format-only) printer.

Here is the old information, analogously using EMF format rather than
XPS (the same email was cross-posted to WINE development, linux
printing, and SAMBA mailing lists):

https://www.winehq.org/pipermail/wine-devel/2004-June/027461.html
http://osdir.com/ml/linux.printing.general/2004-06/msg00000.html
https://lists.samba.org/archive/samba-technical/2004-June/036073.html

Best regards,
Gernot Hassenpflug
PS I suppose the CUPS mailing list is not ideal to discuss this topic
anymore, if there is a better venue please suggest.



More information about the cups mailing list