1
votes

I create a PDF using iText in C# with filled Formfields. The created PDF looks fine on Windows 8.1 Adobe Reader but on Windows 7 Adobe Reader the Fields are all purple and you can only see the values if you click each Textfield.

Is there some default option in Adobe Reader to display the values from Formfields in a pdf?

If i click on print all the values are gone in Windows 7. In Windows 8.1 all the values are still there.

Any Help would be nice. Thanks in Advance!

enter image description here

1
Please share the document. I have never seen this kind of behavior. Are you sure it's inherent to the PDF and that it's not abnormal behavior of the Adobe Reader instance on your Windows 7 machine? PDF is the Portable Document Format, which means that a PDF document should look identical regardless of (the version of) the operating system. If you don't provide us the means to reproduce the problem, your question will remain unanswered.Bruno Lowagie
The Problem is not that my PDF looks different and its no problem mit iText. The PDF looks perfectly fine on all machines. Its just that the Adope Reader on Windows 7 behaves strange.Jonas
It's Adobe, not Adope. Are you sure it's not a matter of a setting that is wrong in that specific Adobe Reader? Did you upgrade to the latest version of Adobe Reader?Bruno Lowagie
I think the field has only the value as a description. If i click on it i can change the value and then the document saves it. i set the value with form.SetField("Titel of the Field", "Text that i need to display"); But if i click the field and dont change the text the text stays empty after i click another Field.Jonas
I added an example. All the purple fields have values but i can only see them if i click them like i did with "zahnscheibe". The field goes empty again if i click another. Only if i change something it stays. I hope this helps. Thanks for your timeJonas

1 Answers

2
votes

Take a look at the following screen shot:

enter image description here

The fields are blueish just like in yours. This means that the fields are highlighted. However, if you click the button "Highlight existing fields" (marked with the arrow), the fields are no longer highlighted.

On another note: it seems that the fields aren't generated. If form is your AcroFields instance, you should add this to your code:

form.GenerateAppearances = true;

This will force iTextSharp to generate an appearance instead of relying on Adobe Reader to create appearances. That way, you won't have to click the field to see its appearance.