Foxit PDF SDK
com.foxit.sdk.addon.accessibility.AlternateTextFigureData Class Reference

Data structure for alternate text information of a figure.
More...

Public Member Functions

 AlternateTextFigureData ()
 Default constructor: creates an empty, non-decorative figure entry.

 
 AlternateTextFigureData (AlternateTextFigureData other)
 Copy constructor.

 
 AlternateTextFigureData (boolean is_decorative_figure, String alternate_text, String alternate_text_changed, int page_index, RectF rect)
 Construct with explicit values.
More...
 
synchronized void delete ()
 Clean up related C++ resources immediately. More...
 
String getAlternate_text ()
 Get the alternate text before change (original). More...
 
String getAlternate_text_changed ()
 Get the alternate text after change (modified in fix mode). More...
 
boolean getIs_decorative_figure ()
 Get whether the figure is decorative (no alternate text). More...
 
int getPage_index ()
 Get the page index where the figure is located. More...
 
RectF getRect ()
 Get bounding rectangle of the figure on the page. More...
 
void set (boolean is_decorative_figure, String alternate_text, String alternate_text_changed, int page_index, RectF rect)
 Set object values in one call.
More...
 
void setAlternate_text (String value)
 Set the alternate text before change (original). More...
 
void setAlternate_text_changed (String value)
 Set the alternate text after change (modified in fix mode). More...
 
void setIs_decorative_figure (boolean value)
 Set whether the figure is decorative (no alternate text). More...
 
void setPage_index (int value)
 Set the page index where the figure is located. More...
 
void setRect (RectF value)
 Set bounding rectangle of the figure on the page. More...
 

Detailed Description

Data structure for alternate text information of a figure.

Stores information about a single figure used by accessibility tagging and fix workflows.

  • is_decorative_figure: whether the figure is decorative and should not have alternate text.
  • alternate_text: the original alternate text (before edit).
  • alternate_text_changed: the alternate text after user modification (used in fix mode).
  • page_index: the zero-based page index where the figure is located.
  • rect: the bounding rectangle of the figure on the page.


Typical usage:

  1. Iterate with TaggedPDF::GetNextFigureData() / GetPrevFigureData().
  2. Modify using SetCurrentFigureDataInfo() and persist via TaggedPDF::SaveFigureData().


Constructor & Destructor Documentation

◆ AlternateTextFigureData()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.AlternateTextFigureData ( boolean  is_decorative_figure,
String  alternate_text,
String  alternate_text_changed,
int  page_index,
RectF  rect 
)

Construct with explicit values.

Parameters
[in]is_decorative_figuretrue if figure is decorative (no alt text).
[in]alternate_textoriginal alternate text (may be null/empty).
[in]alternate_text_changedalternate text after change (may be null/empty).
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function pdf.PDFDoc.getPageCount .
[in]rectbounding rectangle of the figure on the page.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.addon.accessibility.AlternateTextFigureData.delete ( )

Clean up related C++ resources immediately.

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

◆ getAlternate_text()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.getAlternate_text ( )

Get the alternate text before change (original).

Returns
The alternate text before change (original).

◆ getAlternate_text_changed()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.getAlternate_text_changed ( )

Get the alternate text after change (modified in fix mode).

Returns
The alternate text after change (modified in fix mode).

◆ getIs_decorative_figure()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.getIs_decorative_figure ( )

Get whether the figure is decorative (no alternate text).

Returns
Whether the figure is decorative (no alternate text).

◆ getPage_index()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.getPage_index ( )

Get the page index where the figure is located.

Returns
The page index where the figure is located. Valid range: from 0 to (count-1). count is returned by function pdf.PDFDoc.getPageCount .

◆ getRect()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.getRect ( )

Get bounding rectangle of the figure on the page.

Returns
Bounding rectangle of the figure on the page.

◆ set()

void com.foxit.sdk.addon.accessibility.AlternateTextFigureData.set ( boolean  is_decorative_figure,
String  alternate_text,
String  alternate_text_changed,
int  page_index,
RectF  rect 
)

Set object values in one call.

Parameters
[in]is_decorative_figurewhether the figure is decorative.
[in]alternate_textoriginal alternate text.
[in]alternate_text_changedalternate text after change.
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function pdf.PDFDoc.getPageCount .
[in]rectbounding rectangle of the figure.

◆ setAlternate_text()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.setAlternate_text ( String  value)

Set the alternate text before change (original).

Parameters
[in]valueThe alternate text before change (original).
Returns
None.

◆ setAlternate_text_changed()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.setAlternate_text_changed ( String  value)

Set the alternate text after change (modified in fix mode).

Parameters
[in]valueThe alternate text after change (modified in fix mode).
Returns
None.

◆ setIs_decorative_figure()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.setIs_decorative_figure ( boolean  value)

Set whether the figure is decorative (no alternate text).

Parameters
[in]valueWhether the figure is decorative (no alternate text).
Returns
None.

◆ setPage_index()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.setPage_index ( int  value)

Set the page index where the figure is located.

Parameters
[in]valueThe page index where the figure is located. Valid range: from 0 to (count-1). count is returned by function pdf.PDFDoc.getPageCount .
Returns
None.

◆ setRect()

com.foxit.sdk.addon.accessibility.AlternateTextFigureData.setRect ( RectF  value)

Set bounding rectangle of the figure on the page.

Parameters
[in]valueBounding rectangle of the figure on the page.
Returns
None.