[AS] Copy/Paste graphics

Hi,
Just wondering if anyone can help... l'm trying to copy/paste graphics from one document to another.
I've been doing this my getting the file path of item link of graphic 1 and then setting this value to the frame on the other document - then setting the offset etc to move it to the correct place - which works great. (see below code)
The problem l've got it sometimes the original graphic file doesn't exists so it does not work - what l want to do is then copy the 'preview' image you see on the document and paste that in the box on the other document - just like a normal copy/paste
Any ideas on a nice way of doing this?
This is my current copy/paste methods l talked about:
on copyItem(boxName)
     try
     tell application "Adobe InDesign CS3"
          set myCopyDocument to active document
          set proceed to false
          tell myCopyDocument
               set theSelection to graphic 1 of page item boxName
               set theTarget to parent of theSelection
               set FilePathOfImage to file path of item link of graphic 1 of theTarget
               set {a, b, c, d} to geometric bounds of theSelection
               set {w, x, y, z} to geometric bounds of theTarget
               set xOff to a - w
               set yOff to b - x
          end tell
          return {true, FilePathOfImage, xOff, yOff}
     end tell
     on error msg
          display dialog "Can not copy original image: " & msg
          return {false, "", 0, 0}
     end try
end copyItem
on pasteItem(boxName, FilePathOfImage, xOff, yOff)
     tell application "Adobe InDesign CS3"
      try
          tell myPasteDocument
               set myImage to place FilePathOfImage on page item boxName
               set {a, b, c, d} to geometric bounds of myImage
               set geometric bounds of myImage to {a + xOff, b + yOff, c + xOff, d + yOff}
          end tell   
     on error msg
          display dialog "Can not place original image: " & msg
     end try
     end tell
end pasteItem
Regards, Gary.

Worked out a way of doing it with the following:
property myDocuments : {}
set boxName to "pic1"
tell application "Adobe InDesign CS3"
    -- Source
    set MyRectangles to page item boxName of document 1
    set MyRectangle to item 1 of MyRectangles
    set thePage to parent of MyRectangle
    set thePageNumber to name of thePage
    -- Target
    set MyTargetRectangles to page item boxName of document 2
    set MyTargetRectangle to item 1 of MyTargetRectangles
    set theTargetPage to parent of MyTargetRectangle
    set theTargetPageNumber to name of theTargetPage
    set {y, x, l, h} to geometric bounds of MyTargetRectangle
    -- Duplicate onto document 2
    set MyTargetRectangleCopy to duplicate MyRectangle to page theTargetPageNumber of document 2
    -- Delete old target
    delete MyTargetRectangle
    -- Move new target to old targets place
    move MyTargetRectangleCopy to {x, y}
end tell

Similar Messages

  • Copy/Paste graphic w/drop shadow to indesign - loses transparency

    See above image.. I made a vector version of our company logo in illustrator (all programs referenced are cs5 btw) and it looks great, but when I copy and paste from Illustrator to InDesign, it loses the transparency around the logo. If I place the logo instead, it works fine. The trouble is there are about 16 variations of the logo, and its MUCH easier to copy/paste from one aggregate file instead of having many different logo files to place.
    Background on how the logo was created: The inner circle area is multiple different gradient layers (some with transparency masks as well). The white line around the outside is an expanded stroke, and it had a drop shadow effect applied (Stylize menu), which I expanded so it would scale properly when scaling the logo up and down. Here is a link to download the logo: download logo
    Q: Is there any way to make InDesign preserve the transparency when I copy and paste?
    Would be eternally grateful if someone has a solution that allows me to copy/paste!

    I agree with Bob's suggestion to use separate "layer groups" in your logo file for different styles. I also use separate layers inside InDesign to "multi-purpose" company documents with different backgrounds, graphics, and content. But that's the only way I use layers inside InDesign – Not for general placement of image files! I also disagree with ability to copy and paste graphics from Illustrator with drop shadow. Here's an .ai logo which I quickly added Drop Shadow to in Illustrator CS4, and then a Copy and Paste into InDesign CS4 document. Best workflow practice is to 'Place' image files as Bob suggests, linking them from a separate file folder.
    For something "quick and dirty" I see no problem with Copy and Paste, but your success may vary based on OS, and CS versions you are using!  Sometimes it is wiser to take a few shortcuts to hit rather than miss that deadline!

  • Copy/Pasting Graphics

    Does anybody know of a way to make DisplayObject
    InlineGraphicElements copy/pastable? Right now it only works when
    source is an external file.

    Try filling the frame with [Paper], then apply the shadow to the frame.

  • Copy and paste graphics and text in Acrobat 9 Pro

    I'm a new user of Acrobat Pro and am trying to copy a combination of text and graphics from the top half of a page to the blank bottom half of the page. I've not had much success with what I thought would be a simple thing to do and would welcome suggestions. Here's a summary of the options I've tried so far for graphics, text, and both text and graphics.
    A. Graphic Alone:
    1. When I use the Select Object Tool, I can highlight the graphic but when I unclick the left mouse button, the highlighting disappears, so I can't copy the graphic.
    2. When I use theTouchup Object Tool, only an oblong portion of the graphic is highlighted when I click on the object. The only way to highlight all of the graphic is to hold down the shift key and click on successive portions of the graphic until I have highlighted all of it. When I then right-click the mouse, I can copy the graphic. However, when I then place the mouse cursor in the bottom half of the page and do a righ-click paste, the graphic appears to be pasted on top of the original graphic. I can then drag the graphic to the bottom half of the page. I can also paste the object on to a blank page from Create PDF>Blank Page. Overall, this is not elegant nor intuitive, but it does work.
    B. Text Alone:
    1. I can copy the text but when it is pasted, it is not formatted like the orginal, nor can I place it where I want on the bottom half of the page. This is true whenther I use the basic copy function or the Touchup Text Tool.
    2. When I use the Touchup Object Tool and click on the text, Acrobat places similarly-formatted text in a box that I can then right-click and copy. I can then paste the text on a blank page with the text formatted identical to the way it was on the original page. With several blocks of text formatted differently, this procedure could work but would require a lot of work to create a format with placement identical to the original.
    C. Text and Graphics Together
    1. When I use the Touchup Object Tool and attempt to highlight the top half of the page, the Tool insists on including the blank bottom half of the page in its selection. I can copy everything on the page but I haven't found a way to select just the objects in the top half of the page -- I can copy some, but the selected objects aren't highlighted and so this isn't a satisfactory route. It seems obvious to me that Touchup Object should be able to select just the objects I want. But then, even the Select Object Tool doesn't do that, either -- it Selects an object but then you can't do anything with the object.
    2. Using the snapshot tool, I can highlight both graphics and text and copy them -- I can even export them them to another program via the clipboard and create an external file. However -- regardless of whether I just copy and paste, or do a  Touchup Object file import, or whether the file is bitmap or jpg -- when I paste the resulting object or file onto a page in Acrobat, the image always comes out at 200% of its orginal size. I looked for a Resize option, but couldn't find one.
    This is all very time-consuming and frustrating since what I am trying to do is not rocket science. Surely there is a simple way to do this.
    By the way, there are no security restrictions on the file.
    George

    Hi,
    In response to both "...is that normal?" — Yes.
    PDF is not a file format meant to support editing of layout/format/etc or text content creation.
    You'd master content in an authoring application (FrameMaker, InDesign, MS Word, etc.).
    The PDF file is the output of this mastered content.
    Some minor touchups are possible with Acrobat (think whiteout/correction tape on a printed piece of paper -- PDF page content is the electronic "finished paper").
    With that said, you might play with File > Create PDF > From Blank Page and use the Typewriter tool to enter text.
    To output MS Word content to PDF use the Adobe PDFMaker.
    Prior to Word 2007, you'd use "Adobe PDF" on the menu line.
    With Word 2007, you'd use the Acrobat Ribbon features.
    Be well...

  • Copy and paste graphics in Captivate

    HI
    i am trying to copy and paste graphics to a demonstration created in Captivate 5 from a Powerpoint and i am unable to do so, i have to save the graphic as a Jpeg file and they insert it as an image,
    in the past i was able to copy and paste graphics from PP to an existing demo without a problem.
    can anyone tell me if there is something i need to change in the properties to get this resolved?

    Will join others, never trusted the Windows Clipboard for images, certainly not from PPT
    Lilybiri

  • Copy a graphic from java and paste it to WORD

    Hi all,
    Is it possible to copy a graphic from a java applet and paste it in a word document ?
    Any example should be appreciated.
    Thanks ? ;-)
    Olivier

    This is not possible on a generic applet because the browser security does not allow access to the system clip board. This can be done in a Java application or a signed applet.

  • How do you keep strokes, etc, from changing when copying & pasting?

    I am sure there is a simple solution to this problem, but I cannot figure it out and could use some help.  I have a graphic in one InDesign document (ID CS4 - using Windows XP Pro) and when I try to copy and paste it into another ID doc, it completely changes the strokes and fills.  It usually does the opposite of what is in the graphic (this happens with every graphic I try this with).  So if I have a circle that is stroke only, when I copy and paste it, it comes in with no stroke and a fill.  I have to use these graphics between documents frequently and some of them are complicated, making it difficult to spend the time correcting this problem.  When I tried adding the graphic to a library, it did the same thing.  It also changed it when I moved one page to another document.  Anyone have any ideas why this might be happening and how to make it stop? 
    Thanks,
    GS

    Thanks for the reply.  While it wasn't the preferences, I did find a link on the link you included in your answer that led me to the solution.
    The problem was conflicting object styles.  The solution was to load the object style from the doc that included the graphic into the doc that I wanted to place the graphic in.  Then when I copy & paste, the graphic comes in perfectly.  The only problem is if there are other graphics in that doc, but now that I know there is an issue with object styles, I can pay attention to it as I design.
    I can always count on the forum for great answers!
    GS

  • Getting rid of Multiple Spaces in Code View (after Copying/Pasting)

    Hello,
    I'm trying to find a way to get rid of multiple spaces between words in Dreamweaver CS3's code view.
    Oftentimes, when I copy/paste text from elsewhere (e-mail, website, etc), the Dreamweaver code shows up with multiple spaces. Normally, that wouldn't be problem -- except that my blog's auto-tag plug-in doesn't detect selected phrases when there are multiple spaces between words, e.g., it'll detect "Swiss Alps" in a post but not "Swiss  Alps" (notice the extra space between words in the second phrase).
    If at all possible, I'd like to be able to keep Dreamweaver's text formatting option when I copy and paste, as that means I don't need to manually put words in bold/italics.So, is there a way to keep that option while getting rid of all the extra spacing between words?
    By the way, I'm familiar with Wordpress CSS, but not with Dreamweaver CSS. Not sure if there's any difference.
    Any assistance would be much appreciated.

    I make it a point to never paste formatted text into HTML pages.  Formatted text from MS Office usually contains a variety of junk you don't want and I don't have that much faith in MS Word code removal tools.
    Bold and Italics from Word or Outlook should be changed to current HTML tags of <strong> for bold and <em> or emphasis for italics anyway.  Also see Logical Tags here:
    http://www.htmlcodetutorial.com/logical.html
    Find and replace is good for removing whitespace if you know how to do it correctly. Make backup copies just in case things go wrong.  http://www.tjkdesign.com/articles/whitespace.asp
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Why won't copy/paste images appear in PDF (from Word 2007)?

    I find all places in a Word 2007 document where content copied from Power Point 2007 and then pasted into a Word 2007 document does not appear in the subsequent PDF file I generate. White space of the same size as the pasted content appears in its place. Why is this happening and are there any suggestions to work around this issue? What is curious is the free PDF creation tool that you can use to generate a PDF within Word 2007 (by choosing file save-as PDF) does NOT have this same issue. I don't want to use Word's tool since it doesn't allow for the option settings flexibility I need to produce the final PDF.
    I already tried saving the Word file as XML and then re-saving as Word .docx and regenerating the PDF from Acrobat: the graphics are still missing. I also tried in Acrobat Help> Repair Installation and then shut down/restarted my computer. Again, the regenerated PDF is missing the graphics.
    Personally, I do not use a copy/paste method; rather, I use insert>picture>from file or paste special as a grphic file type. I know the same graphics placed this way come out fine in a PDF I generate from Acrobat. However, I support a bunch of engineers who make copy/paste a shortcut habit. I will have no luck telling them not to do this.
    I appreciate any help with this.

    Preferences in Acrobat reader under Page Display are already set to Show Large Images. I assume that is the setting you mentioned.
    I don't know of any setting in Word 2007 that would make a difference. Does anyone else have work around suggestions?

  • Illustrator image copy/paste onto the Indesign the text should automatically converted into image?

    Hi All,
    Is there options to get the image copy & paste into the Indesign, if i done manually the frames and lines stroke, colors, are coming fine, but the text object only converted the image. i want to edit text  in indesign.
    this is possible for scripting or manual?
    regards
    CSM_PHIL

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • Copy & Paste from Illustrator to InDesign CS4

    Hi,
    I am aware that there are issues when copying/pasting from Illustrator to InDesign, in particular:
    http://help.adobe.com/en_US/InDesign/6.0/WSa285fff53dea4f8617383751001ea8cb3f-6bdda.html
    I have the following problems:
    1- I copy and paste text from Illustrator to InDesign on the same platform and some (not all) of the text is converted to outline in InDesign. The same font is available to both applications. Why this behaviour?
    2- I copy and paste objects containing text from Illustrator to InDesign and some of the objects appear to have moved respective positions when pasted into InDesign. Is this to be expected?
    Are there solutions to these problems? Note that if I expand everything in Illustrator prior to copying and pasting into InDesign, none of these issues occur, but everything is obviously in outline form, with the limitations it entails.
    My clipboard settings are as indicated in the link above, but I have tried other settings with no more luck.
    (Important: Before pasting a graphic, make sure that Illustrator is configured to copy as AICB (see Illustrator Help). In InDesign, make sure that Prefer PDF When Pasting isn’t selected in the Clipboard Handling preferences. If these options aren’t set properly, the Illustrator graphic cannot be edited in InDesign.)
    It is not practical for me to create an Illustrator file for each of the Illustrator graphics and import those files via Place into InDesign. I must use Copy/Paste.
    I use CS4.
    Thanks.

    You can copy/paste from Illy to ID by selecting the text with the type tool in Illy and then pasting it into ID. You will not be able to maintain the formatting. If you want to maintain the appearance the text will be converted to outlines.
    If you need to get anything other than very simple objects from Illy to ID then you should save as AI and use the file > place command to place those objects as linked graphics into ID.
    Your closing statement is irrelevant. Whether you like it or not, this is the way it is.
    Bob

  • Undo/Redo for Cut, Copy, Paste

    I am trying to implement Undo/Redo for Cut,Copy,Paste in a Treetable.
    I have to support undo/redo for multiple nodes being cut/copied. I am not sure how I should be going about implementing this. Any help will be greatly appreciated.
    Thanks

    If the class you are using doesn't support cut, copy, and paste already, usually what you do is store a list of actions in two lists. One for actions done, the other for redos (when there is an undo). Capture the data before and after each operation (you can create a KeyListener to listen for the events) and store that in a list. When undo is called, the last element on the list should be undone, either by taking it out of the list and reiterating through the elements still there, or implementing an undo method in the object you are trying to change. Then put that element on the redo list in case that is called. This works well with graphics and stuff, but I never tried to implement it in a tree with nodes and stuff, so that's about the most I can help with right now. I hope it helps some!
    -JBoeing

  • Copy Paste Attributes

    First off - I will admit I am a FCP editor who is figuring out Motion in fits and starts. Basically what I am building is a bullet point graphic of 5 list items where it starts with all 5 visible, fully opaque, and after a couple seconds, 4 lines dim to 10 percent opacity and the 5th line grows larger and moves to the center. I built the first version of this, keyframing all the opacity and move/grows. I then save the project and rename it "2nd line move." What I want to do is be able to copy the attributes from the one line that grows and moves ("1st line move") to the new, renamed project. In FCP I use copy/paste attributes for situations like this. I can't seem to figure out how to do it in Motion, without pretty much creating new keyframes on each version of the same graphic.
    What am I missing?
    Thanks,
    Steve

    hi,
    a simple way is to click on the object you have animated, and then simply to click and hold on the position parameter name in the inspector and drag it to the object you want to copy the animation too.
    You can do this for the scale parameter as well.
    hth
    adam

  • Copy-paste iTunes CD insert to Pages

    How to copy-paste an iTunes CD insert to Pages, allowing for changing font (size), adding graphics, and so on?

    Yes, I used the object select button.  I've had some other issues and
    think that the problem is that there isn't enough memory on my computer.
    I've asked IT to increase that, hoping that will help.
    Thank you.

  • Image selection,cut,copy,paste

    Hi,
    I need to select a portion of the graphics thats been drawn on a panel,
    cut this image,copy and paste it on any part of the panel. I have tried using clipRect but am not sure whether this will work.
    Please help me doing the cut,copy,paste of these images. It would be nice to have a sample code.
    Arpana

    Since your question is to learn and understand how Illustrator works, I would answer it with no. Unlike other programs, Illustrator can't cut parts of raster images because it is mostly vector graphics editing program. It is possible to end up with a rectangular shape of a cut raster images using the method Jacob described but technically behind the scenes it is not cutting the raster image as other raster programs like Photoshop do but it is generating a new image from the old one by a capability in Illustrator called rasterizing. Illustrator can rasterize (regenerate a new raster image) from any selection of objects - vector, raster, and both at a specified resolution using commands like Rasterize and Flatten Transparency. You can think of it as automating the process of exporting to a raster file format and placing it back in Illustrator.
    For that reason, I would recommend to cut raster images in other programs like Photoshop and place them in the desired size in Illustrator or use clipping paths and Opacity masks to hide unwanted parts  when this is preferable for flexibility or if you find it faster and less hassle than cutting the placed image outside of Illustrator.

Maybe you are looking for