FormEditor.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)" });

另请参阅