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

F_ApiSave() saves douments as view only

Community Beginner ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

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.

Views

160

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Mar 28, 2022 Mar 28, 2022

How about setting this property to False before saving it:

FP_DocIsViewOnly

Votes

Translate

Translate
Community Expert ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

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);
}

Votes

Translate

Translate

Report

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
Community Beginner ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

How about setting this property to False before saving it:

FP_DocIsViewOnly

Votes

Translate

Translate

Report

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
Community Beginner ,
Mar 28, 2022 Mar 28, 2022

Copy link to clipboard

Copied

LATEST

Oh Finally it worked Thank you so much Sir!  I was setting this to false after calling save method, that's why it was not working.

Votes

Translate

Translate

Report

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