|
wxMaxima
|
Description of a logical structure element ("tag") of a tagged PDF document. More...
#include <pdfstructure.h>
Public Member Functions | |
| wxPdfTag (const wxString &structureType=wxS("Span")) | |
| Constructor. | |
| wxPdfTag & | SetStructureType (const wxString &structureType) |
| Set the structure type. | |
| const wxString & | GetStructureType () const |
| Get the structure type. | |
| wxPdfTag & | SetAltText (const wxString &altText) |
| Set the alternate description (/Alt) | |
| const wxString & | GetAltText () const |
| Get the alternate description. | |
| wxPdfTag & | SetActualText (const wxString &actualText) |
| Set the replacement text (/ActualText) | |
| const wxString & | GetActualText () const |
| Get the replacement text. | |
| wxPdfTag & | SetExpansion (const wxString &expansion) |
| Set the expanded form of an abbreviation (/E) | |
| const wxString & | GetExpansion () const |
| Get the expanded form of an abbreviation. | |
| wxPdfTag & | SetLanguage (const wxString &language) |
| Set the natural language of the element content (/Lang), e.g. "en-US". | |
| const wxString & | GetLanguage () const |
| Get the natural language of the element content. | |
| wxPdfTag & | SetTitle (const wxString &title) |
| Set the title of the element (/T) | |
| const wxString & | GetTitle () const |
| Get the title of the element. | |
| wxPdfTag & | SetMathML (const wxString &mathML) |
| Set a MathML representation of the element content. | |
| const wxString & | GetMathML () const |
| Get the MathML representation of the element content. | |
Description of a logical structure element ("tag") of a tagged PDF document.
A tagged PDF document contains, in addition to its visual content, a structure tree that tells assistive technology (screen readers, braille displays, reflowing viewers) and text extraction tools what the content means: which drawing commands form a paragraph, a heading, a figure or a mathematical formula, how they should be read aloud, and in which order.
An instance of this class describes one structure element. It is passed to wxPdfDocument::BeginTag(); every drawing command issued until the matching wxPdfDocument::EndTag() becomes the content of that element.
The structure type is one of the standard structure types of ISO 32000-1, section 14.8.4, for example
Document, Part, Art, Sect, Div, BlockQuote, Caption, TOC, TOCI, Index P, H, H1 ... H6, L, LI, Lbl, LBody, Table, TR, TH, TD Span, Quote, Note, Reference, Code, Link Figure, Formula, Form Optional properties:
/Alt): a human readable description of the content, read by screen readers instead of the content. Required for Figure and Formula elements by PDF/UA./ActualText): the exact text the content represents. Text extraction and copy & paste use it instead of the glyphs that were drawn. Useful when text is drawn with lines, with decorative glyphs or as a sequence of glyphs that does not map to the intended characters (e.g. a big square root sign assembled from parts)./E): the expanded form of an abbreviation./Lang): the natural language of the content as a BCP 47 language tag (e.g. "en-US", "de"), if it differs from the document language./T): a title of the element (not read as content)./AF, relationship /Supplement, MIME type application/mathml+xml), as recommended by the PDF Association's best practice guide "Math in PDF" and as done by the LaTeX tagging project. Software that understands MathML (e.g. NVDA with MathCAT) can then present the formula semantically; all other software falls back to the alternate text.All setters return a reference to the object, so that calls can be chained:
|
explicit |
Constructor.
| structureType | the structure type of the element, e.g. "P" or "Formula". An empty string is replaced by "Span". |
|
inline |
Set a MathML representation of the element content.
The MathML markup (a complete <math> element, preferably with the MathML namespace declaration) is embedded as an associated file of the structure element. It is normally used with Formula elements.
| mathML | the MathML markup. It is stored UTF-8 encoded. |