Open Bug 1519076 Opened 7 years ago Updated 3 years ago

Print failure with malformed job names

Categories

(Core :: Printing: Output, defect, P3)

defect

Tracking

()

People

(Reporter: glandium, Unassigned)

Details

(Whiteboard: [layout:print-triage:p3])

My wife had this interesting problem today on a mac: she was trying to print a PDF from the bank, and printing failed with a generic and useless error message.

Looking at the CUPS error log did give a little more information, but not entirely useful:

Returning IPP client-error-attributes-or-values-not-supported for Create-Job

This unfortunately doesn't give much about /what/ was wrong. Fortunately, once you go all the way to enable CUPS debug logging, there's an additional message that is much more useful:

Create-Job client-error-attributes-or-values-not-supported: Bad job-name value:\"job-name\": Bad name value \"\033橡\033Super Visual Formade Print - 201807.pdf.pdf\" - bad control character (PWG 5100.14 section 8.1).

Note the \033橡\033 in the job name. That seems to come from the PDF. A workaround that I found is to open in the preview app through the print dialog, then change the title there, and print from there.

All this is not really user friendly, and it seems we should filter the job-name (presumably, it's created by Firefox)

FWIW, I tried to reproduce, but couldn't immediately.

Specifically: I created two local PDF files (from a PDF printout of example.org), with these filenames:

\033橡\033Super Visual Formade Print - 201807.pdf.pdf
̽橡̽test.pdf

(The second one is using the character that I think corresponds to \033, which according to http://www.fileformat.info/info/unicode/char/033d/browsertest.htm is: ̽)

I was able to view & print both files just fine in Firefox's built-in PDF viewer (in Nightly on Linux).

Any chance you can create/attach a PDF file (or filename) that reliably reproduces the issue for you?

Flags: needinfo?(mh+mozilla)

Note the character is \033, not U+033d which means it's octal for U+001b, the escape character. I was not able to reproduce on my mac with a file with a broken name, so I'll have to check again with my wife's mac and the original file. Since those are bank statements, I'd rather not share them ;) I'll try to strip them from any relevant content and see if I can get a reproducer.

So, I can only reproduce on my wife's mac, which is on 10.12.6 and in Japanese. Not on another mac on 10.13.6, and neither on yet another mac on 10.12.6, neither in English nor in Japanese.

I can reproduce on my wife's mac by taking any PDF and renaming it to the faulty string.

I don't know what difference there can be between my wife's mac config and mine... At least the have the same version of OSX, same version of cups, and same OS language, now.

I'll also note that contrary to what I wrote in comment 0, Firefox doesn't emit an error message at all, which makes the problem even more confusing, because from the user's perspective, all that happens is that nothing prints out for an unknown reason. The error dialog with a generic "printing failed" kind of message only occurs when printing from the Preview app.

Flags: needinfo?(mh+mozilla)
Priority: -- → P3
Whiteboard: [layout:print-triage:p3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.