Quantcast
Channel: Adobe Community : Popular Discussions - FrameMaker Structured
Viewing all articles
Browse latest Browse all 66580

Getting paragraph properties

$
0
0

Hello,

 

I  am having trouble getting the properties of a paragraph, such as:

  1. FontSize
  2. FontWeight (of the  paragraph in general, ignoring any character formats within it).
  3. List identifier

I  have tried the following:

F_PropValT fontSize =  F_ApiGetPropVal(docId, pgfId, FP_FontSize); //this returns a zero.

(and)

StringT pgfName;

F_PropValsT proplist;

//******Get ID of flow,  textFrame, pgfId.******

pgfName = F_ApiGetString(docId, pgfId,  FP_Name);

//******Get ID for paragraph format.******

pgfFmtId =  F_ApiGetNamedObject(docId, FO_PgfFmt, pgfName);

proplist =  F_ApiGetProps(docId, pgfFmtId);

IntT i = F_ApiGetPropIndex(&proplist,  FP_FontSize);

Then, shouldn't "proplist.val[i].propVal.u.ival"  hold the font-size? //but it returns a zero.

........

//******de-allocate  pgfName, proplist here.******

 

As for the list  identifier, how do we get the identifier of the inner-most list item,  say "i" in the example below?

1.  First item in the list

            a.  Sub item in this list

                        i. Sub-sub-item in this list

I  assume, it is the FP_AutoNumString property together with the FP_PgfNumber property to get the nested  list format and its value. But I didn't have any luck.

This  is what I am trying to achieve,

  • For each paragraph in a  flow, get the above mentioned paragraph properties.
  • Create a new format name  based on its font-size, weight and list number, (say, a new format name  "FS14-FWB-LS-i" - for font-size: 14 pts, font-weight: bold, list  identifier: i).
  • Add this entry to the Paragraph catalog and apply this format  (name) to the paragraph.

I  would appreciate any help getting the properties...

Thanks  in advance,

 

pnk


Viewing all articles
Browse latest Browse all 66580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>