Skip to main content
adamdehaven
Participant
Jun 17, 2020 9:58 PM UTC
Answered

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

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? 

m1b
m1bCorrect answer
Community Expert
Jun 17, 2020 10:46 PM UTC

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 

6 replies

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
Jun 17, 2020 10:46 PM UTC

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 

Translate
adamdehaven
Participant
Jun 17, 2020 11:08 PM UTC

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

Translate
m1b
Community Expert
Community Expert
Jun 18, 2020 11:25 PM UTC

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

Translate