• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

paste in place

Contributor ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Hi,

 

I try to copy a logo on page 2 and paste it in place on page 3.

When I presee shift+opt+cmd+V, it is pasted on page 2.

 

Is there any better way?

 

Hosun

 

Screenshot 2022-11-06 at 3.09.59 AM.png

TOPICS
How to

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 3 Correct answers

Community Expert , Nov 05, 2022 Nov 05, 2022

Create an object style and setup the position of the frame in the object syle definition.

Capture d’écran 2022-11-05 à 19.28.47.jpg

Votes

Translate

Translate
Community Expert , Nov 05, 2022 Nov 05, 2022

Rather than Paste in Place why not put the logo into position on a Parent (aka Master) page since it looks like you are using the same layout on both pages?

Other than that you might want to log this in as a feature request at https://www.adobe.com/products/wishform.html.

Votes

Translate

Translate
Community Expert , Nov 07, 2022 Nov 07, 2022

OK, this WORKS 😄

 

//Paste In Place to destination page
//Select a page item, run script, and double-click a page in the Pages panel

#targetengine "pasteinplace";

PasteInPlace()
var el, b, s;
var or = app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN; 
function PasteInPlace(){
    if (app.selection.length > 0) {
        var doc = app.activeDocument;
        s = doc.selection[0];
//        b = s.geometricBounds;
//        app.copy()
        var el = app.addEventListener("a
...

Votes

Translate

Translate
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Create an object style and setup the position of the frame in the object syle definition.

Capture d’écran 2022-11-05 à 19.28.47.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

Hi,

 

I made an Object Style on the logo. (Screenshot 1)

When I copied and pasted it, I have two issues. (Screenshot 2)

 

1.

Logo is not visible, unlike seen in Links panel.

2.

In Links panel, the paseted object is on page 3.

It's still on page 2.

 

Hosun

 

Screenshot 1

Screenshot 2022-11-07 at 2.01.56 AM.png

 

Screeshot 2

Screenshot 2022-11-07 at 2.02.55 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

1.

Logo is not visible, unlike seen in Links panel.

2.

In Links panel, the paseted object is on page 3.

It's still on page 2.

Yes, that's weird, and I don't understand why you do not see the logo.

But as @Bill Silbert wrote, the best option for you would be to build a parent page with the frame at the position you need.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

While this certainly seems to work in the specific case (for any specific object for which you define the style and which you would like to paste probably multiple times), it seems impractical and cumbersome for the general case (select any random object, or multiple objects). Do you want to stop and create an object style every time you pick an object with a new coordinate? And it appears in my testing that it cannot be used to create a single object style for multiple objects selected together, which is a frequent use case in my work where I do multiple variations of a design in a single working file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

Thank you very much for your reply.

 

At the current stage, my focus is on the functions and features of Id, rather than Object Style.

 

Do you have an answer to my two issues?

 

Hosun

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

I think Rob's script is probably a good solution, and if, as Bill Slbert surmises, you are making multiple layouts with the same logo in the same position, putting it on the Parent Page makes a lot of sense (and I do that in my work, too, when I realize there will be more than two iterations of a design).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

I think this is a long-standing problem (it was that way back in CS6). Paste in place only seems to recognize you've changed pages when you are on a different spread.

I tried jmlevy's object style method and it doesn't seem to work here...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Sorry Peter, I should have checked before posting, I’ve never noticed the problem. Seems like we could script a fix, I’ll check

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

I tried jmlevy's object style method and it doesn't seem to work here...

@Peter Spier I just double checked and it works for me (using 2022 version)

What I did:

  • created an object on page 2
  • created an object style defining the x and y position of this object
  • copied this object and pasting it on page 3, then applying the object style

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

Ah, OK. I was still trying to use Paste in Place.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Rather than Paste in Place why not put the logo into position on a Parent (aka Master) page since it looks like you are using the same layout on both pages?

Other than that you might want to log this in as a feature request at https://www.adobe.com/products/wishform.html.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

it is pasted on page 2.

 

 

Hi @Hosun26059267k946 , Looking at your screen capture Paste in Place is pasting the selected object on Page 3, which is the active page in your Pages panel. Your pages have a Landscape Orientation:

 

Screenshot 2022-11-06 at 3.09.59 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Rob, I tried this earlier today copying an object from page 2 and trying to paste in place on page 3. No success, even being sure the rulers were set per page.

If you select page 3 in the pages panel it seems that InDesign sees the entire spread as a unit, highlighting the numbers for both pages even though only one is highlighted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Yes, I should have double-checked before posting. At first I also thought it was because the Ruler Origin needed to be set, but the Paste In Place menu item seems to always treat the Ruler Origin as Spreads.

 

The script should work, but I needed to include a dropdown dialog for the destination page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2022 Nov 05, 2022

Copy link to clipboard

Copied

Hi @Hosun26059267k946 , If @jmlevy ’s Object Style doesn’t work for you, the bug can sort of be fixed via a script with a dialog for selecting the page:

 

 

 

 

//Paste in Place fix

makeDialog();
pg;
function makeDialog(){
    var d = app.dialogs.add({name:"Choose a Page for Paste In Place", canCancel:true});
    with(d.dialogColumns.add()){
        pg = dropdowns.add({stringList:getPresets(app.activeDocument.pages), selectedIndex:0, minWidth:120});
    }
    if(d.show() == true){
        pg = app.activeDocument.pages.item(pg.selectedIndex);
        main();
        d.destroy();
	}
}

function main(){
    var or = app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
    var s = app.selection[0];
    if (app.selection.length > 0) {
        s.duplicate(pg)
    } else {
        alert("Please Make a Selection")
        return
    }
    app.activeDocument.viewPreferences.rulerOrigin = or;
}


 function getPresets(p){
    var a = new Array;
    for(var i = 0; i < p.length; i++){
        a.push(p.item(i).name);
    }
    return a
} 

 

 

 

 

Compiled version here:

https://shared-assets.adobe.com/link/8dd50b23-49ad-4c00-6d62-44d4e66ff3ef

 

 

Dialog with a selected item:

 

Screen Shot 15.png

 

After run:

Screen Shot 16.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

This version might be better, there’s no dialog—it listens for a page selection in the Pages panel then Pastes In Place on that page. Select the object you want to paste in place, run the script, and double-click the target page in the Pages panel.  You can give the script a key command

 

 

 

 

 

//Paste In Place to destination page
//Select a page item, run script, and double-click a page in the Pages panel

#targetengine "pasteinplace";

PasteInPlace()
var el, b;
var or = app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN; 
function PasteInPlace(){
    if (app.selection.length > 0) {
        var doc = app.activeDocument;
        var s = doc.selection[0];
        b = s.geometricBounds;
        app.copy()
        var el = app.addEventListener("afterAttributeChanged", getBounds);
        el.name = "PIP"
    } else {
        alert("Please Make a Selection")
        return
    } 
} 


function getBounds(e) {
    if (e.attributeValue.constructor.name === 'Page') {    
        app.menuActions.itemByID(118788).invoke();
        app.paste();
        app.selection[0].geometricBounds = b;
        app.eventListeners.itemByName("PIP").remove();
        app.activeDocument.viewPreferences.rulerOrigin = or;
    }
} 

 

 

 

 

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

I'm sorry, but am I the only one who knows that ? 😄

 

Function Duplicate([To], [By]) As PageItem
Member of InDesign.Rectangle
Duplicates the Rectangle at the specified location or offset.
Return value: The duplicated Rectangle.
To: The location of the new Rectangle, specified in coordinates in the format [x, y]. Type: Array of 2 Units (Doubles or Strings), Spread, Page or Layer.
By: Amount by which to offset the new Rectangle from the original Rectangle's position. Type: Array of 2 Units (Doubles or Strings)

 

So ... tested in VB and JS:

 

Set myInDi = CreateObject("InDesign.Application")
Set myDoc = myInDi.ActiveDocument
Call myInDi.Selection.Item(1).Duplicate(myDoc.Pages.Item(3))

 

 

main();
function main()
{
  var doc = app.activeDocument;
  doc.selection[0].duplicate(doc.pages[4]);
};

 

(page numbers are just examples and don't corelate with example screens below)

 

have the same effect - it will create a copy in EXACTLY the same location from the TopLeft corner of the page:

 

RobertTkaczyk_3-1667772163310.png

 

RobertTkaczyk_2-1667772120063.png

 

 

For some reason - move also accepts Spread, Page, Layer as a destination - but object is moved to the TopLeft corner of the page - so looks like a bug ?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

Hi @Robert Tkaczyk , The Paste In Place menu item is supposed to paste the copied object on the currently active page in the same spot as the original. But, if you test it is not doing that—it’s pasting the object in the same spread (not page) position.

 

@Hosun26059267k946 is trying to replicate the position on the opposite righthand page, but you might also want to paste it on an active right hand page on a different spread, e.g. page 9. That’s what the listener in my 2nd script is doing— it’s listening for the activated page for the paste.

 

Make a selection, run the script, and double-click the destination page in the Pages panel.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

To replicate the Paste In Place bug, create an 8 page, Facing Page doc, draw a rectangle in the upper left corner of page 2, double-click page 7 in the Pages panel to make it active, choose Edit>Paste In Place. The pasted object will be on page 6 not 7.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

???? 

 

Am I missing something?

 

I'm pretty sure my one-line command have the same effect - without GeometricBounds and the rest - object from the left page is duplicated on the right page and object from the right - on the left ?? And even on a different spreads. 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2022 Nov 06, 2022

Copy link to clipboard

Copied

Am I missing something?

 

A Paste in Place wouldn’t neccessarily be to the opposite page of the spread it should be to the currently active page, which could be to anywhere in the document.

 

If I copy the red rectangle on Page 2 and do a Paste In Place when page 7 is active, the red rectangle should paste onto page 7, but it pastes on to page 6:

 

Screen Shot 27.png

 

 

 

It should be this:

 

Screen Shot 29.png

 

Not sure if the event listener will always work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2022 Nov 07, 2022

Copy link to clipboard

Copied

I'm not arguing about wrong placement - I've just tried to simplify your script??

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2022 Nov 07, 2022

Copy link to clipboard

Copied

Yes, it simpler if all @Hosun26059267k946 wants to do is move a copy to the opposing page.

 

I’m trying to imitate the UI Place in Place to the active page rather than to the active spread, preferably without throwing up a dialog to get the desired destination page. Looks like the listener version still has some problems.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2022 Nov 07, 2022

Copy link to clipboard

Copied

Will try again 😉 

 

Destination can be ANY PAGE. 

 

I'm just suggesting that in your script - instead of copying, reading and storing GeometricBounds, pasting, re-applying / calculating finall location - you will just use my solution - with current page as a 1st parameter - destination...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines