Copy link to clipboard
Copied
fit page in window in framemaker.i have used var zoom= oDoc.Constants.FV_FIT_WINDOW_TO_PAGE; in javascript code.The result is -3.but nothing change in framemaker document.how to i change the zoom level in framemaker using extendscript?
Copy link to clipboard
Copied
This is the correct syntax:
var doc = app.ActiveDoc;
doc.Zoom = Constants.FV_FIT_WINDOW_TO_PAGE;
However, this constant doesn't work as expected. Let me see if I can figure out the right one.
Copy link to clipboard
Copied
This works exactly as expected for me. It matches the command in the zoom dropdown where the document window is un-docked and the window matches the size of the document. However we do see strange results when more than one document has its window fit to the page, but that's not a scripting problem.
Copy link to clipboard
Copied
Thank u.It's working..but i need Increase and decrease the zoomlevel in framemaker document using percentage when i click the checkbox.. Is it possible or not ? i have used in this code
var doc = app.ActiveDoc;
doc.Zoom=1.4; The result is 1.4.But no movement in the framemaker document.
Copy link to clipboard
Copied
This fits the page of a docked document to the document window. I am not sure if this is what you want.
Fcodes ([FCodes.KBD_ZOOM_FIT_PAGE]);
Fcodes require an active document.
Copy link to clipboard
Copied
Thank u.It's working..but i need Increase and decrease the zoomlevel in framemaker document using percentage when i click the checkbox.. Is it possible or not ? i have used in this code
var doc = app.ActiveDoc;
doc.Zoom=1.4; The result is 1.4.But no movement in the framemaker document.
Copy link to clipboard
Copied
Thank u.It's working..but i need Increase and decrease the zoomlevel in framemaker document using percentage when i click the checkbox.. Is it possible or not ? i have used in this code
var doc = app.ActiveDoc;
Checkbox.onClick = function () {
if (CheckBox.cheked ==true){
doc.Zoom = 80;
}
}
Copy link to clipboard
Copied
In FrameMaker many numeric values are handled as FrameMaker's Metric values. This allows the values to always be handled as integers. In this system for a zoom level of 100%, FrameMaker expects an FM Metric value of 65536.
So to get a zoom of 80% simply multiply 65536 by 0.8. In your code this would be:
doc.Zoom = 0.8*65536;
Ian