Copy link to clipboard
Copied
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?
1 Correct answer
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
Explore related tutorials & articles
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Mark, you're my hero. I couldn't find this documented anywhere! Thanks!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hi Mark. Could you possibly provide more details on how you did this with the Extendscript Debugger and Visual Studio Code? Thanks in advance.
Copy link to clipboard
Copied
Hi femkeblanco,
In Visual Studio Code I made a script which invoked the debugger:
debugger;
Then ran the script using the ExtendScript Debugger. By the way, this was my launch configuration:
{
"type": "extendscript-debug",
"request": "launch",
"name": "Debug current file",
"program": "${file}",
"targetSpecifier": "illustrator-24.064"
}
As the script runs, Illustrator is activated but, when the debugger is invoked, Visual Studio Code is re-activated and the script is paused. This is where you would be stepping through the debugging process, but that isn't what I needed this time.
I looked in the debug pane under 'variables' and navigated to 'local/app/activeDocument', and then I looked through the list of properties of the active document and found 'scaleFactor'. Bingo!
Hope that works for you.
- Mark
Copy link to clipboard
Copied
Thanks a lot. I'll try this today.

