I'm having a little trouble with determining if an XObject in the content stream is visible. I'm trying to use PDEElementIsCurrentlyVisible, but it throws an Adobe exception at this call, and the error message is "Incorrect PDEObject Type". Needless to say, this isn't exactly the most enlightening error message I've ever seen. I'll post the code I'm using, and hopefully someone can tell me where I've gone wrong... Thanks.
volatile PDEContent pageContent = NULL;
pageContent = PDPageAcquirePDEContent(page, 0);
long foundIndex = getWatermarkElementIndex(content, pageContent);
long numElements = PDEContentGetNumElems(pageContent);
if (foundIndex == numElements) //if not found
PDEForm element = (PDEForm)PDEContentGetElem(pageContent, foundIndex);
PDOCContext context = PDDocGetOCContext(PDPageGetDoc(page));
long visible = PDEElementIsCurrentlyVisible((PDEElement)element, pageContent, context);
return visible > 0;
ASGetErrorString(ASGetExceptionErrorCode(), errorMsg, 256);
This type of detailed code level issue should be submitted to Adobe Developer Support as a formal issue.
Thanks for the quick reply, Leonard. We'll do it...