Pictures and VPE Document Files

<< Click to Display Table of Contents >>

Navigation:  Programming Techniques > VPE Document Files >

Pictures and VPE Document Files

Previous pageReturn to chapter overviewNext page

By default, Pictures are embedded into VPE document files. If you turn the embedding off, paths to picture files are stored as relative paths within VPE document files. This means, the paths are converted to positions relative to the VPE document itself. This technique makes VPE document files better portable, for example to another directory location.

 

Example:

A VPE document is created at c:\projects\docs\mydoc.vpe

The document includes a picture from c:\projects\images\logo.jpg

VPE will convert the image path to a path relative to the position of the VPE document,
i.e. to: ..\images\logo.jpg

This allows to move the VPE document file to a different location, as long as the image is moved to the same relative position (i.e. ..\images\).

A better example would be that the VPE document file is created at:
c:\projects\docs\mydoc.vpe and the picture is located in the same directory, i.e. c:\projects\docs\logo.jpg. In this case the resulting relative path would be logo.jpg

NOTE: A path can only be converted into a relative path, if the picture file and the VPE document file are on the same drive / device. E.g. if a picture is on “c:\tmp\test.jpg” and the document is on “d:\doc\sample.vpe”, no relative path can be constructed!

The file names stored in VPE document files are translated to the specific platform (i.e. correct slash and backslash handling) when reading a document file.

NOTE:When you read one or more VPE document files into the current document using ReadDoc(), and those files have embedded images, you may NOT delete or modify the source document files, while the current document is open! This is, because VPE loads the embedded images directly out of the source document files each time they are not found in the image cache.