Skip to main content
Known Participant
November 28, 2023
Question

View actual pixel dimensions, for example Leaderboard 768x90

  • November 28, 2023
  • 1 reply
  • 846 views

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

This topic has been closed for replies.

1 reply

rob day
Community Expert
Community Expert
November 28, 2023

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:

 

Known Participant
November 28, 2023

many thanks for this, I'll give this a go..