After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741475 - Evince does not truncate too long document titles for print job name
Evince does not truncate too long document titles for print job name
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-13 10:54 UTC by Gabor Kelemen
Modified: 2015-10-09 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample file with long Title attribute (987.56 KB, application/pdf)
2014-12-13 10:54 UTC, Gabor Kelemen
Details

Description Gabor Kelemen 2014-12-13 10:54:22 UTC
Created attachment 292657 [details]
Sample file with long Title attribute

When printing, Evince creates print job names using the title of the PDF being printed. This job name can however be too long, and in such a case CUPS refuses to print it. The attached file can be used to reproduce the problem, which happens to me on Ubuntu Trusty with Evince 3.10.3 and CUPS 1.7.2.

The CUPS error log says:

D [13/Dec/2014:11:18:27 +0100] Print-Job ipp://localhost:631/printers/Hewlett-Packard-HP-LaserJet-1200
D [13/Dec/2014:11:18:27 +0100] [Job ???] Auto-typing file...
I [13/Dec/2014:11:18:27 +0100] [Job ???] Request file type is application/pdf.
D [13/Dec/2014:11:18:27 +0100] Print-Job client-error-attributes-or-values-not-supported: Bad job-name value: "job-name": Bad name value "nyilatkozat.pdf — 8. sz. melléklet: Jogi személy vagy jogi személyiséggel nem rendelkező szervezet (ideértve egyszemélyes kft. egyszemélyes zrt. és egyéni cég is) ügyfél nyilatkozata a tényleges tulajdonos személyéről (első üzleti kapcsolat létesítésekor/adatváltozáskor)" - bad length 297 (RFC 2911 section 4.1.2).
E [13/Dec/2014:11:18:27 +0100] [Client 14] Returning IPP client-error-attributes-or-values-not-supported for Print-Job (ipp://localhost:631/printers/Hewlett-Packard-HP-LaserJet-1200) from localhost
D [13/Dec/2014:11:18:27 +0100] [Client 14] Content-Length: 794

RFC 2911 section 4.1.2 says:
   The
   'name' attribute syntax is essentially the same as 'text', including
   the REQUIRED support of UTF-8 except that the sequence of characters
   is limited so that its encoded form MUST NOT exceed 255 (MAX) octets.

https://tools.ietf.org/html/rfc2911#section-4.1.2

So I think Evince should truncate the job-name to be compliant with the RFC.
Comment 1 Felipe Borges 2015-10-09 09:00:17 UTC
It is now fixed in gtk+. Long names are now truncated. Thx for the report and the info about this RFC.

https://git.gnome.org/browse/gtk+/commit/?id=70f577251ff3dff5b11b2040aee5aa3efe26da9d
Comment 2 José Aliste 2015-10-09 09:09:42 UTC
Felipe, we should closed this as fixed then
Comment 3 Felipe Borges 2015-10-09 09:19:02 UTC
I don't have the bugzilla permissions for that. :)
Comment 4 Germán Poo-Caamaño 2015-10-09 14:48:38 UTC
Felipe, I just added you the permission to editbugs, which I think should allow you to close this one :-)