Setting Form Field properties

Hi,

I am evaluating Pdf.Kit and have a question about setting form field properties. Is it possible to set the visual properties of the form fields in code, such as font, font color, font size, etc.? I see how to fill the fields using Form.FillField(), however I also would like to set the font, color, etc. at the same time for each field in the form. I do not see these properties in the Form or FormEditor classes - are they somewhere else?

Please let me know if that's possible and how this could be done. Thanks!

Dear azellison ,

Thanks for considering Aspose.Pdf.Kit.

In the current version, following functions are already provided:

  • field position and size can be set by Form.moveTo( ) and Form.zoom( ) respectively

  • url of submit button can be set by Form.setSubmitBtnUrl( )

  • an image can be set to a push button as icon by Form.fillImageField( )

please refer to our wiki and API

However, I agree with your judgement that the current version DOES NOT provide functions to set visual properties. Fortunately, these functions are undering devoloping and expected to be in the next release. For example, it is supposed to:

  • set the border color, background color

  • set the font, font size, text color

  • set the border line style, line thickness, and dashed line style

I think these functions can fully satisfy your requirement. If you still have some other special requirements, please inform us for better supporting.

Best regards.

Is there a rough estimate you could give me on the next release date?

Thanks

James

Dear James,

I am glad to inform you that the functions of setting field properties have been implemented by our developing group. Howerver, they have not been well tested, so they will NOT be appeared in a new version 2.1.0.0 to come. But we are sure to give you a hotfix within one or two weeks from now on.

Best regards.

Are these functions of setting field properties supported as of the last release. It looks like there is a class FormFieldFacade that is related to this, however the documentation is somewhat unclear on how to use this class.

Thanks

Dear cgrasso,

Thanks for considering Aspose.Pdf.Kit.

As you noticed, new features of field visual property setting are recently provided since Aspose.Pdf.Kit 2.1.1.0. Users can modified field visual properties through three interfaces in FormEditor class:

1. public void DecorateField(String fieldName): give a name of field to modify the very field specified

2. public void DecorateField(FieldType fieldType): give a form field type to modify visual attributes of all fields with the specified field type within the document, including text, push button, check box, radio box, list and combo box

3. public void DecorateField( ): give no parameter to modify all fields within the document

These APIs and their usages will be released soon. BTW, FormFieldFacade is an accessorial class to accomplish the function. Please keep an eys on it.

Best regards.