I'd like to add a simple drop shadow to a page item. In looking through the object model it I can't seem to find a way to do it. Is this impossible?
I thought I'd try just applying an existing graphic style but that doens't seem to be working either. Can anyone help me either add a drop shadow or simply apply one of the default graphic styles from illustrator? There is one called "Drop Shadow Hard" under "Image Effects" in the graphic styles panel. Any ideas?
var doc = app.activeDocument;
var shadowLayer = doc.layers.add();
var shadowRec = shadowLayer.pathItems.rectangle(-20, -10, 650, -820);
var dropShadow = doc.graphicStyles.getByName("Drop Shadow Hard");
dropShadow.applyTo(shadowRec);
Thanks,
Lindsay
The graphic style you have chossen is part of an added library… replace that with a name from the document graphic styles and you will see it apply…