Skip to main content
Participating Frequently
March 28, 2022
Answered

F_ApiSave() saves douments as view only

  • March 28, 2022
  • 1 reply
  • 244 views

I am changing the color definitions programmatically using F_ApiSimpleImportFormats method and after that if i try to save the document using F_ApiSave, it saves the document in ViewOnly mode. What can be done to save document in editable mode only?

I am using FrameMaker 2019 edition.

    This topic has been closed for replies.
    Correct answer frameexpert

    How about setting this property to False before saving it:

    FP_DocIsViewOnly

    1 reply

    frameexpert
    Community Expert
    Community Expert
    March 28, 2022

    Have you tried specifying FrameMaker binary as the save format?

    // saveDoc()
    //
    F_ObjHandleT saveDoc(F_ObjHandleT doc, StringT path) {
    
        IntT i = 0;
        F_PropValsT saveScript, *pReturnedProps = NULL;
    
        saveScript = F_ApiGetSaveDefaultParams();
        i = F_ApiGetPropIndex(&saveScript, FS_FileType);
        saveScript.val[i].propVal.u.ival = FV_SaveFmtBinary;
    
        doc = F_ApiSave(doc, path, &saveScript, &pReturnedProps);
    
        F_ApiDeallocatePropVals(&saveScript);
        F_ApiDeallocatePropVals(pReturnedProps);
    
        return(doc);
    }
    
    Participating Frequently
    March 28, 2022

    Yes i specified FV_SaveFmtBinary as FileType but still it saves as Viewonly document, I tried to experiment with many other parameters but i could not find anything which solves the problem.

    frameexpert
    Community Expert
    frameexpertCommunity ExpertCorrect answer
    Community Expert
    March 28, 2022

    How about setting this property to False before saving it:

    FP_DocIsViewOnly