1

I've got some trouble when I fill a PDF-Form with itextsharp. There are special fields e. g. the zip code. The pdf formular that I have to use is an specification that can't be modified!

That's when I put numbers in with my own hands: normal user input

And that's happend when filled with itextsharp: itextsharp input

I don't know how to create this alignment. It appears automatically when the user type it in and leave the field with the mouse, or a tab.

So far I've tried this. It works all fine, but I can't activate this special effect. It's just center the alignment. The pdfForm is an "AcroFields":

            foreach (var field in pdfForm.Fields) {
            wordVarsWithContent.Where(v => pdfForm.GetField(field.Key).Trim().ToLower().Contains(v.VarName.Trim().ToLower()))
                .ToList().ForEach(wordVarContent => {
                    if (wordVarContent != null) {
                        pdfForm.GetFieldItem(field.Key).GetMerged(0).Put(PdfName.Q, new PdfNumber(PdfFormField.Q_CENTER));
                        pdfForm.SetField(field.Key, pdfForm.GetField(field.Key).Replace(wordVarContent.VarName.Trim(), wordVarContent.Ergebnis));
                    }
                });

        }
Aci
  • 11
  • 2

0 Answers0