Can you use the CGPDFDictionaryApplyFunction function?
It seems that if you provide a callback function, it will be called for each key-value pair.
void CGPDFDictionaryApplyFunction ( CGPDFDictionaryRef dict, CGPDFDictionaryApplierFunction function, void *info );
So you can pass your second dictionary (say dict2 ) as info . In CGPDFDictionaryApplierFunction you can see if there is a current current key , also in dict2
source share