Easiest way to draw all annotations with PDPageDrawContentsToMemory?
I am currently trying to draw a PDF (as well as the text annotations) using PDPageDrawContentsToMemory, but I'm running into problems.This [https://forums.adobe.com/thread/827380] thread seems to suggest text annotations will draw if kPDPageIsPrinting and kPDPageUseAnnotFaces are set as drawFlags, but this doesn't appear to be working when I try it. The PDF draws to the screen, but without the annotations. What am I missing here? Thanks
Relevant code snippet:
"
...
csAtom = ASAtomFromString("DeviceRGB");
drawFlags = kPDPageIsPrinting | kPDPageUseAnnotFaces | kPDPageSwapComponents;
smoothFlags = kPDPageDrawSmoothText | kPDPageDrawSmoothLineArt | kPDPageDrawSmoothImage;
PDPageDrawContentsToMemory( pdPage, drawFlags, &matrix, pASInvRect, smoothFlags, csAtom, 8, &bRect, (char*)pBits, bitsSize, nil, nil);
"
