application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=POSTSCRIPT") \
contains(0,4096,"LANGUAGE = Postscript") \
contains(0,4096,"LANGUAGE = PostScript") \
contains(0,4096,"LANGUAGE = POSTSCRIPT") \
(contains(0,4096,<0a>%!) + \
!contains(0,4096,"ENTER LANGUAGE"))) \
contains(0,128,<1B>%-12345X) + \
(contains(4050,8000,"LANGUAGE=POSTSCRIPT") \
contains(4050,8000,"LANGUAGE = Postscript") \
contains(4050,8000,"LANGUAGE = PostScript") \
contains(4050,8000,"LANGUAGE = POSTSCRIPT") \
(contains(4050,8000,<0a>%!) + \
!contains(4050,8000,"ENTER LANGUAGE")))
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
(contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=PCL") \
contains(0,4096,"LANGUAGE = PCL"))) \
(contains(0,128,<1B>%-12345X) + \
(contains(4050,8000,"LANGUAGE=PCL") \
contains(4050,8000,"LANGUAGE = PCL")))
Describe the bug
PCL print jobs, e.g. by Windows systems using vendor drivers, are in some cases incorrectly not detected as mime type
application/vnd.cups-rawsince theirLANGUAGEheader may be beyond the 4096 character limit.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Document correctly detected as
application/vnd.cups-raw.Print job example
Header (> 4096 bytes)
System Information:
Additional context
This issue seems to have become more common after Windows updates in the last weeks, likely more information is embedded into the XML before the "Enter Language" part.
I am currently using the following
.typesdropin as a workaround:Issue can be reproduced by running
cupsfilterson the (truncated) sample job file provided above.