BeginArtifact
Tagged PDF, Accessibility
Description
Opens a PDF artifact region. Artifact content is decorative or structural (page headers, footers, page numbers, background images, ruling lines) and is explicitly excluded from the logical document reading order. Screen readers skip artifact regions entirely.
Write the artifact's graphics or text between BeginArtifact and the matching EndArtifact call.
Syntax
Delphi
function TPDFlib.BeginArtifact(const SubType: WideString): Integer;ActiveX
Function PDFlib::BeginArtifact(SubType As String) As LongDLL
int DLBeginArtifact(int InstanceID, wchar_t* SubType);
int DLBeginArtifactA(int InstanceID, char* SubType);Parameters
| SubType | Optional artifact sub-type name. Common values: Header, Footer, Watermark, Background. Pass an empty string to omit the sub-type. |
|---|
Return values
| 0 | Failed (no document is open) |
|---|---|
| 1 | Artifact region opened successfully |
Example
// Page footer as artifact
PDF.BeginArtifact('Footer');
PDF.SetFontSize(8);
PDF.PrintText(50, 20, 'Page 1 of 10');
PDF.EndArtifact;