![]() So what "state" is my image in, and why is it not "applicable" even though the app is clearly using it to prevent me resizing it? How do I resize my image, given that this is an automated process and in production I won't have access to InDesign to edit it manually beforehand?Īs stated in Adobe's documentation, an image container - the parent frame 'around' an image, which is a generic SplineItem - can be locked and unlocked by changing the read/write boolean property locked. Without the try/catch but keeping the if(image.locked) block, it throws the error "The property is not applicable in the current state." when trying to access image.locked. ![]() With the try/catch block around the if(image.locked) block, the resize line throws the error "Image is locked" (because it fails to unlock it). Lock the image again if it was locked before Image.geometricBounds = + h_offset) + "mm", (rectangle.geometricBounds + w_offset) + "mm", (rectangle.geometricBounds - h_offset) + "mm", (rectangle.geometricBounds - w_offset) + "mm"] (work out new width, height, v offset, h offset) Var image = (find image again because after the relink it would otherwise cause error "Object no longer exists") ![]() Simplified version of code: var image = (get image) I am writing some JS code to relink an image, then resize it to fit the containing object. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |