Bug in PDFKit's PDFDocument attributes?!
Bug in PDFKit's PDFDocument attributes?!
- Subject: Bug in PDFKit's PDFDocument attributes?!
- From: Alexander Griekspoor <email@hidden>
- Date: Tue, 23 May 2006 12:18:45 +0200
Hi,
While trying to do some fun stuff with the PDFKit, I ran into some
weird behaviour.
According to the docs one can ask the PDFDocument for it's
documentAttributes, and what you should get is a dictionary with the
following attributes:
PDFDocumentTitleAttribute
An optional text string containing the title of the document.
PDFDocumentAuthorAttribute
An optional text string containing the name of the author of the
document.
PDFDocumentSubjectAttribute
An optional text string containing a description of the subject of
the document.
PDFDocumentCreatorAttribute
An optional text string containing the name of the application that
created the document document content.
PDFDocumentProducerAttribute
An optional text string containing the name of the application that
produced the PDF data for the document.
PDFDocumentCreationDateAttribute
An optional text string containing the document’s creation date.
PDFDocumentModificationDateAttribute
An optional text string containing the document’s last-modified date.
PDFDocumentKeywordsAttribute
An optional array of text strings containing keywords for the document.
However, when I build the app using the above predefined values, I
get the following error:
[Session started at 2006-05-23 11:53:48 +0200.]
ZeroLink: unknown symbol '_PDFDocumentAuthorAttribute'
So somehow, the values are not defined. When I inspect the
documentAttributes dictionary it looks like this:
2006-05-23 11:33:33.997 PDF Linker[6989] {
Author = "Apple Computer, Inc.";
CreationDate = 2006-03-31 14:30:21 +0200;
Creator = Unknown;
ModDate = 2006-03-31 14:30:21 +0200;
Producer = "XEP 4.5 build 20060123";
Title = "Spotlight Importer Programming Guide";
}
So for now I decided to hardcode the key's as they appear above, so
instead of PDFDocumentTitleAttribute simply @"Title", running the
risk that this will change in future updates unfortunately.
But that's not all, it turns out that the CreationDate objects are
NOT like the documents state of type NSString but of type NSDate !?
Are these bugs? If so, are they known? Or am I doing something wrong?
Cheers,
Alex
*********************************************************
** Alexander Griekspoor **
*********************************************************
The Netherlands Cancer Institute
Department of Tumorbiology (H4)
Plesmanlaan 121, 1066 CX, Amsterdam
Tel: + 31 20 - 512 2023
Fax: + 31 20 - 512 2029
AIM: email@hidden
E-mail: email@hidden
Web: http://www.mekentosj.com
4Peaks - For Peaks, Four Peaks.
2004 Winner of the Apple Design Awards
Best Mac OS X Student Product
http://www.mekentosj.com/4peaks
*********************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden