Foxit PDF SDK
fsdk.AutoTagProviderCallback Class Reference

Public Member Functions

def GetReportText (type)
 Get the display text for an auto tag result data type.
More...
 

Detailed Description

This class represents an auto tag results provider for accessibility.

All the pure virtual functions in this class are used as callback functions and should be implemented by user in derived class.

Member Function Documentation

◆ GetReportText()

def fsdk.AutoTagProviderCallback.GetReportText (   type)

Get the display text for an auto tag result data type.

This callback is invoked by the SDK while it generates the "Add Tags" report during auto tagging. For each result data type (see ), the SDK requests the corresponding (typically localized) display string from the application, so the application controls all user-visible wording in the report.

Most types map to a plain label (for example "Figures", "Artifacts", "Table Summary"). A few types expect the returned string to contain a printf-style placeholder that the SDK substitutes at runtime; the implementation must keep the placeholder and its order intact:

  • %d page number (1-based): e_AutoTagResultDataTypePage ("Page \%d"), e_AutoTagResultDataTypeMissFigure ("Figure missing AltText on page \%d.");
  • %d count: e_AutoTagResultDataTypeSumReduceConfidence ("\%d reduced confidence pages"), e_AutoTagResultDataTypeSumAlttextFigure ("\%d figures missing AltText");
  • %ls category name: e_AutoTagResultDataTypeCheckCategory ("\%ls to check."), e_AutoTagResultDataTypeFixCategory ("How to Fix \%ls Tagging.");
  • %ls file name: e_AutoTagResultDataTypeTagreportFilename ("Add Tags Report for \%ls").

Return an empty string for an unknown or unhandled type.

Parameters
[in]typeOne value of the enumeration, that the SDK is requesting text for.
Returns
The display text for type (may contain a placeholder as noted above), or an empty string if the type is not handled.