Skip to main content
adamdehaven
Participant
June 17, 2020
Answered

Get true artboard size with "large canvas" document from ExtendScript

  • June 17, 2020
  • 1 reply
  • 2959 views

The latest release of Illustrator adds a new "large canvas" document  for any artboard created that is larger than 227 inches in width and/or height. What it appears to be doing behind the scenes is actually changing the document scale to 1/10 of the original size.

 

I have an ExtendScript extension that gets the document dimensions via app.activeDocument.width. With the new "large canvas" document, the dimensions returned are 1/10 their actual value. 

 

For example, if I create an artboard that  is 400 inches wide by 300 inches tall (so lustrator uses a "large canvas"), when I check the size of the artboard using app.activeDocument.width it returns 40 instead of 400.

 

Is there a way to either detect when a "large canvas" is being used, or to get the true dimensions of the artboard? 

Correct answer m1b

Hi Adam,

 

There is a property of document called scaleFactor. On a large document it is 10, otherwise it's 1.

app.activeDocument.scaleFactor

 

Regards,

Mark 

1 reply

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
June 17, 2020

Hi Adam,

 

There is a property of document called scaleFactor. On a large document it is 10, otherwise it's 1.

app.activeDocument.scaleFactor

 

Regards,

Mark 

adamdehaven
Participant
June 17, 2020

Mark, you're my hero. I couldn't find this documented anywhere! Thanks!

m1b
Community Expert
Community Expert
June 18, 2020

By the way, I found it by running the Extendscript Debugger in Visual Studio Code and looking at the active document object while the debugger was running. You can see the properties and their values.

 

Mark