• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
InDesign - Copy/Paste image without original file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InDesign - Copy/Paste image without original file


  • Subject: InDesign - Copy/Paste image without original file
  • From: "Gary Bielby" <email@hidden>
  • Date: Thu, 28 May 2009 10:45:03 +0100
  • Thread-topic: InDesign - Copy/Paste image without original file

Hi,

 

Just wondering if anyone can help... l'm trying to copy/paste images from one document to another.

 

I've been doing this my getting the file path of item link of graphic 1 and then doing a place 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 have got it sometimes the original image file doesn't exists so it does not work - what l want to do is 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 without having to have the original image on the local drive

 

 

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.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: address book data without opening app?
  • Next by Date: Re: Scripting for multiple InDesign versions
  • Previous by thread: Re: Scripting for multiple InDesign versions
  • Next by thread: Re: In Design - Copy/Paste image without original file
  • Index(es):
    • Date
    • Thread