BeginArtifactEx

Tagged PDF, Accessibility

Description

Opens an artifact marked-content sequence with an explicit artifact type and optional Pagination subtype in one call, using the property dictionary and BDC operator required by ISO 32000-2 §14.8.2.2.1 Table 363Use this function for

Pagination, Layout, Page, or PDF 2.0 Background artifacts; every successful call must be followed by a matching EndArtifact call

Syntax

Delphi

Function TPDFlib.BeginArtifactEx(Const ArtifactType, ArtifactSubtype: WideString): Integer;

ActiveX

Function PDFlib::BeginArtifactEx(ArtifactType As String, ArtifactSubtype As String) As Long

DLL

int DLBeginArtifactEx(int InstanceID, const wchar_t * ArtifactType, const wchar_t * ArtifactSubtype);

Parameters

ArtifactTypePass Pagination, Layout, Page, or Background, or an empty string to omit /Type
ArtifactSubtypeOptional Pagination subtype, commonly Header, Footer, Watermark, PageNum, LineNum, Redaction, or Bates

Operator written

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

PDF version

Background, PageNum, LineNum, Redaction, and Bates require PDF 2.0 and raise the output feature version automatically

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 page background using the PDF 2.0 artifact type
PDF.BeginArtifactEx('Background', '');
PDF.DrawImage(BackgroundImage, 0, 0, PDF.PageWidth, PDF.PageHeight);
PDF.EndArtifact;