summaryrefslogtreecommitdiffstats
path: root/printing/printing_context_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'printing/printing_context_mac.mm')
-rw-r--r--printing/printing_context_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index acc9c28..c4f09b0 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -8,6 +8,7 @@
#import <AppKit/AppKit.h>
#include "base/logging.h"
+#include "base/sys_string_conversions.h"
namespace printing {
@@ -122,6 +123,11 @@ PrintingContext::Result PrintingContext::NewDocument(
static_cast<PMPrintSettings>([print_info_ PMPrintSettings]);
PMPageFormat page_format =
static_cast<PMPageFormat>([print_info_ PMPageFormat]);
+
+ scoped_cftyperef<CFStringRef> job_title(
+ base::SysWideToCFStringRef(document_name));
+ PMPrintSettingsSetJobName(print_settings, job_title.get());
+
OSStatus status = PMSessionBeginCGDocumentNoDialog(print_session,
print_settings,
page_format);