Resize the artboard for content - works on Mac (CS6), not win (CC)

Hello!

This code works perfectly in Illustrator CS6 for Mac:

function resizeArtboard() {}

App.Redraw ();

app.activeDocument.artboards [0] .artboardRect = app.activeDocument.visibleBounds;

App.Redraw ();

}

It works like the "work Plan retractable insert content menu option."

However, the execution of this script in Illustrator CC, for Windows, the result is different: the content is expanded to fit the artboard instead.

How can I solve this?

Thanks in advance!

/ Le Mans

It turns out that I was wrong: this function worked. However, when I then saved the file as a SVG, Illustrator ignored the proportions of the document. To fix this, I had to put the export option preserveEditability = true (of all things). Apparently it's a feature of Illustrator CC to not understand the proportions of the document in the default SVG files.

Tags: Illustrator

Similar Questions

Maybe you are looking for