Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for .NET (v6.x)  /  Can we programatically change field names in the pdf?

Forum Thread - Can we programatically change field names in the pdf?


Can an application read the fields in a pdf and change the field names? I'm mostly referring to text fields and check boxes, but I suppose if it's possible it'd work for any field or not at all, correct?
Posted by a ceTe Software moderator
Hello,

Yes, it is possible to change the names of all form fields. Here is the sample code that shows how to retrieve a form field and change its name:

            MergeDocument document = new MergeDocument("Form.pdf");
            FormField field = document.Form.Fields["Current_Name"];
            field.Name = "Changed_Name";
            document.Draw("output.pdf");

Thanks,
ceTe Software Support Team.


Well that just made my life easier. Thanks!

All times are US Eastern Standard time. The time now is 6:15 AM.