SetPagePieceInfo

Page properties

Description

Writes one private-data entry into a page PieceInfo dictionary

Syntax

Delphi

Function SetPagePieceInfo(PageNumber: Integer; Const AppName, Key, Value: WideString): Integer;

Parameters

PageNumberOne-based page number that receives the private-data entry
AppNameApplication name used as the /PieceInfo subdictionary key; must not be empty
KeyEntry key inside the application dictionary; must not be empty
ValueText value stored under Key; an existing value is overwritten in place

Return values

0No document, invalid page or empty name
1The entry was written

Remarks

Creates /PieceInfo /<AppName> /<Key> on the page dictionary when absent and overwrites the value in place otherwise. Applications keep their entries separate, so multiple tools can attach private data to the same page. ClearPagePieceInfo removes the whole page dictionary

Example

PDF.SetPagePieceInfo(1, "Editor", "Rev", "R42");

See also

GetPagePieceInfo, NewNamedDestination