PMPrintSettingsSetJobName can set long job name which over 255 characters.

Originator:mantaroh
Number:rdar://34428043 Date Originated:9/14/2017
Status:Open Resolved:
Product:macOS + SDK Product Version:10.12.6
Classification:Other Reproducible:Always
 
Area:
AppKit

Summary:
I can set the job name which is over 255 characters via PMPrintSettingsSetJobName[1].
As result, The CUPS received IPP Error:

--------------------------------------------
D [14/Sep/2017:10:57:42 +0900] Create-Job ipp://localhost:631/printers/Canon_MF510_Series
D [14/Sep/2017:10:57:42 +0900] Create-Job client-error-attributes-or-values-not-supported: Bad job-name value: “job-name”: 名前値“Title with more than 255 characters (256) ++++++++++++++++++++\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
++”が正しくありません - 長さ256が正しくありません(RFC 2911 セクション4.1.2)。
E [14/Sep/2017:10:57:42 +0900] [Client 83] Returning IPP client-error-attributes-or-values-not-supported for Create-Job (ipp://localhost:631/printers/Canon_MF510_Series) from localhost
---------------------------------------------

Steps to Reproduce:
We can reproduce this phenomenon on Print Core Sample code. I added the PMPrintSettingsSetJobName() into APLAppDelegate.m, and set the long job name like 256 character. An attachment is customized PMPrinterPrintWithFile(Sample Code).

STR:
 1. Print from customized com.apple.samplecode.PMPrinterPrintWithFile.

Expected Results:
 We can print via CUPS.

Actual Results:
 CUPS has error. 

Version/Build:
 macOS: 10.12.6
 XCode: Version 8.3.2

Configuration:
  Printer: Canon MF510 Series

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!