FillTextBlock

Blocks, Interaction

Description

Personalizes a text block by fitting the given text into its rectangle with the current font selection

Syntax

Delphi

Function FillTextBlock(Page, BlockIndex: Integer; Const Text: WideString;
  Options: Integer): Integer;

ActiveX

Function PDFlib::FillTextBlock(Page As Long, BlockIndex As Long, Text As String, Options As Long) As Long

DLL

int DLFillTextBlock(int InstanceID, int Page, int BlockIndex, const wchar_t* Text, int Options);
int DLFillTextBlockA(int InstanceID, int Page, int BlockIndex, const char* Text, int Options);

Parameters

Page, BlockIndexBlock selector
TextNon-empty replacement text
OptionsBit 1 deletes the block annotation after a successful fill

Return values

1 when the text was placed, 0 when the block is missing, not a text block, or the fit failed

Remarks

Block properties fontname (or font), fontsize (or size), fillcolor (or textcolor/color), alignment (or align/position) and fitmethod are applied automatically when present, and the caller font, text size, colour, alignment and selected page are restored before returning

See also

GetBlockCount, AddBlock, GetBlockType, GetBlockRect