Foxit PDF SDK
FSDK.ReadingOrder Class Reference

Public Member Functions

 AddOrderDataForRect (page_index, rect)
 Add order data for selected rect. More...
 
 ApplyReadingOrder (page_index, selected_rect)
 Apply reading order to the specified page based on the given selected rectangle area(s). More...
 
 CanMoveDataOrder (page_index, select_info_array, dest_move_item)
 Check whether data order can be moved. More...
 
 CanSelectTableCellAtPoint (page, point)
 Check whether a table cell can be selected on mouse down at the given point. More...
 
 ClearPageStructInfo (page)
 Clear page structure info. More...
 
 constructor (pdf_doc)
 Constructor. More...
 
 DeleteOrderDataStructInfo (page, src_order_index_array, is_loaded)
 Delete order data structure info. More...
 
 DrawReadingOrderItems (page_index)
 Draw reading order items for a specified page. More...
 
 EndEditTable ()
 End edit table. More...
 
 GenerateTableHeaderIDs ()
 Generate table header IDs. More...
 
 GetAllLeafChildrenByContentItemID (content_tree, content_item_id)
 Get all leaf children by content item ID. More...
 
 GetContentTree ()
 Get content tree. More...
 
 GetCurrentTableHeaderIDs ()
 Get the array header ID of current table. More...
 
 GetReadingOrderTreeItems ()
 Get reading order tree items. More...
 
 GetSelectedTableCellAttributes ()
 Get selected table cell attributes. More...
 
 GetTableSummary (page)
 Get table summary. More...
 
 HasHeaderID (header_id)
 Check whether current table header ID is existing. More...
 
 HasMissingHeaderIDs ()
 Check whether current table is missing header IDs. More...
 
 IsEditingTable ()
 Check whether table editing has started. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
 MoveOrderData (page_index, src_order_index_array, dest_order_index)
 Move data order. More...
 
 RemoveOrderDataForRect (page_index, rect)
 Remove order data for selected rect. More...
 
 SelectTableAtPoint (page_index, point)
 Select the table at the specified point on a page, if any. More...
 
 SelectTableCellAtPoint (page, point, region_selected, appended)
 Select table cell by point on mouse up. More...
 
 SelectTableCellAtRect (page, rect, region_selected, appended)
 Select table cell by rect on mouse up. More...
 
 SetOrderTypeForSelectedContent (structure_type)
 Set order type for selected content. More...
 
 SetOrderTypeForSelectedTreeItems (structure_type, select_info_array)
 Set order type for selected tree items. More...
 
 SetReadingOrderOptions (options)
 Set reading order options. More...
 
 SetSelectedTableCellAttributes (cell_attribute, change_id_enabled, need_change_ids)
 Set selected table cell attributes. More...
 
 SetTableSummary (page, table_summary)
 Set table summary. More...
 
 StartEditTable (page)
 Start edit table. More...
 
 StartEditTableAtPoint (page, point)
 Start editing the table located at the specified point on a page, if any. More...
 
 SynchronizeTable ()
 Synchronize table. More...
 

Static Public Attributes

static e_StructureTypeBackgroundOrArtifact
 Structure type: background or artifact.
 
static e_StructureTypeCaption
 Structure type: caption.
 
static e_StructureTypeCell
 Structure type: cell.
 
static e_StructureTypeFigure
 Structure type: figure.
 
static e_StructureTypeFigureOrCaption
 Structure type: figure or caption.
 
static e_StructureTypeFormfield
 Structure type: form field.
 
static e_StructureTypeFormula
 Structure type: formula.
 
static e_StructureTypeH1
 Structure type: H1.
 
static e_StructureTypeH2
 Structure type: H2.
 
static e_StructureTypeH3
 Structure type: H3.
 
static e_StructureTypeH4
 Structure type: H4.
 
static e_StructureTypeH5
 Structure type: H5.
 
static e_StructureTypeH6
 Structure type: H6.
 
static e_StructureTypeNote
 Structure type: note.
 
static e_StructureTypeReference
 Structure type: reference.
 
static e_StructureTypeTable
 Structure type: table.
 
static e_StructureTypeText
 Enumeration for structure type of reading order. More...
 
static e_TableSelectResultNone
 Enumeration for table select result. More...
 
static e_TableSelectResultNoTableExist
 Table select result : no table exist.
 
static e_TableSelectResultNotInTable
 Table select result : not in table.
 
static e_TableSelectResultNotSamePage
 Table select result : not same page.
 
static e_TableSelectResultNotStarted
 Table select result : not started.
 

Detailed Description

This class represents a reading order for PDF document accessibility reading order operations. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function FSDK.Library.Initialize with a key including "Accessibility" module.

See also
FSDK.Library

Member Function Documentation

◆ AddOrderDataForRect()

FSDK.ReadingOrder.AddOrderDataForRect (   page_index,
  rect 
)
inline

Add order data for selected rect.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]rectThe selected rect.
Returns
The updated order rect array.

◆ ApplyReadingOrder()

FSDK.ReadingOrder.ApplyReadingOrder (   page_index,
  selected_rect 
)
inline

Apply reading order to the specified page based on the given selected rectangle area(s).

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]selected_rectThe array of selected rects which define the area(s) to be used for applying reading order.
Returns
true means success, while false means not.

◆ CanMoveDataOrder()

FSDK.ReadingOrder.CanMoveDataOrder (   page_index,
  select_info_array,
  dest_move_item 
)
inline

Check whether data order can be moved.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]select_info_arrayThe selected info array.
[in]dest_move_itemThe destination move item.
Returns
true means data order can be moved, while false means not.

◆ CanSelectTableCellAtPoint()

FSDK.ReadingOrder.CanSelectTableCellAtPoint (   page,
  point 
)
inline

Check whether a table cell can be selected on mouse down at the given point.

Parameters
[in]pageA PDF page object.
[in]pointThe point, in the PDF coordinate system (PDFPage).
Returns
The table select result. Please refer to values starting from FSDK.ReadingOrder.e_TableSelectResultNone.

◆ ClearPageStructInfo()

FSDK.ReadingOrder.ClearPageStructInfo (   page)
inline

Clear page structure info.

Parameters
[in]pageThe PDF page object.
Returns
None.

◆ constructor()

FSDK.ReadingOrder.constructor (   pdf_doc)
inline

Constructor.

Parameters
[in]pdf_docA valid PDF document object.

◆ DeleteOrderDataStructInfo()

FSDK.ReadingOrder.DeleteOrderDataStructInfo (   page,
  src_order_index_array,
  is_loaded 
)
inline

Delete order data structure info.

Parameters
[in]pageThe PDF page object.
[in]src_order_index_arrayThe source order index array.
[in]is_loadedWhether the page is loaded.
Returns
The deleted count.

◆ DrawReadingOrderItems()

FSDK.ReadingOrder.DrawReadingOrderItems (   page_index)
inline

Draw reading order items for a specified page.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
Returns
true means success, while false means not.

◆ EndEditTable()

FSDK.ReadingOrder.EndEditTable ( )
inline

End edit table.

Returns
true means success, while false means not.

◆ GenerateTableHeaderIDs()

FSDK.ReadingOrder.GenerateTableHeaderIDs ( )
inline

Generate table header IDs.

Returns
true means success, while false means not.

◆ GetAllLeafChildrenByContentItemID()

FSDK.ReadingOrder.GetAllLeafChildrenByContentItemID (   content_tree,
  content_item_id 
)
inline

Get all leaf children by content item ID.

Parameters
[in]content_treeThe content tree.
[in]content_item_idThe content item ID.
Returns
The array of leaf children IDs.

◆ GetContentTree()

FSDK.ReadingOrder.GetContentTree ( )
inline

Get content tree.

Returns
The array of content tree items.

◆ GetCurrentTableHeaderIDs()

FSDK.ReadingOrder.GetCurrentTableHeaderIDs ( )
inline

Get the array header ID of current table.

Returns
The array of header ID.

◆ GetReadingOrderTreeItems()

FSDK.ReadingOrder.GetReadingOrderTreeItems ( )
inline

Get reading order tree items.

Returns
The array of reading order tree items.

◆ GetSelectedTableCellAttributes()

FSDK.ReadingOrder.GetSelectedTableCellAttributes ( )
inline

Get selected table cell attributes.

Returns
The array of cell attribute objects.

◆ GetTableSummary()

FSDK.ReadingOrder.GetTableSummary (   page)
inline

Get table summary.

Parameters
[in]pageThe PDF page object.
Returns
The table summary text.

◆ HasHeaderID()

FSDK.ReadingOrder.HasHeaderID (   header_id)
inline

Check whether current table header ID is existing.

Parameters
[in]header_idThe header ID to check.
Returns
true means the header ID is existing, while false means not.

◆ HasMissingHeaderIDs()

FSDK.ReadingOrder.HasMissingHeaderIDs ( )
inline

Check whether current table is missing header IDs.

Returns
true means current table is missing header IDs, while false means not.

◆ IsEditingTable()

FSDK.ReadingOrder.IsEditingTable ( )
inline

Check whether table editing has started.

Returns
true means table editing has started, while false means not.

◆ IsEmpty()

FSDK.ReadingOrder.IsEmpty ( )
inline

Check whether current object is empty or not.

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

◆ MoveOrderData()

FSDK.ReadingOrder.MoveOrderData (   page_index,
  src_order_index_array,
  dest_order_index 
)
inline

Move data order.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]src_order_index_arrayThe source order index array.
[in]dest_order_indexThe destination order index.
Returns
The moved count.

◆ RemoveOrderDataForRect()

FSDK.ReadingOrder.RemoveOrderDataForRect (   page_index,
  rect 
)
inline

Remove order data for selected rect.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]rectThe selected rect.
Returns
The updated order rect array.

◆ SelectTableAtPoint()

FSDK.ReadingOrder.SelectTableAtPoint (   page_index,
  point 
)
inline

Select the table at the specified point on a page, if any.

Parameters
[in]page_indexThe page index. Valid range: from 0 to (count-1). count is returned by function FSDK.PDFDoc.GetPageCount.
[in]pointThe point used to locate the table, in PDF page coordinate system.
Returns
true means a table is found and selected at the specified point, while false means not.

◆ SelectTableCellAtPoint()

FSDK.ReadingOrder.SelectTableCellAtPoint (   page,
  point,
  region_selected,
  appended 
)
inline

Select table cell by point on mouse up.

Parameters
[in]pageA PDF page object.
[in]pointThe point.
[out]region_selectedThe selected region array.
[in]appendedWhether to append the selection.
Returns
The table select result. Please refer to values starting from FSDK.ReadingOrder.e_TableSelectResultNone.

◆ SelectTableCellAtRect()

FSDK.ReadingOrder.SelectTableCellAtRect (   page,
  rect,
  region_selected,
  appended 
)
inline

Select table cell by rect on mouse up.

Parameters
[in]pageA PDF page object.
[in]rectThe rectangular area .
[out]region_selectedThe selected region array.
[in]appendedWhether to append the selection.
Returns
The table select result. Please refer to values starting from FSDK.ReadingOrder.e_TableSelectResultNone.

◆ SetOrderTypeForSelectedContent()

FSDK.ReadingOrder.SetOrderTypeForSelectedContent (   structure_type)
inline

Set order type for selected content.

Parameters
[in]structure_typeThe structure type. Please refer to values starting from FSDK.e_StructureTypeText and this should be one of these values.
Returns
true means success, while false means not.

◆ SetOrderTypeForSelectedTreeItems()

FSDK.ReadingOrder.SetOrderTypeForSelectedTreeItems (   structure_type,
  select_info_array 
)
inline

Set order type for selected tree items.

Parameters
[in]structure_typeThe structure type. Please refer value FSDK.StructureType.
[in]select_info_arrayThe selected info array.
Returns
true means success, while false means not.

◆ SetReadingOrderOptions()

FSDK.ReadingOrder.SetReadingOrderOptions (   options)
inline

Set reading order options.

Parameters
[in]optionsThe reading order options. Please refer to FSDK.ReadingOrderOptions.
Returns
None.

◆ SetSelectedTableCellAttributes()

FSDK.ReadingOrder.SetSelectedTableCellAttributes (   cell_attribute,
  change_id_enabled,
  need_change_ids 
)
inline

Set selected table cell attributes.

Parameters
[in]cell_attributeThe cell attribute to set.
[in]change_id_enabledWhether to enable changing Id.
[in]need_change_idsWhether to change IDs.
Returns
true means success, while false means not.

◆ SetTableSummary()

FSDK.ReadingOrder.SetTableSummary (   page,
  table_summary 
)
inline

Set table summary.

Parameters
[in]pageThe PDF page object.
[in]table_summaryThe table summary text.
Returns
true means success, while false means not.

◆ StartEditTable()

FSDK.ReadingOrder.StartEditTable (   page)
inline

Start edit table.

Parameters
[in]pageThe PDF page object.
Returns
true means success, while false means not.

◆ StartEditTableAtPoint()

FSDK.ReadingOrder.StartEditTableAtPoint (   page,
  point 
)
inline

Start editing the table located at the specified point on a page, if any.

Parameters
[in]pageThe PDF page object.
[in]pointThe point used to locate the table to be edited, in the PDF coordinate system (PDFPage).
Returns
true means a table is found at the specified point and editing has started successfully, while false means not.

◆ SynchronizeTable()

FSDK.ReadingOrder.SynchronizeTable ( )
inline

Synchronize table.

Returns
None.

Member Data Documentation

◆ e_StructureTypeText

FSDK.ReadingOrder.e_StructureTypeText
static

Enumeration for structure type of reading order.

Values of this enumeration should be used alone.

Structure type: text.

◆ e_TableSelectResultNone

FSDK.ReadingOrder.e_TableSelectResultNone
static

Enumeration for table select result.

Values of this enumeration should be used alone.

Table select result : none.