Hi,
I have been using FrameMaker10 and FDK10 to convert Frame files to XML. With the release of FrameMaker11, I moved the code to FDK11, expected the performance would be much higher comparing to FDK10. But to my surprise, the export of Graphic images using FDK11 takes more than 20times the time taken with FDK10. Following code is used for Graphic export. Any idea, why is this lag with FDK11?.
BoolT ExportGraphic(StringT Outputname, StringT CGMFilter, F_ObjHandleT DocId, F_ObjHandleT AFrameId, StringT Format)
{
F_PropValsT ExportParams, *ReturnParams=NULL;
UCharT msg[256];
BoolT Status=TRUE;
IntT Index;
ExportParams=F_ApiGetExportDefaultParams();
if (ExportParams.len==0)
{
F_Sprintf(msg,"%s","Error allocating memory for export properties.");
Status=FALSE;
}
else if ((Index=F_ApiGetPropIndex(&ExportParams,FS_ExportFileTypeHint))==FE_B adPropNum)
{
F_Sprintf(msg,"%s","Unable to find FS_ExportFileTypeHint index.");
Status=FALSE;
}
else if ((ExportParams.val[Index].propVal.u.sval=(StringT)CGMFilter)==NULL)
{
F_Sprintf(msg,"%s","Memory allocation error.");
Status=FALSE;
}
else if ((Index=F_ApiGetPropIndex(&ExportParams,FS_ExportObjectId))==FE_BadPr opNum)
{
F_Sprintf(msg,"%s","Unable to get FS_ExportObjectId property.");
Status=FALSE;
}
else if ((ExportParams.val[Index].propVal.u.ival=AFrameId)==0)
{
F_Sprintf(msg,"%s","NULL anchored Frame Id.");
Status=FALSE;
}
if ((Status==TRUE) && (!(F_StrCmp(Format, JPEG_FORMAT))))
{
if ((Index=F_ApiGetPropIndex(&ExportParams,FS_GraphicDpi))==FE_BadPropNu m)
{
F_Sprintf(msg,"%s","No Graphic DPI");
Status=FALSE;
}
else
{
ExportParams.val[Index].propVal.u.ival = 160;
}
}
FA_errno=0;
if ((Status==TRUE) && (F_ApiExport(DocId,(StringT)Outputname,&ExportParams,&ReturnParams)!= FE_Success))
{
if ((FA_errno) || ((IntT)ReturnParams->val[Index].propVal.u.ival))
F_Sprintf(msg,"Unable to export graphic to %s.",Outputname);
Status=FALSE;
}
if (ReturnParams)
F_ApiDeallocatePropVals(ReturnParams);
return Status;
}
Thanks,
Venkat