gpt4 book ai didi

c# - 将所有 PDF 字段设置为只读

转载 作者:太空宇宙 更新时间:2023-11-03 11:20:31 32 4
gpt4 key购买 nike

在 iTextSharp 中有没有办法将表单上的所有字段设置为只读?目前我正在单独设置每一个,这很痛苦......

formFields.SetFieldProperty( "Applicant.Phone", "setfflags", PdfFormField.FF_READ_ONLY, null );
formFields.SetFieldProperty( "Applicant.SSN", "setfflags", PdfFormField.FF_READ_ONLY, null );

等等

最佳答案

你不能做这样的事情吗:

foreach (DictionaryEntry de in pdfReader.AcroFields.Fields)
{
formFields.SetFieldProperty(de.Key.ToString(),
"setfflags",
PdfFormField.FF_READ_ONLY,
null);
}

关于c# - 将所有 PDF 字段设置为只读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11171864/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com