[cups-devel] [UNKN] STR #4417: CUPS cannot tell PWG Raster and CUPS Raster apart via mime.types

Till Kamppeter noreply at cups.org
Thu May 15 11:17:43 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I have written a rastertopdf filter (for the cups-filters package) which
turns PWG Raster into PDF and so CUPS would be able to print PWG Raster
files on arbitrary printers. This would make it possible to print into a
shared CUPS queue from a mobile device which sends jobs in PWG Raster to
print on IPP Everywhere printers but is not able to generate the more
complex PDF format.

For this filter I have added the following conversion rule to
/usr/share/cups/mime/cupsfilters.convs:

image/pwg-raster        application/pdf                         32     
rastertopdf

which should make my new filter be used when the input file is PWG Raster.

Unfortunately, CUPS recognizes all PWG Raster files as
application/vnd.cups-raster and never as image/pwg-raster. This is caused
by the following two rules in /usr/share/cups/mime/mime.types:

image/pwg-raster                string(0,"RaS2") + string(4,PwgRaster<00>)
priority(100)

application/vnd.cups-raster     string(0,"RaSt") string(0,"tSaR") \
                                string(0,"RaS2") string(0,"2SaR") \
                                string(0,"RaS3") string(0,"3SaR")

Both match PWG Raster files and have the same priority (100 is the
default), which makes CUPS use the type which is the alphabetically first,
and this is application/vnd.cups-raster. Probably you have explicitly set a
priority() to image/pwg-raster but given it the wrong value. The problem is
easily fixed by setting the priority to 150:

image/pwg-raster                string(0,"RaS2") + string(4,PwgRaster<00>)
priority(150)

With this printing PWG Raster files with CUPS works perfectly for me.

Can you fix that? Thanks.

Link: https://www.cups.org/str.php?L4417
Version: 1.7-current
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTdQTHAAoJENujp6sI12IjQiwP/j3JI1C3HIGbY2f7DLk3HX1e
fK5wBzMZt+KyAVTGaX8RTiVqb8Aw3yxBGqhwNNVZVfh2cq6qGJP4LHELF0d1aTyr
U3DaOcwJ2ZddjO/mHie9L2YiSUX8g9/2o96IpY/ndJ4teQI/KxJMH16DQNNeQdIF
BL6XLPNGud15ZrlnrPyw0LYCf/Gk0n1hmnLbgQeCAgF6MrfRtd097/HNKYaOXZCt
58/GWz/du850wcNRZCA4gQJhDSzR1i0WMpcbv070JTonKBWeHRW4OC1wwRKLsFIM
egfbPwj6JfDWr7FhQJaNFaQ6rcNF7Rqh5m9B0l0HPCvOplxpdylcZ7Hj+kK+oQH2
+6wBkYO3PR2dJ5E8/a6YZJBcsz6Ei2vtrVo/EDW4qbjIxBTaqeyy/EyYi41rQiHO
NilFsUe5VyCjCpbhYWpUo0tCwePAQKVdzqthH0eTj960rqw20niZ6fFcdrZNR4pa
GD0ZHthSwHuzpxGk7ma0tGwFvkP72OhOmHhoxPXDwYusqJpGjY/5ejxDAgAEOMAx
WhOSQYuBBu8iWxP9Lc+okTJy+GBaXwLSNZ1y56ANsMNDL/okQR6SwMqtX1GfLF+b
qdu6vcdLZkS2JhfKTQZKTYzcpkWwtKz07LSdmFOydytX4gETCiG4Fe/l/HKx7xRz
bTcrtm0KJRQjtqbLcQoQ
=Kyoo
-----END PGP SIGNATURE-----




More information about the cups mailing list