GetContent
PowerScript function
Description
Gets a PDFContent object from a page (a PDFPage object).
Applies to
PDFPage object in Objects and Controls
Syntax
|
1 |
PDFContent GetContent(long index) |
|
1 |
PDFContent GetContent(string name) |
|
Argument |
Description |
|---|---|
|
name |
The name of the PDFContent object in Objects and Controls. |
| index | The index of the PDFContent object in Objects and Controls. |
Return value
PDFContent object in Objects and Controls. Returns the
object if it succeeds, or null if the object cannot be found.
Usage
Call the function to get a PDFContent object in Objects and Controls from the PDFPage
object. You may either specify the object name or the index of the object
in the page. The PDFContent object may be an object that is derived from
it (including PDFContent object in Objects and Controls, PDFInvisibleContent object in Objects and Controls,
PDFVisibleContent object in Objects and Controls,
PDFImage object in Objects and Controls, PDFImportContent object in Objects and Controls,
PDFMultilineText object in Objects and Controls,
PDFRichText object in Objects and Controls, PDFSharedText object in Objects and Controls, and PDFText
object in Objects and Controls).
The index of the PDFContent objects in a PDFPage is determined by
the orders they are added into the PDFPage. The first one added has the
index 1, the second has the index 2, and so on. If one object is removed,
the indexes for the remaining objects will be reordered.
Examples
The following example shows how to get the PDFContent object with
the specified name or index:
|
1 2 3 4 5 6 |
PDFtext lpdf_text1 //Get the PDFContent object with name=text lpdf_text.name = "text" lpdf_text1 = lpdf_page.getcontent("text") //Get the PDFContent object with index=1 lpdf_text1 = lpdf_page.getcontent(1) |
See also