Getting Subject and Keywords into PDFAttribute dictionary
Getting Subject and Keywords into PDFAttribute dictionary
- Subject: Getting Subject and Keywords into PDFAttribute dictionary
- From: Antonio Nunes <email@hidden>
- Date: Thu, 30 Nov 2006 14:52:55 +0000
Hi,
When creating a CGPDFDocument I am having trouble providing values
for Subject and Keywords to the document's info dictionary.
There is no problem adding the Title and Author using code like this:
// Provide the document's author name
value = [[self documentAttributes] valueForKey:@"Author"];
if (value) { CFDictionarySetValue(info, kCGPDFContextAuthor,
(CFStringRef)value); }
But using similar code for the Subject (and Keywords)...
// Provide the document's subject
value = [[self documentAttributes] valueForKey:@"Subject"];
if (value) { CFDictionarySetValue(info, CFSTR("Subject"),
(CFStringRef)value); }
... when I later check the created PDF document's info dictionary the
value is not there.
I use CFSTR("Subject") rather than kCGPDFContextSubject because the
framework doesn't provide the constant, which would suggest that this
property is indeed not supported. Yet I find that a rather surprising
omission. The same goes for the Keywords property.
Is there a(nother) way to get these two properties into a
CGPDFDocument? (And it looks like I have to file an enhancement
request...)
Cheers,
António
-----------------------------------------------------------
And could you keep your heart in wonder
at the daily miracles of your life,
your pain would not seem less wondrous
than your joy.
--Kahlil Gibran
-----------------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden