GetEmbeddedGraphics
Problem
- Old documents or documents provided by third parties may contain embedded graphics.
Whereas it is simple to „break links“ of linked graphics and thus embed them, it is impossible in OpenOffice.org to „re-embed“ graphics and link them.
- Further more graphics can be inserted from different directories. If there are no links available in the document it can be difficult to find them again, f.e. for use in other projects.
Hint: Due to the open xml format of OpenOffice.org you can get the document's graphics from the zip-files. Every document file is in fact a zipped archive containing xml files and folders f.e. of pictures.
It is better only to copy the content of the „pictures“ folder, because the extraction will destroy your document. (Configuration entries inside the document would still reference the removed pictures.) Further more after copying pictures you cannot identify their former position in the document as the files in the „pictures“ folder are named by random numbers.
Solution
The GetEmbeddedGraphics tool picks all embedded graphics out of a document, stores them in a new directory and replaces each embedded graphic with its properly linked copy.
In a second step you can also remove the no longer used „embedded“ graphics with the tool by use of a feature with „unpublished“ status in the OpenOffice.org IDL-Reference. For this reason the function is still commented out in the code until we have enough test results.
Download
Via this download link you get the tool embedded in the test document.
Screenshots of test results
Picking out graphics:

The Graphic is still embedded in the document: no link

The same graphic after using the tool: linked to a new file in a new folder


