Copy link to clipboard
Copied
During my typical workflow, I set various zoom levels at different points along the way. These zoom levels are all of the following:
Fit on Screen which is simple enough.
50%
75%
100%
150%
200%
300%
Why I need these specific zoom levels isn't important, but suffice it to say that based on my typical image sizes and screen size, those are what work best for me during my workflow.
Do I need a script or can this be accomplished with only actions?
Thank you.
Copy link to clipboard
Copied
You can set the zoom to 50, 100, 200, or 300 with either a script or an action. As far as I know you can not set the zoom to 75 or 150 with either.
With CS4 you can determine the currrent zoom of a document by getting the 'zoom' key of the document descriptor using action manager, but I have not been able to set the zoom using that key.
Copy link to clipboard
Copied
jugejury, thanks for you post.
function setZoom( zoom ) {// as percent
cTID = function(s) { return app.charIDToTypeID(s); }; // from xbytor
var docRes = activeDocument.resolution;
activeDocument.resizeImage( undefined, undefined, 72/(zoom/100), ResampleMethod.NONE );
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( cTID( "Mn " ), cTID( "MnIt" ), cTID( 'PrnS' ) );
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "slct" ), desc, DialogModes.NO );
activeDocument.resizeImage( undefined, undefined, docRes, ResampleMethod.NONE );
}
setZoom(150);
Copy link to clipboard
Copied
Thank you, Michael. My name is Mike, BTW.
That script you wrote will be very useful to me in my workflow. A lot better than what I already have. And it's a lot better suited for various monitors that may have a different dot pitch.
I really appreciate this. Thanks a lot!
Mike
Copy link to clipboard
Copied
Very cool solution, Mike. I've added it to stdlib.js.
-X
Copy link to clipboard
Copied
xbytor2 wrote:
Very cool solution, Mike. I've added it to stdlib.js.
-X
xbytor2,
Keep in mind that when doing it this way, the print size of the document is changed. If someone were to use this, then print their document it may produce unexpected results.
Maybe Mike can add a reset into his script to reset the print size back to the original after using the "Print Size View" to change the zoom level.
Edit: Sorry, I didn't look close enough. I guess he thought of that.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now