apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.96k stars 464 forks source link

Cannot print text file starting with two capital leters MM. #2431

Closed michaelrsweet closed 17 years ago

michaelrsweet commented 17 years ago

Version: 1.2-current CUPS.org User: wolfhard_reimer

Operating system: Linux Ubuntu 6.06.1 LTS for amd64 Printer: Canon BJC-6100 on USB2 port Printer driver: TurboPrint 1.95-2 (http://www.turboprint.de/) First, I am German, therefore excuse my bad English. Second, I am a newbie to Linux, therefore excuse my lack of knowledge about the system. Situation: I was not happy with the print output from various applications. The colours are always too light. So, I decided to install the TurboPrint driver mentioned on a Canon download side (http://support.canon.de/produkte/drucker/bjc6100/bjc6100_sw.htm). After some trials and errors, I completed the installation and the print output is similar to the one I have achieved under my old WIN 98 system. Error description: I use the lp command at the command prompt to print a text file, e.g. "lp file". I am able to print any text file with the exception of text files, which start with two capital letters MM. In this case, I receive in the CUP web interface the following message for the printer: tp0 (Standarddrucker) "/usr/lib/cups/filter/imagetops failed" The CUPS error log shows (example): PID 13377 (/usr/lib/cups/filter/imagetops) stopped with status 1! [Job 83] Unable to open image file for printing! In addition to this problem, I am not able to administer the printer queue via the CUP web interface. I do not know, which user and password I have to specify. Therefore, I am currently using "sudo cancel -a" in a terminal to clear the printer queue. Please investigate the described problem! Sincerely, Wolfhard Reimer

michaelrsweet commented 17 years ago

CUPS.org User: mike

Not sure when this will be "fixed". Basically, your text file is being mis-identified as a TIFF image. To work around the issue, add the following option to your print command:

-o document-format=text/plain
michaelrsweet commented 17 years ago

CUPS.org User: wolfhard_reimer

Hello Mike, thanks for the quick response! I have looked for documentation of a parameter, which allows to define the document format, but I was not successfull. Therefore, many thanks for the work around, which is pretty good enough for me. But where can I found the full documentation ? Nevertheless, I have an additional question: I received an eMail from cups-bugs-bounces@easysw.com regarding that the bug report has been posted by a non-member to a members-only list. I thought that my registration (user wolfhard_reimer), which allowed me to report the bug, is sufficient. Please explain. Sincerely Wolfhard

michaelrsweet commented 17 years ago

CUPS.org User: h.blischke

The issue could be solved by modifying the mime.types rule for identifyint TIFF files as follows:

image/tiff tiff tif string(0,MM<002A>) string(0,II<2A00>)

which would exclude text files starting with "MM" or "II" from being identified as TIFF images.

michaelrsweet commented 17 years ago

CUPS.org User: wolfhard_reimer

Hello Mr. Blaschke, Thanks for a second method to circumvent my problem. Is it correct that I have then to modify the image/tiff directive in /etc/cups/mime.types ? Is this the final solution or another workaround ? In the first case, you may close the bug record. Sincerely, Wolfhard Reimer

michaelrsweet commented 17 years ago

CUPS.org User: mike

Thanks, I've committed the change to the image/tiff MIME type definition as you've suggested...