Error processing SSI file
LEADTOOLS Leadtools.Documents (Leadtools.Documents assembly)

Show in webframe

SetImage Method






New raster image to use for this page. This value can be null.
Replaces the raster image for this page.
Syntax
public void SetImage( 
   RasterImage image
)
'Declaration
 
Public Sub SetImage( _
   ByVal image As RasterImage _
) 
'Usage
 
Dim instance As DocumentPage
Dim image As RasterImage
 
instance.SetImage(image)
public void setImage(RasterImage image)
            
public:
void SetImage( 
   RasterImage^ image
) 

Parameters

image
New raster image to use for this page. This value can be null.
Remarks

GetImage and GetImage(resolution) are used to get a raster image representation of this page. All document types support this method and it will always return a value object.

SetImage is used to replace the raster image of the page. IsImageModified is used to as flag that indicates that the image of this page has been replaced by the user.

This method works as follows (the "item" is a raster image with the specified resolution):

  1. This method requires that the owner document uses a cache system (Document.HasCache is true), otherwise; an exception will be thrown.

  2. If the value of the IsReadOnly property of Document is true, then the user cannot modify this document and an exception will be thrown.

  3. All previously saved raster image objects for this page are purged from the cache.

  4. image is added to the cache by serializing the RasterImage object. The original object is not disposed and is still owned by the user. If image is null, then a "null" item is added to the cache.

  5. The page Size and Resolution properties are updated to be the same value as the image. If the image set is null, then these values are set to DocumentPages.DefaultPageSize and DocumentPages.DefaultResolution.

GetImage will check the cache first, hence, subsequent calls will return the value set by this method.

The value of IsImageModified will be set to true after this method returns.

Refer to Loading Using LEADTOOLS Documents Library for more information.

Requirements

Target Platforms

See Also

Reference

DocumentPage Class
DocumentPage Members

Error processing SSI file
   Leadtools.Documents requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features