Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem in finding margin values in framemaker 7.1

New Here ,
Jun 01, 2008 Jun 01, 2008
Hai All
I am new to this forum.
Through FrameMaker 7.1 FDK i am trying to calculate current document layout information like document width, text frame width and left margin with the help of these values I am trying to get Right margin value. In some particular layout i am getting the wrong right margin.
Find the layout values
FP_PageWidth: 572.597 pt /*document width*/
FP_LocX: 57.070 pt /*Text frame left margin*/
FP_Width: 456.000 pt /*Text frame width*/

The calculated Right margin should be 59.527 pt but it is calculating the value as 59.528 pt my code follows

#include "fmetrics.h"

#define pts (MetricT) 65536

MetricT docwidth, Fr_width, Fr_LeftMrg, Fr_RightMrg;

docwidth = F_ApiGetMetric(FV_SessionId, docId, FP_PageWidth);
if (F_ApiGetObjectType(docId, objId) == FO_TextFrame)
{
Fr_width = F_ApiGetMetric(docId, objId, FP_Width);
Fr_LeftMrg = F_ApiGetMetric(docId, objId, FP_LocX);
Fr_RightMrg = (Pwidth - (Fr_width + Fr_LeftMrg));

F_Printf(NULL, "docwidth: %3.3f\n", F_MetricToFloat(docwidth));
F_Printf(NULL, "Fr_width: %3.3f\n", F_MetricToFloat(Fr_width));
F_Printf(NULL, " Fr_LeftMrg: %3.3f\n", F_MetricToFloat(Fr_LeftMrg));
F_Printf(NULL, " Fr_RightMrg: %3.3f\n", F_MetricToFloat(Fr_RightMrg));
}
Please advice is there any other way to get the correct values.

Thanks in advance
Mathew.cj
249
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 02, 2008 Jun 02, 2008
Mathew, if you have not yet done so, you might find a better response by posting to the Frame Dev group, here: http://groups.yahoo.com/group/frame_dev/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 02, 2008 Jun 02, 2008
LATEST
Hai Sheila,

Thanks for the webpage link.

Thanks
Mathew
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines