Skip to main content
Participant
March 15, 2009
Question

Crop Area Tool - Illustrator CS3 (javascript)

  • March 15, 2009
  • 1 reply
  • 3647 views
Can Javascript use the Crop Area Tool in Illustrator CS3?

I am trying to create a crop area around the selected artwork.
I can select the artwork (path object). Then I want to use the preset: crop to selected artwork. Then save, and repeat for next file.

Is this possible using javascript?
This topic has been closed for replies.

1 reply

Known Participant
March 27, 2009
I don't know how far you have been up to with your code. I never really cropped the artwork by code, I only placed the crop marks using this code:

aiDocRef.cropBox = [-bld, docH+bld, docW+bld, -bld];

You could use the bounds of the selected graphics instead.

Since I've never scripted the printing in Ai, I cannot tell you how to crop while printing, but this might get you started. In CS4 they introduced multiple artboards, which requires different code for cropping, as far as I can see from the ref PDF.

cheers,
m.