Pasting images from frame to frame without loss of positioning data
May 19, 2020 at 7:31 am #125137
I hate to begin this post by talking about something that was easier in QXP than it is in ID, but I could paste images from one box to another in Quark back in 1990 without losing positioning data. I’m currently some versions behind in ID, but I see no trace of this obvious feature in the “What’s New” sections of PDF help files for versions later than I’m using, and a search for a script that yields this functionality came up empty handed.
I saw the workaround here (https://indesignsecrets.com/paste-image-into-new-frame-with-same-cropping-offsets.php) and had an attack of the are-you-kidding-mes.
Seriously? This is so basic, I don’t understand why ID doesn’t incorporate it.
Working example: horizontal row of head shots, each in the same size frame; at the eleventh hour, the client says, “Oh, please move photo 3 to frame 10, and scoot everyone from frame 4 through frame 10 up one spot.” My current project has 4 spreads like this, with a total of 60 images.
What am I missing here, besides the hardware necessary to sharecrop my software with CC?
May 19, 2020 at 1:25 pm #125154
May 20, 2020 at 9:11 am #125157
Finally managed to get on this forum using Opera, of all things. Other browsers (desktop and mobile) are giving me error 503.
I’ve posted this feature request here:
May 20, 2020 at 9:51 am #125158
Sorry for the problem on the site! That was crazy. Tech support got us back up and running again. I voted for your suggestion!
May 20, 2020 at 3:05 pm #125169
Thanks for the vote, David! The suggestion’s up to a count of 6 as I write this.
And just to prove that yes, this suggestion is worth it: This afternoon, I had to rearrange two spreads of images (for a total of 40), shuffling them from straight alphabetical to alphabetical by location. My wrist is killing me.
May 20, 2020 at 5:04 pm #125170
May 21, 2020 at 3:22 am #125172
Yeah, that’d be great if the images went in a straight line. Imagine a sine wave as the “baseline” on which all the images rest.
I have to deal with both vertical and horizontal positioning to move these images around.
May 29, 2020 at 6:07 am #125293
Curiouser and curiouser. I now know why ID does not respect cropping data when you paste an image from one frame to another.
From the Department of What Were They Thinking: When I query the geometric bounds of an image I’ve selected with the Direct Selection tool, the list of properties returned (y1, x1, y2, x2) defines the position of the uncropped image relative to the dimensions of the page, not to the frame that contains it.
To make it possible to copy/paste from one frame to another and preserve the positioning data, it appears one must coerce the coordinates so they now refer to the equivalent position relative to the location of the target frame on the page.
I suppose one could derive the difference between the geometric bounds of the image and the geometric bounds of the frame, and then attempt to position a pasted copy of the graphic at the same relative location in the target frame.
What rocket scientist decided to make the positioning relative to the page? No wonder this is so danged difficult. In QXP, you’re scripting the position of the image in the box, not relative to the page, which makes it really easy to copy/paste and preserve positioning.
I’m ready for my headache now, Mr. DeMille. 8-(
May 30, 2020 at 7:06 am #125298
I wonder if the resolve method could be coaxed to return the coordinates relative to the frame. This is from page 121 of the CS6 Scripting Guide. The other CoordinateSpaces they mention that seem promising are CoordinateSpaces.parentCoordinates and CoordinateSpaces.innerCoordinates:
Sometimes, you need to get the location of a point specified in one coordinate space in the context of another coordinate space. To do this, use the resolve method, as shown in the following script example. (For the complete script, see ResolveLocation.)
var myPageLocation = myRectangle.resolve([[72, 72], AnchorPoint.topRightAnchor], CoordinateSpaces.pasteboardCoordinates, true);
//resolve() returns an array containing a single item.
alert(“X: ” + myPageLocation + “\rY: ” + myPageLocation);
May 30, 2020 at 9:37 am #125300
I’ll have to look for those methods through AppleScript. The dictionary is huge, and it’s really easy to get lost in it.
Thanks for the suggestion, Max!
You must be logged in to reply to this topic.