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

53

Likes

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

Adobe Community Professional , Mar 28, 2022 Mar 28, 2022
How about setting this property to False before saving it: FP_DocIsViewOnly

Likes

Translate

Translate
Adobe Community Professional ,
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);
}

Likes

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.

Likes

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

Copy link to clipboard

Copied

How about setting this property to False before saving it:

FP_DocIsViewOnly

Likes

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.

Likes

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