问题描述
我有一个现有的PDF,我正在以编程方式填写(C#)。
I have an existing PDF that I am filling in programmatically (C#).
表单上有复选框。在构建4.4.x中,它们在选中时呈现复选标记。在构建5.5.5.0和5.5.6.0中,它们现在是十字符号。
该文件的PdfVersion为54'6'。
There are check boxes on the form. In build 4.4.x they rendered a check mark when selected. In build 5.5.5.0 and 5.5.6.0 they are now a cross symbol.The document has PdfVersion of 54 '6'.
我试过:
SetFieldProperty(fieldname, "checkboxtype", RadioCheckField.TYPE_CHECK, null);
但没有运气。
我搜索了潜在的属性列表,但似乎无法找到有效字符串值的列表。 iText是否在行动 - >表8.3是一个完整的清单?
Also I searched for the potential property list, but cannot seem to find a list of valid string values. Is the iText in Action -> Table 8.3 a complete listing?
推荐答案
我遇到了这个问题。如果我在Adobe中手动填写PDF表单,则会添加复选标记,但如果我使用了iTextSharp,则会放置十字形。使iTextSharp放置复选标记对我有用的是:
I was having this exact problem. If I manually filled out the PDF form in Adobe it put checkmarks, but if I used iTextSharp, it put crosses. What worked for me to make iTextSharp put checkmarks was using:
SetField("checkbox name", "Yes", true);
最后的'true'将其从十字标记改为复选标记。希望能帮到你。
The 'true' at the end changed it from a cross to a checkmark. Hope that helps you.
这篇关于iTextSharp 5.5.6.0错误?复选框刻度线更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!