Foxit PDF SDK

Public Member Functions | List of all members
com.foxit.sdk.pdf.objects.PDFStructTree Class Reference
Inheritance diagram for com.foxit.sdk.pdf.objects.PDFStructTree:

## Public Member Functions
| PDFStructTree (PDFDoc document) throws com.foxit.sdk.PDFException
| Constructor, with parameters. More...
| PDFStructTree (PDFStructTree other)
| Constructor, with another PDF structure tree object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
StructElement | getChild (int index) throws com.foxit.sdk.PDFException
| Get the structure element by index. More...
int | getChildCount () throws com.foxit.sdk.PDFException
| Get count of structure elements in current PDF structure tree. More...
boolean | isEmpty ()
| Check whether current object is empty or not. More...
void | removeChild (int index) throws com.foxit.sdk.PDFException
| Remove the structure element by index. More...
Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void | delete ()
| Clean up related C++ resources immediately. More...

## Detailed Description

PDF structure tree is a kind of common data structure in tagged PDF documents. A structure tree is used in PDF files to represent the organization and hierarchy of the document's content. PDF structure tree has following characteristics:

- A PDF structure tree is also a hierarchical structure, with the top node representing the entire document and the lower nodes representing pages, paragraphs, headings, and other elements.

- A PDF structure tree contains semantic information about the content of the document, such as headings, paragraphs, tables, and lists. This information is used to enhance the accessibility and usability of the document, as well as to optimize its display and printing;

Class PDFStructTree is used to be associated with an existing PDF structure tree. It offers functions to get structure elements in the PDF structure tree.

## Constructor & Destructor Documentation

## ◆ PDFStructTree() [1/2]

com.foxit.sdk.pdf.objects.PDFStructTree.PDFStructTree | ( | PDFDoc | document | ) | throws com.foxit.sdk.PDFException

Constructor, with parameters.

If there exists PDF structure tree in the PDF document, this function is just to construct a PDF structure tree object to be associated with the structure tree.

Parameters

  [in] | document | A valid PDF document object.

## ◆ PDFStructTree() [2/2]

com.foxit.sdk.pdf.objects.PDFStructTree.PDFStructTree | ( | PDFStructTree | other | ) |

Constructor, with another PDF structure tree object.

Parameters

  [in] | other | Another PDF structure tree object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.objects.PDFStructTree.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getChild()

StructElement com.foxit.sdk.pdf.objects.PDFStructTree.getChild | ( | int | index | ) | throws com.foxit.sdk.PDFException

Get the structure element by index.

Parameters

  [in] | index | Index of the structure element to be retrieved. Valid range: from 0 to (count-1). count is returned by function PDFStructTree.getChildCount .

Returns
  A StructElement object.

## ◆ getChildCount()

int com.foxit.sdk.pdf.objects.PDFStructTree.getChildCount | ( |  | ) | throws com.foxit.sdk.PDFException

Get count of structure elements in current PDF structure tree.

Returns
  The structure elements count.

## ◆ isEmpty()

boolean com.foxit.sdk.pdf.objects.PDFStructTree.isEmpty | ( |  | ) |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ removeChild()

void com.foxit.sdk.pdf.objects.PDFStructTree.removeChild | ( | int | index | ) | throws com.foxit.sdk.PDFException

Remove the structure element by index.

Parameters

  [in] | index | Index of the structure element to be retrieved. Valid range: from 0 to (count-1). count is returned by function PDFStructTree.getChildCount .

Returns
  None.