Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

doc.Save() taking forever to complete

$
0
0

Hi all,

 

I have a script that iterates through a book and saves each FM file it finds as an RTF file; however, it takes 10+ sec for the doc.Save() call to complete, which seems like a lot. Just wondering if anyone else has had this problem with saving to RTF? Any insight is greatly appreciated.

 

The function:

 

function saveAsRtf(doc)

{

    var path = doc.Name;

    var saveParams = GetSaveDefaultParams();

    var retParams = new PropVals();

    var index;

 

    index = GetPropIndex(saveParams, Constants.FS_FileType);

    saveParams[index].propVal.ival = Constants.FV_SaveFmtFilter;

    index = GetPropIndex(saveParams, Constants.FS_SaveFileTypeHint);

    saveParams[index].propVal.sval = "0001ADBIRTF         Microsoft RTF1.6";

 

    path = path.replace(/\.[^\.]+$/, ".rtf");

 

    doc.Save(path, saveParams, retParams);

 

    return;

}

 

- Carl


Viewing all articles
Browse latest Browse all 888

Latest Images

Trending Articles



Latest Images

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