Vertical Alignment of Form Fields when using PDF Merger

Vertical Alignment of Form Fields when using PDF Merger

Forum member · Aug 27, 2009
Hi, I am using the CreateLabel() method to fill Form fields in a PDF Document. The Filled form fields contain text which is Vertically aligned at the Top in the output pdf document which does not look good. The filled data in these form fields should be have vertical alignment of Center instead of Top. Is there any way we can set the alignment of text in these Fields ?

Re: Vertical Alignment of Form Fields when using PDF Merger

Support · Aug 27, 2009
Hello, The create label method will add the text in place of the form field. The text will be added at the X, Y position of the field and that is reason for seeing it at top position. If you want to add it at a specific position then you will have to add by specifying the X, Y position for the text. You can get the X, Y position of the form field by using the GetX, GetY methods of the PdfFormField. Then you will have to make the field readonly. Using the CreateLabel method it is not possible to set vertical alignment. Thanks, ceTe Software Support Team.