Re-Linking Images
Re-Linking Images
Hi,
I've successfully edit a book on OO Writer http://wndw.net.
This book has more than 200 linked pictures.
Now a translation of the book is expected to be released very soon.
I've got the .odt file but the translator (who is currently out of my reach) copied the book out of its original folder, on his external HD.
Obviously I cannot see the images on my document, because the path is pointing to another environment.
I would like to know if it is possible to avoid a manual re-link (EDIT>Links) of the pictures, i.e.
create a script to change the images path.
Thanks,
Paolo
Mac OSX 10.7.5
OO 4.0.0
I've successfully edit a book on OO Writer http://wndw.net.
This book has more than 200 linked pictures.
Now a translation of the book is expected to be released very soon.
I've got the .odt file but the translator (who is currently out of my reach) copied the book out of its original folder, on his external HD.
Obviously I cannot see the images on my document, because the path is pointing to another environment.
I would like to know if it is possible to avoid a manual re-link (EDIT>Links) of the pictures, i.e.
create a script to change the images path.
Thanks,
Paolo
Mac OSX 10.7.5
OO 4.0.0
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
As long as the Writer document and the images maintain the same relative locations, the links should work automatically, even if they're all moved to a different location.
AOO4/LO5 • Linux • Fedora 23
Re: Re-Linking Images
Thanks for prompt reply!
Unfortunately I'm not getting the images, I presume because path differs, as you can see from the screen shots… Is there any alternative to re-linking manually each picture?
Unfortunately I'm not getting the images, I presume because path differs, as you can see from the screen shots… Is there any alternative to re-linking manually each picture?
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
You can't always tell by looking at the path that OO displays. OO always shows the full, absolute path, but that isn't what it uses internally. All linked files are maintained through a path relative to the location of the parent document.
As long as the final elements of the path are the same, OO should be able to resolve the links.
In the case of the two links you've shown, they're completely different, but I don't know if they're links to the same image or not.
As long as the final elements of the path are the same, OO should be able to resolve the links.
In the case of the two links you've shown, they're completely different, but I don't know if they're links to the same image or not.
AOO4/LO5 • Linux • Fedora 23
Re: Re-Linking Images
acknak wrote:You can't always tell by looking at the path that OO displays.
Is there a way to check the relative path?OO always shows the full, absolute path, but that isn't what it uses internally. All linked files are maintained through a path relative to the location of the parent document.
One path has been truncated by the snapshot, but actually both are links to the same image. Images are in the same text file folder, but still the are not loaded...As long as the final elements of the path are the same, OO should be able to resolve the links.
In the case of the two links you've shown, they're completely different, but I don't know if they're links to the same image or not.
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
There's no way (that I know of to check the relative path, other than to look at the trailing element(s) of the path.
I just tested again with a linked image in a Writer document: it works perfectly as long as the two files are in the same relative locations.
The simplest arrangement is to put all the images for a document in the same folder/directory/location as the document. If there are many such images, then you may want to collect them all in a folder in the same location. Then, if you move the image files (or the image folder with the images) along with the document to some other computer or location, the links should still work.
I do notice that your example includes a "funny" character: #, shown as %23 in the path.
I wonder if that could cause a problem? It doesn't seem to here, but other systems/situations may give different results.
It might be helpful if you could copy/paste the full text from one or two of your linked images. Right-click on the image > Picture > Picture should display the entire path which you can copy/paste here. Do that for the document in the original situation and for the document after it's moved and paste the alternative paths here so we can see what you're dealing with.
I just tested again with a linked image in a Writer document: it works perfectly as long as the two files are in the same relative locations.
The simplest arrangement is to put all the images for a document in the same folder/directory/location as the document. If there are many such images, then you may want to collect them all in a folder in the same location. Then, if you move the image files (or the image folder with the images) along with the document to some other computer or location, the links should still work.
I do notice that your example includes a "funny" character: #, shown as %23 in the path.
I wonder if that could cause a problem? It doesn't seem to here, but other systems/situations may give different results.
It might be helpful if you could copy/paste the full text from one or two of your linked images. Right-click on the image > Picture > Picture should display the entire path which you can copy/paste here. Do that for the document in the original situation and for the document after it's moved and paste the alternative paths here so we can see what you're dealing with.
AOO4/LO5 • Linux • Fedora 23
Re: Re-Linking Images
Here:
original
file:///Users/atzorman/Desktop/WNDW/WNDW_master/WNDW_master/cc-by-sa.png translation
file:///Users/atzorman/Desktop/Volumes/NO NAME/WNDW_Master%231.421/cc-by-sa.png
original
file:///Users/atzorman/Desktop/WNDW/WNDW_master/WNDW_master/cc-by-sa.png translation
file:///Users/atzorman/Desktop/Volumes/NO NAME/WNDW_Master%231.421/cc-by-sa.png
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
Right. So it looks like the document and the image are not in the same relative locations.
What is the location of the original document? Is it in the same folder as the images?
If your goal is to make a new copy of the document in a different location and have it share the same images, then you're going to be limited in where you can put the new copy and still maintain the relative locations. You may need to copy both the document and all the images to the new location.
Here's an example from the document I tested:
As long as OO Writer can locate the image following the steps:
What is the location of the original document? Is it in the same folder as the images?
If your goal is to make a new copy of the document in a different location and have it share the same images, then you're going to be limited in where you can put the new copy and still maintain the relative locations. You may need to copy both the document and all the images to the new location.
| Edit: PS: |
- (document location) / up one / up one / folder:images / file:CCG_logo.png
AOO4/LO5 • Linux • Fedora 23
Re: Re-Linking Images
Yes. And if I move/copy the folder where I have picture and .odt file it always works. I can open the file on different computer without any problem.acknak wrote:Right. So it looks like the document and the image are not in the same relative locations.
What is the location of the original document? Is it in the same folder as the images?
In this case I sent a copy of the folder to the translator who opened the file loading all images without any problem.
But during his work he moved the folder to an external HD and save there the .odt file of the translation.
I got the whole folder with the translation back from him, but in no way pictures are loaded because as you recon relative paths are not the same.
I'd like to know if it is there any alternative to manually re-link each of the 200 images…
…& thanks for the very clear directory scheme you attached
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
You could open the file using an archive manager, then globally find and replace the paths in question. They should be in content.xml. If doing this please use a copy of the file in case of disaster.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
Re: Re-Linking Images
Thanks, it sounds like the solutionRoryOF wrote:You could open the file using an archive manager, then globally find and replace the paths in question. They should be in content.xml. If doing this please use a copy of the file in case of disaster.
Could you please tell me where I can find the content.xml of my .odt file?
OpenOffice 3.4.1
Mac OS X 10.7.5
Mac OS X 10.7.5
Re: Re-Linking Images
Open the .odt file using an archive manager - depending on the manager you may need to rename it to .zip. In the opened archive you should find content.xml. But please, please make a copy of the .odt file first, as editing contents of such archives can be dangerous. With a copy of the .odt you have a secure fall-back position.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
Re: Re-Linking Images
I agree: editing the xml is the only way I know of to fix the broken links, short of manually changing each image.
If you want some help, let me know. It won't take five minutes and I'd be happy to help. PM me, or use the email link to the right of this message.
If you want some help, let me know. It won't take five minutes and I'd be happy to help. PM me, or use the email link to the right of this message.
AOO4/LO5 • Linux • Fedora 23