Copy link to clipboard
Copied
I am using FrameMaker FDK 7.2. I am looping through all flowIds in a document. When I see a flow that is a FO_HiddenPage, how can I determine the actual page number of the hidden page in the document. (code below).
////////////////////////////////////////////////////////////////////////////////
VoidT OpenDoc(F_ObjHandleT docId)
////////////////////////////////////////////////////////////////////////////////
{
F_ObjHandleT pageId = F_ApiGetId(0, docId, FP_FirstBodyPageInDoc);
F_ObjHandleT lastPageId = F_ApiGetId(0, docId, FP_LastBodyPageInDoc);
IntT lastPageNo = F_ApiGetInt(docId, lastPageId, FP_PageNum) + 1;
IntT currPageNo = 1;
F_ObjHandleT pgfId, flowId, objectId;
IntT pageType = 0;
F_Printf(NULL, " Last Page=%d\n", lastPageNo);
while (currPageNo <= lastPageNo)
{
//pageType = GetHidden(docId,pageId);
F_Printf(NULL, " Current Id=%d\n", pageId);
pageId = F_ApiGetId(0, pageId, FP_PageNext);
++currPageNo;
}
flowId = F_ApiGetId(FV_SessionId,docId,FP_FirstFlowInDoc);
while (flowId)
{
objectId = F_ApiGetId(docId,flowId,FP_FirstTextFrameInFlow);
pageType = GetPageType(docId,objectId);
if (pageType == FO_HiddenPage)
{
pgfId = F_ApiGetId(docId,objectId,FP_FirstPgf);
while (pgfId)
{
F_Printf(NULL, " flowId=%d objectId=%d pgfId=%d -->HIDDEN PAGE\n", flowId, objectId, pgfId);
pgfId = F_ApiGetId(docId,pgfId,FP_NextPgfInFlow);
}
}
}
Copy link to clipboard
Copied
AFAIK, the "Hidden Page" is where FM places conditional text that is set to "Hide". It doesn't have any physical location within the layout of content. It's just a special container that FM uses to collect and store the conditional content.