My program creates adobe ai or (eps) file and I want to copy it to pasteboard. I copied sample ai object in adobe illustrator and Inspect pasteboard by "pasteboard inspector":
My code is below but copy nothing to pasteboard:
void copyEPS(CFDataRef data)
{
OSStatus err = noErr;
PasteboardRef theClipboard;
err = PasteboardCreate(kPasteboardClipboard, &theClipboard);
// err is 0
err = PasteboardClear(theClipboard);
// err is 0
PasteboardSynchronize(theClipboard);
err = PasteboardPutItemFlavor(theClipboard, (PasteboardItemID)1,
CFSTR("AICB"), data, 0);
// err is 0
CFRelease(data);
}
How can I do it? Thankyou.