crop bleed on three sides indesgn cs5.5?

Hi

I use the below in part of my code to place an image into an Indesign CS5.5
document, cropping to the bleed on four sides, what I am trying to do now is crop
to only three sides of my placed image, top, left and right the bottom needs to crop
to the trim, of the image, can this be done?, or would it be easier to have the bottom
of the bleed area moved up once the image is placed?

tell application "Adobe InDesign CS5.5"
	activate
	set PDF crop of PDF place preferences to crop bleed
	set transparent background of PDF place preferences to true
	tell document 1
		place PicList as alias on page 1
	end tell
end tell

cheers

G’day

Your question is a bit confusing ” are you saying you’re happy to leave the top, left and right as they are and just move the bottom edge of the frame?

If you’re just moving the bottom edge up by a set amount you could do it like this :

	tell document 1
		set thisPic to place PicList as alias on page 1
		set geoBounds to geometric bounds of parent of thisPic
		set item 3 of geoBounds to ((item 3 of geoBounds) - 5)
		set geometric bounds of parent of thisPic to geoBounds
	end tell

That takes 5mm off your bottom edge.

m.

G`day

thanks for looking at this for me,

the code throws an error as per below, and i’m not quite sure how to remedy it.

error “Can’t get parent of {PDF id 287 of rectangle id 292 of spread id 184 of document id 1 of application "Adobe InDesign CS5.5"}.” number -1728 from parent of {«class PDF » id 287 of «class crec» id 292 of «class sprd» id 184 of document id 1}

tell application "Adobe InDesign CS5.5"
	activate
	set PicList to "PATH TO PDF"
	set PDF crop of PDF place preferences to crop bleed
	set transparent background of PDF place preferences to true
	tell document 1
		set thisPic to place PicList as alias on page 1
		set geoBounds to geometric bounds of parent of thisPic
		set item 3 of geoBounds to ((item 3 of geoBounds) - 5)
		set geometric bounds of parent of thisPic to geoBounds
	end tell
end tell

cheers

i changed the code slightly and this is doing the trick now.

tell document 1
		set thisPic to place PicList as alias on page 1
		set geoBounds to geometric bounds of item 1 of thisPic
		set item 3 of geoBounds to ((item 3 of geoBounds) + 5)
		set geometric bounds of item 1 of thisPic to geoBounds
	end tell

cheers

It is returning a list so you need to use “item 1 of parent” or parent as string.

cheers Jerome, i literally just posted when your reply turned up, “item 1” was the fix

“item 1 of parent” still throws an error

using item 1 seems to stretch the image, so this is not right

i cant seem to get the below to work either

“item 1 of parent” or parent as string.

set geoBounds to geometric bounds of item 1 of parent of thisPic --as string
		set item 3 of geoBounds to ((item 3 of geoBounds) - 5)
		set geometric bounds of item 1 of parent of thisPic to geoBounds --as string

interesting, this works fine

tell document 1
		set thisPic to place PicList as alias on page 1
		set myGraphic to item 1 of thisPic
		set myFrame to parent of myGraphic
		set myBounds to geometric bounds of myFrame
		set item 3 of myBounds to ((item 3 of myBounds) - 4.2)
		set geometric bounds of myFrame to myBounds
	end tell

Glad you got it working Budgie

My apologies ” the code I posted came from CS2.
I really didn’t expect the syntax for something so fundamental to change.
I should have known better.

m.