BeginArtifactExA

Tagged PDF, Accessibility

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to BeginArtifactEx and string arguments are interpreted using the current SetAnsiMode code page

Opens a PDF artifact marked-content sequence with explicit artifact type and optional Pagination subtype in a single call. Extends BeginArtifact to support the full artifact property dictionary defined in ISO 32000-1 §14.8.2.2.1 Table 330.

Use this function when you need to express both an artifact type (Pagination, Layout, or Page) and a Pagination subtype (Header, Footer, Watermark, PageNum, or LineNum) in a single operator. For cases where only one dimension is needed, BeginArtifact is sufficient.

Every BeginArtifactEx call must be followed by a matching EndArtifact call.

Syntax

Delphi

Function DLBeginArtifactExA(InstanceID: Integer; ArtifactType, ArtifactSubtype: PAnsiChar): Integer;

DLL

int DLBeginArtifactExA(int InstanceID, const char * ArtifactType, const char * ArtifactSubtype);

Parameters

ArtifactTypeArtifact type name written as the /Type property. Valid values per ISO 32000-1 §14.8.2.2.1:
  • Pagination — page header, footer, page number, or other pagination element
  • Layout — layout-driven content such as column rules, background decoration
  • Page — intrinsic page content not tied to any logical structure
Pass an empty string to omit /Type (the operator falls back to /Subtype-only or bare /Artifact BMC).
ArtifactSubtypePagination subtype written as the /Subtype property. Meaningful only when ArtifactType is Pagination. Common values: Header, Footer, Watermark, PageNum, LineNum. Pass an empty string to omit /Subtype.

Operator written

Both non-empty/Artifact << /Type /T /Subtype /S >> BMC
Type only/Artifact << /Type /T >> BMC
Subtype only/Artifact << /Subtype /S >> BMC
Both empty/Artifact BMC

Return values

0Failed (no document is open)
1Artifact sequence opened successfully

Example

// Mark a running header as a Pagination artifact with subtype Header
PDF.BeginArtifactEx('Pagination', 'Header');
PDF.PrintText(50, 780, 'Chapter 3  —  Results');
PDF.EndArtifact;

// Mark a column rule as a Layout artifact (no subtype needed)
PDF.BeginArtifactEx('Layout', '');
PDF.DrawLine(300, 50, 300, 750);
PDF.EndArtifact;