SetStructElemSpaceAfter
Tagged PDF, Accessibility
Description
Sets the /SpaceAfter attribute (Layout attribute owner) on the structure element currently open on the tag stack. The value specifies the amount of space to add after the block-level element — analogous to CSS margin-bottom or padding-bottom. Equivalent to calling AddTagAttribute with Owner=Layout, Name=SpaceAfter, and the numeric value as a string.
Syntax
Delphi
function TPDFlib.SetStructElemSpaceAfter(Space: Double): Integer;ActiveX
Function PDFlib::SetStructElemSpaceAfter(Space As Double) As LongDLL
int DLSetStructElemSpaceAfter(int InstanceID, double Space);Parameters
| Space | Space after the element in default user space units (points, 1/72 inch). Must be a non-negative value. A value of 0 means no extra space after the element. |
|---|
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 /SpaceAfter attribute is defined in ISO 32000-1 §14.8.5.4.2 (Layout attribute owner, Table 340).
Layout attributes are advisory: they describe the intended visual layout for re-flow and export engines. See SetStructElemSpaceBefore for more details.
Example
// Tag a paragraph with space after it
PDFlib.BeginTag('P', '', '', '');
PDFlib.SetStructElemSpaceAfter(6.0); // 6 pt below the paragraph
PDFlib.DrawText('Some paragraph text here.', 72, 680);
PDFlib.EndTag;See also
SetStructElemSpaceBefore, SetStructElemStartIndent, SetStructElemWritingMode, AddTagAttribute