Replacing linked image

Hi everybody,
well, after having had to dive into InDesign CS2 plugin development a while ago, there's on most likely rather complicated thing that I haven't yet been able to solve myself. Probably someone here has a tip for me.
So, basically, my plugin opens old QuarkXpress documents in InDesign. These QuarkXpress documents include linked graphic files. Unfortunately, the paths that these graphics link to are no longer valid, and InDesign shows these links as "invalid" in its link panel.
Fortunately, however, if I get such an old link path, I can look into my Oracle tables and determine the new path these links should point to. All this Oracle database access handling is no problem, it's a vital part of my plugin and has been working fine for quite a while. Now, the link "update" thing is the problem. What I would like to do is something like that:
1) Upon opening a document, loop through all invalidly linked graphics.
2) For each invalid graphic, get the link path, give it to one of my Oracle functions, and get a new, valid path back.
3) Update the link in the document to the new, valid path.
Any idea how I'd go about this? The SDK docs - at least until now - couldn't really make this clear to me.
Greetings and thanks in advance,
Nils

Try searching the forums for missing links, IDataLink and ILinksManager I think you should get some clues there.
Ian

Similar Messages

  • Linked Image file path cleanup

    Regex frustrates me, especially with trying to work with slashes... I just haven't got it yet. I'm looking just for a code snippet to thrown in another clean up script I use. To standardize to UNC, as some templates were created on workstaions (also Mac vs PC) that were incositently mapped (i.e. W:/ or X:/ etc.). Blown a day messing with this so far, maybe reaching out for help would work... Thanks in advanced!
    var gDoc = app.activeDocument;
    var gLinks = gDoc.links;
    var gCounter = 0;
         for (var i = gLinks.length-1; i >= 0 ; i--) {
              var currentLink = gLinks[i];
              var oldPath = currentLink.filePath;
              oldPath = oldPath.replace(/:|\\/g, "\/");
    // Intention
    // IF the drive letter W:/ or X:/ is used
    // IF case is \\OHFILE02\Personalization\
    // THEN
    // REPLACE with \\ohfile02\Personalization\ (string replace: would be case sensitive, not just all to lowerCase)
    // ALSO above would be for all linked images as it looks like it's looping through currentLink, is that correct?
    Thanks again!

    I don' t pretend to know all the ins and outs of this, but I've beat my head on the same wall to know that you have to use two slashes to find or replace one. In other words:
    \\ = "\"
    \/  = "/"
    \\\\ = "\\"
    I also know that you can use "/i" in the first part of the replace statement to make it case insensitive. "/gi" makes it global and case insenstive so:
    oldpath.replace(/\\\\ohfile02\\Personalization\\/gi,"whatever")
    should catch all variations of upper and lowercase, so you end up with "whatever\Personalization\"
    As for the replace string, I think that what you type is what you get.

  • Finding linked images

    Hi,
    I'm using InDesign CS 5.5 and I want to quickly find where my linked images are located in order to be able to easily replace them with another one.
    To do this, I use the links palette menu and the "lock-symbol". When doing so, the Search Window opens and InDesign automatically takes me to the folder where the image is saved.
    However, in InDesign CS4 InDesign used to take me automatically to the linked image, whereas now it only takes me to the folder in which the image is saved and I have to scroll through it to find the linked image.
    Does anyone know how to get this same function in CS 5?

    hauer-heinrich wrote:
    Hi Peter,
    thanks for your answer, I´m just not sure what open button do you mean?
    Once you've said Relink, a regular file open dialog opens for you to choose the file to relink. If you just click the Open button in that dialog it chooses the filename of the link you selected in ID, if it is present.

  • Replacing all image types in a book TIF - PNG

    We recently have changed from using TIF's to PNG's we did some tests and found that was a better solution for us. I wanted to know if there was any trick or fix that FM could do so that when I open a chapter and the image reference comes up missing because of this file type change if I could actually not have to sit there for 5 hours pointing to each image that has the same name but now uses PNG rather than TIF.
    There is also the issue of moving files that has always made me frustrated with FM. If I reference multiple folders for images I should only have to point to the folder once, but FM seems to see the files in order that they are listed so it won't replace referenced images from an older folder and associate all of those files from the missing folder to the new folder you point to when you "show it the reference".
    The other half of this problem is replacing references to images used multiple times. If you tell the file that IMAGE1.tif is now newIMAGE1.png why is it that I have to do that for each time that image appears. It's not like FrameMaker shows me what the reference is so I have no idea where it's used.
    I used to use BookUtils but this doesn't seem to be supported anymore.

    Just wanted to say that all my images are PNG and I have been using FM8; then, I downloaded the trial version of FM9, and FM9 pops-up windows of "missing files" to all my PNG grahics that I had initially created and linked to my FM8 documents. I then have to locate each and every file that I have saved in various locations on my network. Also, If I save a document with a new file name, in a different area on my network, the links to the files are broken and the "missing file" links pop-up in both FM8 and FM9. I don't know another way of locating and re-linking the PNG graphics to the new file paths other than to locate each one individually. It's costing me a lot of time to re-link graphics and I have many graphics and documents. Any suggestions? Demi

  • How do I change the user linked image

    In the user profile there is a specified "linked" image. In my case it is the image that was created when my user ID was first established. I'd love to change it to a better image because evidently it gets linked with my messages etc.  I'm running Yosemite (OS 10.10.1) on a relatively new iMac

    Niel
    That is precisely what I'd like to do but I cannot figure out how to do it. When I select the "linked" tab a little window with a matrix of squares appears. One (upper left) has the offending image. It can be "edited" but that seems limited to changing the brightness, zoom or something with a slider bar below. I can't delete it or replace it. I can't figure out how to populate the other empty square with images (I'm only guessing that is what they are there for). I tried drag-and-drop and copy paste without any evident action happening. I'm trying to do exactly what you advise, but I'm lost.

  • AI CS3 "link images with transparency" issue

    i created .AI file with CS2 everything works perfectly.
    when the file opened with AI CS3 some link images (.PSD files with image transparency) not appear
    and gives me a error saying it cannot find or link the images.
    when i replace with new link or i ignore it, still can't display the missing images
    but if i opened the file with AI CS5 everything okay
    how to solve this problem ?
    is there any patchs for AI CS3 ??
    NEED HELP

    Open it in CS5 and do a save as to overwrite the older file
    or save it from CS 5 as a CS 3 file.
    Then try to open it in CS 3

  • Can you replace existing images in Captivate 7 the way you can when using InDesign?

    Can you replace existing images in Captivate 7 the way you can when using InDesign? I need to replace some images but wondering if I'll need to reformat, resize, rename for the Advanced Action, etc.

    The work flow is a bit more complicated than in InDesign (keeps only a link to the image as you know in the frame). I understand the problem with the advanced/shared action references. This is my work flow, maybe someone else has an easier, shorter one:
    Right-click on the image and use 'Find in Library' or use CTRL-ALT-F if it works on your keyboard (doesn't on my AZERTY one)
    In the Library use the right-click menu to open the Properties or double-click the name of the image
    In that dialog box, choose 'Import' and choose your new image; for some reason you cannot choose from the Library however, which I find really sad because I'm used to import all assets to the Library.
    Drawback: if the new image has not the same width/height ratio, it will adapt to the original size of the image, you can use Edit image to repair. You'll keep the name of the image, you don't have to change advanced/shared actions.

  • Replace new image into existing project

    I need to replace a image that I used in a transition. This image will fly in from the side from my start page to my main page.
    I originally made everything the way I wanted then duplicated the state then I moved the items to be flown on to the page or faded into the page etc...
    but now the new imported image is only on one state. if I copy the image from the main state and paste the image to the start state and try to make a transition the image only gets a fade in selection in the timeline. Even if I move the image it will still only fade in. I want the image to fly in from the side.
    I think what is happening is that the image is no longer "Linked" between states so it does not know where the graphic starts and where it should end.
    It thinks its 2 different graphics. Is their a better way than to copy and paste state to state to be able to keep the association and create a transition?
    Otherwise I have to redo hours of work just to replace an image ?????
    Please help....

    Hi Curtis,
    Transitions are between the same item (or "instance" to be fancy) when it has different properties (like position, size, opacity, rotation,etc) in different states. When you import an image, you create a new item in the Art Board. If you copy-paste, you create another item.
    If you want the same item to show up in multiple states, right click it and choose "Share to State" and the state you want it to appear in.
    There's also a "Make same in All States" that makes an item have the same appearance in all states that it's present in.
    For your specific case, though, you have transitions already working on an image, so you should just change the image to have a new source. Click the image that had been working before, click the "source" in the Properties Inspector (lower right), and you should have the ability to change where your image is coming from.
    -Bear

  • What's the process to replace an image inside a mask?

    Hi There,
    The new replace image function is a massive time saver but it doesn't seem to work with masked images.
    These images are masked because they're part of an animation so I really need to replace them - not re-import and re-create the animation from scratch.
    If this isn't possible, how do I remove the mask? That way I could just delete the mask, replace the image, then re-mask.
    Any pointers in the right direction would be much appreciated.
    Cheers
    Ben

    The image replace works perfectly with a masked image intact,  only if the two images dimensions are the same.
    However, doing the following gets you 95% of the way with just a final tweak of the mask:
    select the image on the slide
    Format > Copy Animation
    then replace image
    Format > Paste Animation
    Format > Image > Edit Mask

  • New to java: how to replace an image extending a JComponent?

    Hi,
    I'm new to Java and I have a question about Swing:
    I have a class called ActiveImage (entends JComponent, implements     MouseMotionListener, MouseWheelListener) which takes an Image and displays it. It also receives some mouse events for zooming and moving it around. I display it in a JFrame using:
    content = getContentPane();
    content.setLayout(new BorderLayout());
    image = toolkit.getImage (filename);
    ActiveImage activeImage = new ActiveImage(image);
    content.add(activeImage, BorderLayout.CENTER);
    (This code is in a class extending JFrame.)
    This works fine. However, this JFrame also contains a JToolbar with two buttons. Now when I click one of them, I want to replace the image with another one. I've tried removing it and creating a new ActiveImage to add that to content, but that didn't work very well. remove() resulted in a NullPointerException.
    My question: what would be the best way to go about this?
    Many thanks for any help,
    Diederick de Vries

    B.T.W., this is the trace:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at ActiveImage.ActiveImageFrame$1.actionPerformed(ActiveImageFrame.java:60)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
            at java.awt.Component.processMouseEvent(Component.java:5488)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
            at java.awt.Component.processEvent(Component.java:5253)
            at java.awt.Container.processEvent(Container.java:1966)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2024)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
            at java.awt.Container.dispatchEventImpl(Container.java:2010)
            at java.awt.Window.dispatchEventImpl(Window.java:1766)
            at java.awt.Component.dispatchEvent(Component.java:3803)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)Just before this, it says "button clicked". The function that calls the setImage() goes:
    theButton.addActionListener (new ActionListener() {
         public void actionPerformed(ActionEvent ae) {
              System.out.println("button clicked");
              activeImage.setImage(image);
    });Reading the trace, I would think that the exception has something to do with this last code, since it stops there (line 60 is the setImage()). If the setImage() function itself was where the fault was, wouldn't the trace end there?
    I'm really at a loss here ... :-(

  • Can't change a linked image???

    I have a lot left to learn in Dreamweaver but linking images I've done alot, I hope someone can help me on what I'm doing wrong.  The linked image won't let me change links.  Here is the home page http://kmmcement.com/.  The bottom right picture under click to view slideshow is linked to slideshow.html.  I changed the slideshow and named the new one ss.html.  When I right click the picture and choose Change Link and select my new ss.html, it does not change it in the code.  I tried manually to change it in the code and publish, but the new page won't load up (although when I preview the page, it loads fine.)
    The only thing I've done differently on this site is that I finally learned to get the bottom navigation links to work without looking jumpy and jittery when clicking or rolling over them, by going to Modify - Page Properties and choosing links and set them up there (basic that I should've learned awhile ago).  I didn't do the navigation bar until last, so would that have anything to do with not being able to change the link?  If so, then how can I change it to where only the bottom navigation has it's own style as I'm sure there's going to be alot more links I'm going to be adding.
    Thank you in advance for any help. (By the way, I'm using Dreamweaver CS3)

    Starting on line 215 of your code, you have this:
    <tr>
    <td height="338"><div align="center">
    <p class="style11">CLICK TO VIEW SLIDESHOW!</p>
    <p><a href="slideshow.html"><img
    src="images/slideshowpic.JPG" width="347" height="223"
    border="0"/></a></p>
    </div>
    </td>
    </tr>
    Try changing it to this:
    <tr>
    <td height="338" style="text-align:center">
    <p class="style11"><a href="ss.html">CLICK TO VIEW SLIDESHOW!</a></p>
    <p><a href="ss.html"><img src="images/slideshowpic.JPG" width="347" height="223" border="0"/></a></p>
    </td>
    </tr>
    Save.  Upload page to server along with ss.html page.  Hit refresh in your browser.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • How Can I replace an image and save the same size as the previous?

    I want to replace an image in a PDF, but I would like to keep the same size, and location as the previous. I have tried to to it, but the new image takes a different size.
    This is a PDF exported from an InDesign template.

    Thank you.
    The problem is that the person to edit the PDF doesn´t have ID and doesn't know how to use it.
    The idea is that the design department create very sharp ID templates for people from other departments of the company only have to replace information (text and image).
    We are looking for a program to edit PDF files and function as templates forreplacement information.

  • Linked image question

    I create a monthly newsletter using InDesign CS3 (5.0.4) on a Dell Inspiron 6000 with a 1.5 GHz Pentium M processor, 2 GB of RAM and Win XP/SP3.
    I collect information from various sources, some of which are Micorsoft Word documents with graphics, and I rarely have access to the separate graphic files.  I have MS Word 2002 SP3.
    I can Copy the graphics from Word into InDesign (when I right click on these images in Word, I do not have the Save Image As option).  However, when I do so, the image is not linked, it is embedded, whatever the size of the image (and despite the Help file statement regarding images under/over 48 kB).
    The problem I encounter is when I try to export (Cross Media Export/XHTML Dreamweaver) a specific newsletter article (Export/Selection), including those embedded graphics (I also create an web version of the newsletter), I receive a message that "...only linked images are exported."  I want to export the article including the graphics.
    After searching through the InDesign Help file, I found info that says to choose Window/Automation/Data Merge/Content Placement Options/Link Images to link and not embed images.  This I have done.
    After searching this forum, I found a posting that says Copy/Paste does not preserve links(from any application except another ID file).
    In the ID Help file is a statement that the Links panel can be used to change the status (linked or embedded) of a graphic.  However, when I open the Links panel after pasting an image into a frame, the only choices are Copy Links and Sort.  I concluded that the limited choices are a result of the lack of a separate graphics file.  Correct?
    I can Paste the image into InDesign, Export it as a JPG (to create a separate graphics file), delete the Pasted image from the ID file, and then Place the JPG file into the ID file.  That creates a linked image, which is included with the selected exported newsletter article.
    Is there a better (simpler) way to accomplish this task?

    There are a number of ways to get graphics out of Word/Powerpoint/Excel, but copy/paste into Indesign is the worst, mainly because you get only screen resolution.
    1) Place the Word file. You'll get embedded graphics again (most of them at least), but there's nothing to stop you from unembedding them (through the Links panel), and you'll get full resolution images, not screen previews.
    2) Print the Word file to PDF and then Place pages of the PDF.
    3) Save the Word file to a web page (as mentioned by Jay and Jeffrey in this thread).
    4) Open the Word file in OpenOffice, save in OO's native format, change the extension to .zip, and unzip the file (where you'll find your graphics in separate files).
    5) My personal favorite: Copy out of Word and paste into Illustrator or Photoshop. Michael mentioned Photoshop too, but it's important to use the right program depending on the content. If you have a bitmap (a photo, scan, or screen capture), paste it into Photoshop. If you have a vector graphic (a drawing consisting of lines and shapes, like a graph) or a combination of vector and bitmap, paste it into Illustrator. The reason this is my favorite is because it gives me a chance to fix the graphic. If nothing else, everything from Word comes in as RGB, but I also usually need to change the typeface and size the graphic appropriately.
    Ken Benson

  • CS3 - Design View not showing externally linked images

    In CS3 Design View, externally linked images are not showing
    up... i am only getting the place holder.
    To prempt some questions:
    1/ Links are correct and complete - apart from the fact that
    they show up when previewing in the browser(s) - i have
    crosschecked
    2/ There are no spaces in the url
    3/ In the 'View' menu, 'Display External Files' is checked
    I had this problem before and escargo suggested saving and
    rebooting. It worked then but strangely, today, that file is again
    showing some of the externally linked images but not all. And on a
    new file, created today, none of the externally linked images are
    showing up... :(
    I'm sure there's a simple solution to the problem... anyone
    have any idea what it could be?
    Thanks and cheers,
    JJ

    Nope. Some show - some don't.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "jhabrix" <[email protected]> wrote in
    message
    news:faom5n$9ku$[email protected]..
    > Bump....
    >
    > Anyone have a solution to the above problem???

  • Outlook not seeing link images

    Hello All and Happy Friday (the 13th buwahaha)
    OK, issue
    Outlook 2010 and 2013 (Exchange Accounts)
    Users get emails html formatted.  Outlook displays the red x with the message "The linked image cannot be displayed.  The file may have been moved, renamed, or deleted. etc..."
    However, OWA displays it properly, so do the phones.
    This leads me to believe it is proxy related.  Now my problem comes in with the knowledge that we are using a Cisco IronPort as our proxy, we don't even configure the browsers for it...  Just catches it.
    I've tried every fix I can find and none have resolved the issue.
    Any ideas?
    Thanks

    Hi,
    I actually found a kb about this issue:
    Images in email message disply a "red x" instead of the image if the Cache value in the registry is incorrectly configured
    This problem occurs if there is incorrect registry data for the Cache
    value under the following registry key.
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
    Important
    Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it,
    back up the registry for restoration in
    case problems occur.
    To resolve this problem, use the following steps to manually edit the data for the Cache value in the registry.
    Exit Outlook if it is running.
    Start Registry Editor.
    Windows 8
    On the Desktop, press the Windows key + X and click
    Run . Type regedit in the Open box, and then press ENTER
    Windows 7 or Windows Vista
    Click Start , type regedit in the Start Search
    box, and then press ENTER.
    If you are prompted for an administrator password or for confirmation, type the password, or click
    Allow
    Windows XP
    Click Start , click Run , type regedit
    , and then click OK.
    Locate and then select the following key in the registry.
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
    Update the Cache value to the default value according to your version of Windows.
    Windows 8, Windows 7, or Windows Vista
    Name: Cache
    Type: REG_EXPAND_SZ
    Data: %USERPROFILE%\AppData\Local\Microsoft\Windows\Temporary Internet Files
    Windows XP
    Name: Cache
    Type: REG_EXPAND_SZ
    Data: %USERPROFILE%\Local Settings\Temporary Internet Files
    Close Registry Editor.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

Maybe you are looking for

  • How long does it take to create a recovery disc?

    Hi!!! I have just bought a Toshiba Portege T110. I tried the first time round and cancelled at disc 4 bec i was out of writeable disc. Today i am on my 2nd try.  I have mgt disc 1-3.  When at disc 4~~it says is creating Windon Recovery Environment (6

  • WIndows Server 2012 w/ Hyper V and Windows 7

    I have been able to create every imaginable virtualization in a test environment except for Windows 7. It asks for drivers. I have a driver CD but when I put the CD in the D: drive. It will run but suddenly the command line screen states that a file

  • How can anyone add to a SharePoint list but only some can edit all fields?

    My office has a list on our SharePoint for product requests. We were trying to make it so that the "+Add Item" link was available to all who want to request a map but only specific fields such as Name or Description would be editable on their end. On

  • How to clear all eventcombMT lockout tool settings?

    We have an eventcombt user that cannot get any results returned when running the tool from their workstation after a name and Windows account change.  It works for other accounts with the same security memberships. We need to clear all the saved even

  • WM: Transfer Requirements with just one item

    Hi experts, does anybody know if it is possible to customize WM in order to create just one item per transfer requirement. My problem is that in material staging from PP, I have customized creation of transfer requirements on order release. If OF con