Copy link to clipboard
Copied
Is there a way I can see pixel dimensions based on a browser display of 72ppi (view at actual size). There was a script ' Save as web resolution' which reduces the actual size to match pixel sizes
Illustrator has 'Display Print Size at 100% Zoom' which is handy, as this can be toggled on and off to get a good idea to pixel dimension.
can anyone help.
rob
Copy link to clipboard
Copied
This JavaScript lets you toggle between the default 100% print view and a 1:1 monitor view:
var pr, sr;
makeDialog();
function makeDialog(){
var theDialog = app.dialogs.add({name:"Dialog", canCancel:true});
with(theDialog){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Scale for Print (CC Default)"});
staticTexts.add({staticLabel:"Scale for Screen (1:1 pixels)"});
}
with(dialogColumns.add()){
with(radiobuttonGroups.add()){
pr = radiobuttonControls.add({checkedState:true,minWidth:80});
sr = radiobuttonControls.add({checkedState:false,minWidth:80});
}
}
}
var res = theDialog.show();
if(res == true){
pr = pr.checkedState
sr = sr.checkedState
setDisplay()
}else{
theDialog.destroy();
}
}
function setDisplay(){
if (pr) {
app.generalPreferences.useCustomMonitorResolution = false;
app.activeWindow.zoomPercentage = 100;
}
if (sr) {
app.generalPreferences.customMonitorPpi = 72;
app.generalPreferences.useCustomMonitorResolution = true;
app.activeWindow.zoomPercentage = 100;
}
}
Dialog:
Copy link to clipboard
Copied
many thanks for this, I'll give this a go..
Copy link to clipboard
Copied
mmm, not sure this works in Indesign 2024?
Copy link to clipboard
Copied
sorry, it does.. thanks
Copy link to clipboard
Copied
Ahh, just done another measurement. It doesnt seems to scale to the correct pixel size... sorry, was trying to edit/delete the last posts
Copy link to clipboard
Copied
The script is setting the monitor resolution InDesign uses to 72 PPI, if you are scaling the UI either via InDesign or the OS, you could try something other than 72.
Copy link to clipboard
Copied
Also, if you are on a retina or some other HDPI display, a browser will detect the high res display and scale up the page. It’s somewhat futile to worry about this now that most websites use responsive coding—the page is going to scale itself to the device’s available screen area, so it’s unlikely the page would ever be viewed at an exact 1:1 ratio anymore.
Copy link to clipboard
Copied
Thanks, will do.
Copy link to clipboard
Copied
Thank you ever so much, this is exactly what I've been looking for. On first test it works brilliantly when using my large 72ppi monitor
Find more inspiration, events, and resources on the new Adobe Community
Explore Now