FillTextBlock

块、交互

描述

按当前字体选择把给定文字适配进文字块的矩形,完成个性化

语法

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);

参数

Page, BlockIndex块选择器
Text非空的替换文字
Options位 1:填充成功后删除块注释

返回值

文字放置成功返回 1;块不存在、不是文字块或适配失败时返回 0

备注

块属性 fontname(或 font)、fontsize(或 size)、fillcolor(或 textcolor/color)、alignment(或 align/position)与 fitmethod 在存在时自动生效;返回前会恢复调用方原有的字体、字号、颜色、对齐与所选页面

另请参阅

GetBlockCount, AddBlock, GetBlockType, GetBlockRect