0
Problem in finding margin values in framemaker 7.1
New Here
,
/t5/framemaker-discussions/problem-in-finding-margin-values-in-framemaker-7-1/td-p/1197304
Jun 01, 2008
Jun 01, 2008
Copy link to clipboard
Copied
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
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Advisor
,
/t5/framemaker-discussions/problem-in-finding-margin-values-in-framemaker-7-1/m-p/1197305#M1726
Jun 02, 2008
Jun 02, 2008
Copy link to clipboard
Copied
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/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_Mathew_cj_
AUTHOR
New Here
,
LATEST
/t5/framemaker-discussions/problem-in-finding-margin-values-in-framemaker-7-1/m-p/1197306#M1727
Jun 02, 2008
Jun 02, 2008
Copy link to clipboard
Copied
Hai Sheila,
Thanks for the webpage link.
Thanks
Mathew
Thanks for the webpage link.
Thanks
Mathew
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

