GetTextBlock

Description

Gets a PDFTextBlock object in the current PDFRichText object.

Applies to

PDFRichText object

Syntax

PDFTextBlock GetTextBlock(long index)
PDFTextBlock GetTextBlock(string name)

Argument

Description

index

The PDFTextBlock object to be added in the current PDFRichText object. The index of the objects are determined by the orders they are added, starting at 1. If one object is removed, the indexes of the remaining objects will be reordered.

name The name of the PDFTextBlock object.

Return value

PDFTextBlock object. Returns the PDFTextBlock object in the PDFRichText object if it succeeds, or null if it fails. If there are multiple PDFTextBlock objects with the same name in the PDFRichText object, only the first one will be returned.

Examples

This example gets the first text block:

//Get the first PDFtextblock
lpdf_block=lpdf_rtext.gettextblock( 1 )

This example gets the text block with the specified name:

lpdf_block.name="block"
lpdf_block.content= "name is block"
lpdf_rtext.addtextblock(lpdf_block)
//Get the text block with name= "block"
lpdf_block1=lpdf_rtext.gettextblock("block")

See also

AddTextBlock

Clone

GetOverflowPageText

GetTextBlockCount

GetWrapImage

GetWrapImageCount

IsOverflowPage

RemoveTextBlock

RemoveWrapImage

WrapImage