Picture

<< Click to Display Table of Contents >>

Navigation:  Picture Functions >

Picture

Previous pageReturn to chapter overviewNext page

Inserts a picture object into the document. For supported file formats, please see the chapter "Pictures" in the Programmer's Manual.

method VpeCoord VPE.Picture(

VpeCoord Left,

VpeCoord Top,

VpeCoord Right,

VpeCoord Bottom,

string FileName

)

VpeCoord Left, Top, Right, Bottom

position and dimensions

Dimensions: if Right is VFREE, it is computed automatically; if Bottom is VFREE, it is computed automatically. Computations are performed based on the size of the image in pixels and its resolution information in DPI (see also the properties PictureKeepAspect and PictureBestFit).

string FileName

The name of the file that shall be imported. VPE determines the file-type by the suffix (i.e. ".TIF" = TIFF, etc.) or by analyzing the file header - a full path is optional (see also: PictureType)

Returns:

the bottom coordinate of the inserted image

Remarks:

In case of an error, LastError is set.

 

The frame drawn around images can be made invisible by setting the PenSize to zero before importing the image.

 

We recommend to use the methods Picture() and PictureStream() only.

This guarantees platform independence.

 

VPE offers several methods to attach an object's position to margins and relative to the position of previously inserted objects. In addition Text, Rich Text and Picture objects are able to compute their dimensions automatically depending on their visual content.
For details please see "Dynamic Positioning" in the Programmer's Manual.

 

Example:

ActiveX / VCL:

Doc.Picture(1, 1, VFREE, VFREE, "test.tif")

 

.NET:

Doc.Picture(1, 1, Doc.nFree, Doc.nFree, "test.tif")

 

See also:

"Pictures" in the Programmer's Manual