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: "Jeff Dutky" <email@hidden>
- Date: Wed, 29 Oct 2008 20:15:03 -0400
On Wed, Oct 29, 2008 at 4:46 PM, Joel Norvell <email@hidden> 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)?
Better yet, why not just insert the metadata into the PDF directly as comments?
The PDF format is basically a postscript file (with some missing
features and, I think, optional compression) and you should be able to
insert comments (lines starting with %%) after the first line (which
is a required header comment) with no problem.
Reliably detecting PDF files that contain your meta data and
extracting it may be a bit of a challenge, in the general case, but
not really all that hard. Before writing a lot of custom code to do
this, I'd have a look at the documentation for PDFKit and PDFDocument.
you can get references on the PDF format here:
http://www.adobe.com/devnet/pdf/pdf_reference_archive.html
-- Jeff Dutky
_______________________________________________
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