Free Support Forum - aspose.com

Can FormEditor update existing textfields?

I am currently evaluating the Aspose.PDF.Kit for .Net.

I have an existing pdf document and I want to add text to one of the fields programmatically using VB.Net. I can accomplish this with the Form Class but I also want to set the appearance of one of my fields to NOVIEW. However, it seems this is obsolete and I was referred to FormEditor to accomplish this task. I have not seen a method from FormEditor that can add text to a field such as the FillField method from the Form Class. Is there anyway that I can accomplish this task using the FormEditor Class or using a combination of the FormEditor Class and the Form Class?

Please advise. Thank you for your help.

Dear wdorsett,

Thanks for considering Aspose.Pdf.Kit.

Form and FormEditor are two classes related to form operations, but they play different roles. Form mainly focuses on field content filling, while FormEditor on field appearance/attribute setting. About your scenario, both of them are needed: Form.FillField() adds text while FormEditor.SetFieldAppearance() sets its appearace attribute. More details please refer to online API.

Best regards.

Is there a code snippet I can review which illustrates how both classes are used together using VB?

Thank you

You can find a example for Form class here. As for SetFieldAppearance, the is no example in the document but I think it is easy to learn how to use it form the API documentation.