Revision: 2767
http://skim-app.svn.sourceforge.net/skim-app/?rev=2767&view=rev
Author: hofman
Date: 2007-08-28 17:06:07 -0700 (Tue, 28 Aug 2007)
Log Message:
-----------
Add document info and attributes to PDF bundle.
Modified Paths:
--------------
trunk/SKDocument.m
Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m 2007-08-28 23:59:36 UTC (rev 2766)
+++ trunk/SKDocument.m 2007-08-29 00:06:07 UTC (rev 2767)
@@ -66,6 +66,7 @@
#define WRAPPER_PDF_FILENAME @"data.pdf"
#define WRAPPER_TEXT_FILENAME @"data.txt"
+#define WRAPPER_PLIST_FILENAME @"data.plist"
#define WRAPPER_SKIM_FILENAME @"notes.skim"
#define WRAPPER_TXT_FILENAME @"notes.txt"
#define WRAPPER_RTF_FILENAME @"notes.rtf"
@@ -332,10 +333,14 @@
NSData *notesData = [[self notes] count] ? [NSKeyedArchiver
archivedDataWithRootObject:[[self notes] valueForKey:@"dictionaryValue"]] : nil;
NSData *notesTextData = [[self notesString]
dataUsingEncoding:NSUTF8StringEncoding];
NSData *notesRTFData = [self notesRTFData];
+ NSDictionary *info = [[SKInfoWindowController sharedInstance]
infoForDocument:self];
+ NSData *infoData = [NSPropertyListSerialization
dataFromPropertyList:info format:NSPropertyListXMLFormat_v1_0
errorDescription:NULL];
NSFileWrapper *fileWrapper = [[NSFileWrapper alloc]
initDirectoryWithFileWrappers:[NSDictionary dictionary]];
[fileWrapper addRegularFileWithContents:pdfData
preferredFilename:WRAPPER_PDF_FILENAME];
if (textData)
[fileWrapper addRegularFileWithContents:textData
preferredFilename:WRAPPER_TEXT_FILENAME];
+ if (infoData)
+ [fileWrapper addRegularFileWithContents:infoData
preferredFilename:WRAPPER_PLIST_FILENAME];
if (notesData)
[fileWrapper addRegularFileWithContents:notesData
preferredFilename:WRAPPER_SKIM_FILENAME];
if (notesTextData)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit