• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting Subject and Keywords into PDFAttribute dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: MAC C++ Cocoa Developer required
  • Next by Date: RE: MAC C++ Cocoa Developer required
  • Previous by thread: Re: NSTreecontroller outline view selectedObjects is empty
  • Next by thread: changing [NSWindow isOpaque] in subclass
  • Index(es):
    • Date
    • Thread