0% found this document useful (0 votes)
45 views

Solutions 73

This document discusses how to summarize text from a document in InDesign. It provides three methods: 1. Use the frame list and text frame interfaces to get the text frame and page item containing a given text index. 2. Use the parcel's frame and text frame interface to determine the story associated with a parcel. 3. Use the parcel's parcel list interface to get the text model associated with a parcel to determine the range of text it displays.

Uploaded by

Charana Studios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Solutions 73

This document discusses how to summarize text from a document in InDesign. It provides three methods: 1. Use the frame list and text frame interfaces to get the text frame and page item containing a given text index. 2. Use the parcel's frame and text frame interface to determine the story associated with a parcel. 3. Use the parcel's parcel list interface to get the text model associated with a parcel to determine the range of text it displays.

Uploaded by

Charana Studios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CHAPTER 2: Text Text containers 73

1. Use ITextModel::QueryFrameList to get the frame list (IFrameList) on the frame list boss object
(kFrameListBoss).

2. Use IFrameList::QueryFrameContaining to get the text frame (ITextFrameColumn) for the frame boss
object (kFrameItemBoss).

3. Use IHierarchy::QueryParent to get the multi-column frame item (kMultiColumnItemBoss). Use the
equivalent call on the multi-column item to get the page item (kSplineItemBoss).

NOTE: The index need not belong to the primary story thread; it could reference text within another story
thread, like a table cell or footnote.

Sample code

SnpManipulateTextFrame::QueryTextFrameContaining

Finding the story associated with a parcel


Given a parcel (IParcel), you can determine the story with which it is associated.

Solution

The text must be fully composed. Follow these steps:

1. Use IParcel::QueryFrame on the parcel object to get the text frame interface (ITextFrameColumn) on
the text frame boss object (kFrameItemBoss) with which the parcel is associated.

2. Use ITextFrameColumn ::QueryTextModel to get the text model for the text that flows in the text
frame.

Alternatively, navigate using the text parcel list (ITextParcelList), as follows:

1. Use IParcel::QueryParcelList on the parcel object to get the parcel list (IParcelList) that maintains the
relationship for associated parcels.

2. Use ITextParcelList::GetTextModelRef to get the UIDRef for the text model (kTextModelRef ) associated
with the parcel. ITextParcelList is on the same boss object as the IParcelList interface.

Sample code

SnpEstimateTextDepth::GetParcelTextRange code snippet

Finding the range of text displayed by a parcel


You can determine the range of a particular text story displayed in a particular parcel (IParcel).

Solution

The text must be fully composed. Follow these steps:

1. Use IParcel::GetParcelKey to obtain the parcel key.

You might also like