AddBlock

块、交互

描述

在当前页面创建模板块注释,供后续个性化使用

语法

Delphi

Function AddBlock(Const BlockType, BlockName: WideString;
  Left, Top, Width, Height: Double; Const Properties: WideString): Integer;

ActiveX

Function PDFlib::AddBlock(BlockType As String, BlockName As String, Left As Double, Top As Double, Width As Double, Height As Double, Properties As String) As Long

DLL

int DLAddBlock(int InstanceID, const wchar_t* BlockType, const wchar_t* BlockName, double Left, double Top, double Width, double Height, const wchar_t* Properties);
int DLAddBlockA(int InstanceID, const char* BlockType, const char* BlockName, double Left, double Top, double Width, double Height, const char* Properties);

参数

BlockTypetext、image 或 pdf,不区分大小写
BlockName非空的块名称
Left, Top, Width, Height顶基准门面坐标下的矩形
Properties可选的 key=value;key=value 列表,存放在注释 contents 中

返回值

成功返回 1,参数非法返回 0

备注

块注释自身不带外观,查看器不会渲染这些占位符

另请参阅

GetBlockCount, GetBlockName, GetBlockType, FillTextBlock