GetWrapImage

Description

Gets an image that the current PDFRichText object wraps around.

Applies to

PDFRichText object

Syntax

PDFImage GetWrapImage(long index)
PDFImage GetWrapImage(string name)

Argument

Description

index

The index of the image that the PDFRichText object wraps around. The index of the images are determined by the orders the WrapImage function is called to wrap it, starting at 1. If the wrapping for one image is removed, the indexes of the remaining objects will be reordered.

name The name of the image that the PDFRichText object wraps around.

Return value

PDFImage object. Returns the PDFImage object that the current PDFRichText object wraps around if it succeeds, or returns null if it fails. If the current PDFRichText object wraps around multiple images with the same name, only return the first one.

Examples

This example gets the image with the specified index in the current PDFRichText object

//Get the PDFImage objecct with index = 1
lpdf_image = lpdf_rtext.getwrapimage(1)

This example gets the image with the specified name in the current PDFRichText object

lpdf_image.name= "image"
lpdf_page.AddContent( lpdf_image)
lpdf_rtext.wrapimage( lpdf_image)

//Get the PDFImage objecct with name= "image"
lpdf_image = lpdf_rtext.getwrapimage("image")

See also

AddTextBlock

Clone

GetOverflowPageText

GetTextBlock

GetTextBlockCount

GetWrapImageCount

IsOverflowPage

RemoveTextBlock

RemoveWrapImage

WrapImage