Q: I am wondering where the best place to insert metadata into a PDF
document is. That being a set of lat/lng values, that can be
extracted after the PDF has been converted to illustrator, worked on
and then back to PDF.?
A: You can place custom metadata at any location in the document. For
example, you could associate the custom data with a page as follows:
Obj cust_dict = mypage.GetSDFObj().PutDict("_MyCustomData");
From any 'high-level' PDF object (such as page, annotation, action,
font, bookmark, image, color-space, etc) you can access the low-level
SDF dictionary (or array) using GetSDFObj().
Similarly you can associate custom data with a document's catalog:
Obj cust_dict = pdfdoc.GetRoot().PutDict("_MyCustomData");
You could also place the data under more 'standard' locations (e.g.
Page/PieceInfo dictionary etc). For more info, please take a look at
Section 10.4 'Page-Piece Dictionaries' in PDF Reference.
For more examples, please take a look at SDF sample project which is
included as part of the SDK.