Re: Problem with NSData to NSString to NSData
Re: Problem with NSData to NSString to NSData
- Subject: Re: Problem with NSData to NSString to NSData
- From: Ricky Sharp <email@hidden>
- Date: Wed, 29 Oct 2008 16:56:42 -0500
On Oct 29, 2008, at 3:46 PM, Joel Norvell wrote:
Dear Cocoa-dev People,
First, I wanted to thank Aki Inoue and Rob Keniger for pointing out
the problem with my NSData->NSString->NSData approach.
As an alternative, would it be fruitful to use a Directory Wrapper
to represent the data as two files; one the metadata and the other
the pdf? Then I could work with the metadata file, but just display
the pdf file.
In the "What could go wrong here?" department, would my compound
file end up behaving like a directory (or worse)?
From your original implementation of putting the metadata directly
into the PDF file, you'll now end up with obviously a proprietary
file. i.e. No application that works with PDF will be able to work
with that file.
By having a separate file, things can become fragile. However, the
solution here is to use a package type for a custom document. Just as
TextEdit does for the rtfd type.
Your "package" folder would then contain the original PDF and a
separate file (or files) for your metadata.
This document type would most likely not be openable in any app that
opens PDF (unless their open dialogs have the 'allow navigation of
packages' option set). But, advanced users could your package via
Finder and work with the PDF directly if they need to.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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