Correcting broken image file paths: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Scribus Image Paths ==
== Scribus Image Paths==


I often have problems, where I work with Scribus on Linux where my colleagues use Scribus on Windows. Usually, these are down to the difference in path names to our file server. As Scribus files are XML based its easy to fix broken image paths with a simple text editor, if you know how.
I often have problems, where I work with Scribus on Linux where my colleagues use Scribus on Windows. Usually, these are down to the difference in path names to our file server. As Scribus files are XML based its easy to fix broken image paths with a simple text editor, if you know how.

Latest revision as of 16:35, 25 July 2007

Scribus Image Paths

I often have problems, where I work with Scribus on Linux where my colleagues use Scribus on Windows. Usually, these are down to the difference in path names to our file server. As Scribus files are XML based its easy to fix broken image paths with a simple text editor, if you know how.

Scribus stores where bitmaps are located relative to the Scribus file itself by a relative path, ie ../../../pics/picture1.png This is fine and works well, but if the Scribus file is effectively moved up or down the file structure tree without moving all the accompanying images, the images will lose their links, and will disappear when viewed in the Scribus file.

To fix this you can go into the .sla file and edit the paths to make them right again. But there some unusual control characters which means editing with a normal GUI Text editor such as Gedit or Kedit is problematic (not sure how Windows Notepad or Wordpad fares here). Best to use nano or vi here which doesn't get tripped up.

It's easiest to just have the images located alongside the .sla file, or if you have a lot, in different subfolders below. Look for the image path and name, from the 'Extras/Manage Pictures' menu in Scribus and edit the PFILE path removing the '../../bits ' to leave just the images sub directory name i.e. "images_main/image_of_building1.png". Move your image to the folder you have just specified. No preceding "/" is required in the path otherwise this specifies the root of the file structure, which probably isn't what you want. The method uses the standard Unix/DOS means of addressing files and folders structure so is easy to fathom.

The nice thing about correcting the paths, rather than starting again re-adding your images if they have got 'lost', is that each individual image's attributes when originally placed in the file, its size, offset, whether the image has a frame around it, etc is kept next to the reference to the image. Adding a new image requires all of these attributes adding manually again.

Julian Robbins