How to embed my own document data in a pdf?
How to embed my own document data in a pdf?
- Subject: How to embed my own document data in a pdf?
- From: Bob Hearn <email@hidden>
- Date: Wed, 29 Mar 2006 10:35:08 -0800
I have an app for which I need to save files that can be read as pdfs
- e.g., by Preview (actually pdftex is what I care about) - but that
also contain my own document data, so I can re-open the pdf files and
restore the document content.
I've tried to use PDFKit to do this, by adding my document data as an
annotation. However, the annotation data is not saved with the pdf.
The only exception is link annotations (PDFAnnotationLink). Even
there, however, it seems to be only the URL that is saved, and not
the textual content set with setContents: . This fact is mentioned
somewhat obscurely as follows:
"Note: Currently, with the exception of link annotations, any
annotations you create using PDF Kit cannot be modified after saving
the document."
only in this one place:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/
PDFKitGuide/PDFKit_Prog_Conc/chapter_2_section_2.html#//apple_ref/doc/
uid/TP40001863-CH201-DontLinkElementID_4
There seems to be an awful lot of documentation on PDFAnnotation for
a set of classes that are basically useless! I guess the PDFKit is a
work in progress. With the exception of links, all PDFAnnotations
seem to be converted to pdf content when the PDFDocument's -
dataRepresentation is obtained.
So - what other approaches could I try? Surely there must be some way
to do this without having to muck with the raw pdf data myself. I see
in the Adobe PDF documentation that there are various ways to
encapsulate your own data in a pdf file, but I'm not sure how I'd do
that without generating all the pdf from scratch.
Are there any APIs other than the PDFKit I could try?
Thanks,
Bob Hearn
---------------------------------------------
Robert A. Hearn
email@hidden
http://www.swiss.ai.mit.edu/~bob/
_______________________________________________
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