We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Renaming field

Thread ID:

Created:

Updated:

Platform:

Replies:

101895 Nov 30,2011 05:09 PM UTC Feb 3,2017 10:26 AM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: PDF
Martel
Asked On November 30, 2011 05:09 PM UTC

I read the documentation of Essential PDF and nothing indicates that form fields can be renamed. Is that right? If yes, do you have plans to implement this feature?


George Livingston [Syncfusion]
Replied On December 6, 2011 09:15 AM UTC

Hi Martel,

Thank you for your interest in Syncfusion products.

Currently we do not have support to rename the form fields. However we will create a feature request report for this implementation. Please create an incident in the Direct-Trac for the follow up of this feature.

Please let us know if you have any questions.

Regards,
George


Carl Ganz Jr.
Replied On February 2, 2017 01:53 PM UTC

Has this feature been added yet? It still doesn't seem like it can be done.

Is there a woraround to this?

Carl

Chinnu Muniyappan [Syncfusion]
Replied On February 3, 2017 10:26 AM UTC

Hi Carl, 
 
Thank you for your update. 
 
Yes, we can rename the existing form field by using the SetName method. Also, we have created a simple sample for demonstrating the same, please refer the code snippet and sample below. 
 
            //Load the existing PDF document 
            PdfLoadedDocument ldoc = new PdfLoadedDocument(Server.MapPath("/App_Data/test1.pdf")); 
 
            //Load the PDF form 
            PdfLoadedForm lform = ldoc.Form; 
 
            foreach (PdfLoadedField field in ldoc.Form.Fields) 
            { 
                if (field is PdfLoadedTextBoxField) 
                { 
                    //Set the new name of the field 
                    (field as PdfLoadedTextBoxField).SetName(field.Name + "_renamedField"); 
                } 
                else if (field is PdfLoadedCheckBoxField) 
                { 
                    //Set the new name of the existing filed 
                    (field as PdfLoadedCheckBoxField).SetName(field.Name + "_renamedField"); 
                } 
            } 
            //Save the document 
            ldoc.Save("output.pdf", Response, HttpReadType.Open); 
 
 
 
Please let us know if you have any concern. 
 
Regards, 
Chinnu 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;