BeginArtifact
Tagged PDF, Accessibility
Description
Opens a PDF artefact region. Artefact 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 artefact regions entirely.
Write the artefact'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 Long
DLL
int DLBeginArtifact(int InstanceID, const wchar_t* SubType);
int DLBeginArtifactA(int InstanceID, const char* SubType);
Parameters
| SubType | Pass Pagination, Layout, Page, or PDF 2.0 Background to write an artefact /Type; pass Header, Footer, Watermark, PageNum, LineNum, Redaction, or Bates to write a Pagination /Subtype; pass an empty string for bare /Artifact BMC |
|---|
Operator written
Non-empty values use a property dictionary followed by BDC; an empty value uses /Artifact BMC
PDF version
Background, PageNum, LineNum, Redaction, and Bates require PDF 2.0 and raise the output feature version automatically
Return values
| 0 | Failed (no document is open) |
|---|---|
| 1 | Artefact region opened successfully |
Example
// Page footer as artifact
PDF.BeginArtifact('Footer');
PDF.SetTextSize(8);
PDF.DrawText(50, 20, 'Page 1 of 10');
PDF.EndArtifact;