GetTextBlock
PowerScript function
Description
Gets a PDFTextBlock object in the current PDFRichText object.
Applies to
PDFRichText object in Objects and Controls
Syntax
|
1 |
PDFTextBlock GetTextBlock(long index) |
|
1 |
PDFTextBlock GetTextBlock(string name) |
|
Argument |
Description |
|---|---|
|
index |
The PDFTextBlock object to be added in the current |
| name | The name of the PDFTextBlock object. |
Return value
PDFTextBlock object in Objects and Controls. 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:
|
1 2 |
//Get the first PDFtextblock lpdf_block=lpdf_rtext.gettextblock( 1 ) |
This example gets the text block with the specified name:
|
1 2 3 4 5 |
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