THotPDF.AddLoadedOptionalContentGroup Method
在已加载文档中创建新的可选内容组(图层),并将其注册到 /OCProperties /OCGs 和默认的 /D 配置中
声明
function AddLoadedOptionalContentGroup(const AName: AnsiString; VisibleByDefault: boolean = True): Integer;
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
AName | Layer name shown to PDF viewers |
VisibleByDefault | 写入 default configuration's /ON 或 /OFF 数组的初始可见性 |
返回值
新图层在 OCG 数组中的索引,失败时为 -1
使用说明
- 将返回的索引配合 THotPDF.SetLoadedOptionalContentGroupVisible 或 THotPDF.AddLayerToOptionalContentOrder 使用
- 使用 THotPDF.AddLoadedOptionalContentMembership 可以跨多个组构建可见性策略