Skip to main content
Participating Frequently
September 18, 2008
Question

How to detect overflowed text?

  • September 18, 2008
  • 1 reply
  • 502 views
Hello,

I'd like to programatically detect overflowed text (ie. text which is not visible in its entirety). In reference guide I found that it should work be obtaining FP_Overflowed property of FO_SubCol, but it doesn't work for me. Here's sample document:

http://twoflower.matfyz.cz/inc/overflow_text.fm

How can I detect it properly?

Thank you.
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    September 18, 2008
    Hi Stanislav...

    I've used the following code to detect an overflow ..

    F_ObjHandleT pageId = F_ApiGetId(FV_SessionId, docId, FP_FirstBodyPageInDoc);
    while (pageId) {
    F_ObjHandleT pageFrameId = F_ApiGetId(docId, pageId, FP_PageFrame);
    F_ObjHandleT frameId = F_ApiGetId(docId, pageFrameId, FP_FirstGraphicInFrame);
    F_ObjHandleT subcolId = F_ApiGetId(docId, frameId, FP_LastSubCol);
    F_Printf(NULL, "pageFrameId %d; frameId %d; subcolId %d\n", pageFrameId, frameId, subcolId);
    if (F_ApiGetInt(docId, subcolId, FP_Overflowed) == True) {
    // do something
    }
    pageId = F_ApiGetId(docId, pageId, FP_PageNext);
    }

    When I run this on your file, it appears that your small overflowed textframe has no subcols, thus no place to check for the FP_Overflowed property. I'm not sure exactly why there would be no subcols (an Esc,g,o shows that it has one column .. ??).

    Good luck,

    ...scott