Skip to main content
Participant
August 24, 2011
Answered

Setting the document size

  • August 24, 2011
  • 1 reply
  • 627 views

Hi, i am trying to set the document size in a .jsx file and for miullimeters when i check from Photoshop the image size the dimensions are different

preferences.rulerUnits = Units.MM
//2. Create a new document
var docRef = documents.add(210,297,72 )

in PS 5.5 i get the size 209.9 297.04 ,is there a way to acive the exact dimension?

Thx.

P.S. This is my first post on Adobe forums so excuse me  if i did something wrong

This topic has been closed for replies.
Correct answer Paul Riggott

What you are seeing is a rounding of size/pixels/resolution

You will get a closer result ..


preferences.rulerUnits = Units.MM;
//2. Create a new document
var docRef = documents.add(210,297,1000 );


You had it set to 72 pixels per inch hence the rounding to nearest size.

1 reply

Paul Riggott
Paul RiggottCorrect answer
Inspiring
August 24, 2011

What you are seeing is a rounding of size/pixels/resolution

You will get a closer result ..


preferences.rulerUnits = Units.MM;
//2. Create a new document
var docRef = documents.add(210,297,1000 );


You had it set to 72 pixels per inch hence the rounding to nearest size.

simion314Author
Participant
August 24, 2011

IS the resolution important when working with MM?I want to create a script that will setup the document size for eexample A4 to exact like you have selected A4 from the PS new document dialog.

Thx

Paul Riggott
Inspiring
August 24, 2011

Resolution is only important if you are going to print your document, for screen/web it doesn't matter if its 1 or 10,000 pixels per inch. If it's for print you need to work on the document with the required resolution for printing.