Hi,
I am using following code to set interior color of annotation(square/circle). But it is not working. Could you please figure out the issue or let me know how to set interior color?
CosObj cosAnnot = PDAnnotGetCosObj (annot); CosDoc cosDoc = CosObjGetDoc(cosAnnot); CosObj cColorObj = CosNewArray(cosDoc,
false , 3); CosArrayPut(cColorObj, 0, CosNewFixed(cosDoc,
false, interiorColor[0])); CosArrayPut(cColorObj, 1, CosNewFixed(cosDoc,
false , interiorColor[1])); CosArrayPut(cColorObj, 2, CosNewFixed(cosDoc,
false, interiorColor[2])); CosDictPutKeyString(cosAnnot,
"IC", cColorObj); PDAnnotNotifyDidChange(annot, ASAtomFromString(
"IC"), 0);
I am calling above code in the notification of PDPageDidAddAnnot.
Regards,
Arvind
Did you check that your object was correctly modified? Looks good here, but that's an important check.
Second, calling a notification from a notification is never a great idea - always prone to issues. Try postponing the change till the next Idle, for example.