I have a program that create TextFields inside a PDF-file so it can be used as a form. I would like to have the text I write in the TextFields I created to be centered thou
Use the Q flag:
textBox.setQ(PDTextField.QUADDING_CENTERED);
Other possible values are QUADDING_RIGHT and QUADDING_LEFT (which is the default).