AddListItem

AddListItem(string, string)

将新项目添加到列表框中。

public void AddListItem(string fieldName, string itemName)
范围类型描述
fieldNameString将添加新项目的字段名称。
itemNameString如果是新项目,请命名。

例子

FormEditor formEditor = new FormEditor("PdfForm.pdf", PdfForm_out.pdf");
formEditor.AddListItem("listBoxField", "Item 4 (New Item)");

也可以看看


AddListItem(string, string[])

将具有导出值的新项目添加到现有列表框字段,仅适用于 AcroForm 组合框字段。

public void AddListItem(string fieldName, string[] exportName)
范围类型描述
fieldNameString将添加项目的字段的名称。
exportNameString[]一个字符串数组,表示具有导出值的新列表项,即(项目标签,导出值)。

例子

FormEditor fe = new FormEditor("PdfForm.pdf", "FormEditor_AddListItem2.pdf");
fe.AddListItem("listboxField", new string[] { "4", "Item4(Added)" });

也可以看看