I have a pdf document, and I added a attachment.

How do I programmatically get that file from a plug ins?
I can see an embeddedfile field in the pdf using pdfcanopener

So far I have

PDDoc pdDoc = AVDocGetPDDoc (avDoc);


CosDoc DocObj = PDDocGetCosDoc(pdDoc);
CosObj DictObj = CosDocGetInfoDict(DocObj);

CosObjEnum(DictObj, GetKeyAtoms, NULL);
....

GetKeyAtoms is a function to print the object