SetStructElemEndIndent
Tagged PDF, Accessibility
Description
Sets the /EndIndent attribute (Layout attribute owner) on the structure element currently open on the tag stack. The value specifies the distance between the end edge of the element's content and the end edge of the content rectangle — analogous to CSS padding-right (for LrTb writing mode) or padding-left (for RlTb writing mode). Equivalent to calling AddTagAttribute with Owner=Layout, Name=EndIndent, and the numeric value as a string.
Syntax
Delphi
function TPDFlib.SetStructElemEndIndent(Indent: Double): Integer;ActiveX
Function PDFlib::SetStructElemEndIndent(Indent As Double) As LongDLL
int DLSetStructElemEndIndent(int InstanceID, double Indent);Parameters
| Indent | Indentation from the end edge of the element's content to the end edge of the content rectangle in default user space units (points, 1/72 inch). Positive values move the block away from the end edge. |
|---|
Return value
Returns 1 on success. Returns 0 if no document is open or no tag is currently open on the tag stack.
Remarks
Call this function after BeginTag or BeginTagEx and before EndTag. The /EndIndent attribute is defined in ISO 32000-1 §14.8.5.4.2 (Layout attribute owner, Table 340).
The "end edge" depends on the writing mode. For LrTb (left-to-right) it is the right edge; for RlTb (right-to-left) it is the left edge. This makes the attribute writing-mode-aware. See SetStructElemStartIndent for the complementary attribute.
Example
// Tag an indented block quote with symmetric indentation
PDFlib.BeginTag('BlockQuote', '', '', '');
PDFlib.SetStructElemStartIndent(36.0); // 0.5 inch
PDFlib.SetStructElemEndIndent(36.0); // 0.5 inch
PDFlib.DrawText('A quoted passage...', 108, 660);
PDFlib.EndTag;See also
SetStructElemStartIndent, SetStructElemSpaceBefore, SetStructElemWritingMode, AddTagAttribute