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 Long
DLL
int DLBeginArtifact(int InstanceID, const wchar_t * SubType);
Parameters
| SubType | Pass Pagination, Layout, Page, or PDF 2.0 Background to write an artifact /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 | 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;