Copy link to clipboard
Copied
Hi, have you ever tried changing the pagination ?
doc.PageSide = Constants.FV_BK_START_RIGHT; seems, doesn't work
Copy link to clipboard
Copied
Are you sure your document is doublesided ? I tried your code on a new doc and it works only if I first set
doc.DocIsDoubleSide = true;
Copy link to clipboard
Copied
Hi, Can you share the code, please ?
Copy link to clipboard
Copied
I just did. Place the code line from my previous reply before the line you already have. That should do the trick.
Copy link to clipboard
Copied
doc must be a object of the book or .fm doc ?
Copy link to clipboard
Copied
OK, I get it. I thought you already had the doc object available.
When you have a document open, you can set the doc object to point to it. I use variable names that indicate what type of thing they represent, so my objects are always prepended with an 'o'. Strings get an 's' prefix, integers an 'i'. etc.
So my complete code would lool like this:
var oDoc = app.ActiveDoc;
oDoc.DocIsDoubleSided = true
oDoc.PageSide = Constants.FV_BK_START_RIGHT;
To set this for all the documents in a book, you will have to open all the book components one by one and run the above code on them. I do not have time to give you the code for that. You will have to figure that out yourself. But for the currently active document the above code will work. And the settings are saved in the file, so you do not need to repeat this when the doc is reopened.
Kind regards
Copy link to clipboard
Copied
var doc = OpenDoc(bookComp.Name);
if (doc.ObjectValid()) {
doc.DocIsDoubleSided = true;
doc.PageSide = Constants.FV_BK_START_RIGHT;
doc.PageNumComputeMethod = Constants.FV_NUM_RESTART;
doc.ChapNumComputeMethod = Constants.FV_NUM_RESTART;
doc.PgfNumComputeMethod = Constants.FV_NUM_RESTART;
doc.MakePageCount = Constants.FV_MakePageCountEven;
doc.Close(1);
}
And, no any changes
Copy link to clipboard
Copied
You are not saving the document after making all those changes. The parameter 1 in the Close method tells Frame to disregard any changes and close the doc anyway.
Before closing the doc you need to save it:
doc.SimpleSave( doc.Name, false );
The false parameter makes the save non-interactive. This should be fine for the SimpleSave method.
Copy link to clipboard
Copied
it didn't help. Thanks I will try more and share the results here.