RegisterFigure
Tagged PDF
Description
Gives the description the next image drawn will carry.
Syntax
Delphi
Function TPDFlib.RegisterFigure(Const Description: WideString): Integer;Parameters
| Description | What the picture shows, in words. An empty description is refused. |
|---|
Return values
| 1 | The description was taken. |
|---|---|
| 0 | The description was empty and nothing was recorded. |
Remarks
A reader reads this description in place of the picture, so it is the whole of what a non-sighted reader gets from it. Say what the picture shows rather than that there is one.
The description is spent on the next image drawn, so a later image never inherits it. It takes effect only while SetAutoTagMode covers figures; without that the image is drawn untagged and the description is dropped.
For a rule, border or background that carries no meaning, use RegisterDecoration instead: a figure with nothing worth saying about it is worse than no figure at all, because a reader stops for it.
Example
PDF.SetAutoTagMode(AUTOTAG_DEFAULT);
PDF.RegisterFigure('Quarterly revenue, rising from 2024 to 2026');
PDF.DrawImage(72, 100, 300, 200); // a Figure carrying that description
PDF.RegisterDecoration;
PDF.DrawImage(72, 320, 300, 4); // a rule: an artifact a reader skipsSee also
RegisterDecoration, SetAutoTagMode, RegisterHeading, BeginTagEx